Changes between Version 3 and Version 4 of jupiter/backup


Ignore:
Timestamp:
04/27/06 22:22:32 (21 years ago)
Author:
Daniel Kahn gillmor
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • jupiter/backup

    v3 v4  
    33backups for jupiter are done via regular rsync to an LVM volume on removable media.
    44
    5 == preparing the removable media ==
     5== preparing the removable media (only do this once ever per disk!) ==
    66
    77You should only need to prepare the removable media once.  DO NOT repeat this step on existing backup drives unless you want to destroy the backed-up data!
    … …  
    1515MAXEXTENTS=$(vgdisplay vgbackup0_jupiter | grep '^  Total PE' | awk '{print $3}')
    1616lvcreate --name backup0 --size $MAXEXTENTS vgbackup0_jupiter
    17  mkfs -t ext3 /dev/vgbackup0_jupiter/backup0
     17mkfs -t ext3 /dev/vgbackup0_jupiter/backup0
    1818}}}
    1919
    … …  
    2121
    2222since we should be rotating media, i expect that each volume group/logical volume will have an incrementing integer ID.  e.g., the next one should be `vgbackup1_jupiter/backup1`
     23
     24For now, we'll just remove the volume from the system so we can plug it in cleanly:
     25{{{
     26lvchange -an /dev/vgbackup0_jupiter/backup0
     27vgexport vgbackup0_jupiter
     28}}}
     29
     30You can remove the disk now, and then re-run `vgscan` to become aware of its absence.
     31
     32== Plugging and noticing the backup volume ==
     33
     34Plug the disk back in and scan for it:
     35
     36{{{
     37vgscan
     38BACKUPVOL=$( vgs 2>/dev/null | awk '{ print $1 }' | grep 'vgbackup[0-9]*_jupiter')
     39echo "we'll be backing up with backup volume $BACKUPVOL"
     40}}}
     41
     42in the example below, i'll be using `vgbackup0_jupiter` as the backup volume.
     43
     44Import the backup volume (in case it was exported), and activate the logical volume on it:
     45
     46{{{
     47vgimport vgbackup0_jupiter
     48lvchange -ay vgbackup0_jupiter/backup0
     49}}}
    2350
    2451== snapshotting the filesystem to back up ==
    … …  
    73100}}}
    74101
    75 deactivate the target volume:
     102deactivate the target volume and tell the kernel to forget about its volume group:
    76103
    77104{{{
    78105lvchange -an /dev/vgbackup0_jupiter/backup0
     106vgexport vgbackup0_jupiter
    79107}}}
    80108
    81109You should now be able to remove the disk.
     110
     111== next time ==
     112