Follow these procedures to create a monthly save set. Create the save set any time after the end of a month to be saved. For more options on any sushi command, run the command with the --help option.
The monthly save set process is completely restartable. It can be restarted with the same set of media used initially, or with completely different media. When restarted, only atoms that have not already been written to the save set will be written.
Run the sushi offline scan command get the total size of the save set. The number you want is the Total compressed data line near the end of the output. Record this number.
% sushi offline scan
snip
12202 atoms epoched, 297 atoms not epoched
Total run time 1716124 (140.64 secs/atom)
Total raw data 1082936.89 MB (93.06 MB/atom, 0.63 MB/sec)
Total compressed data 481067.42 MB (39.42 MB/atom, 0.26 MB/sec)
Average compression ratio 2.36
In this example, you will need 481 GB of disk space to hold this monthly save set (i.e. 5 disks, see below).
Run the sushi pool list --showused command to show off line volumes that sushi knows about and the whether or not they are in use by another monthly save set. Choose disks that show no space used. If you cannot find enough space, please see Adding Disks to the Off Line Pool.
% sushi pool list --showused Storage Media Media Space First Last Id Size(MB) Type Comment Used(MB) Result Result ------- ---------- ----- ---------------------------------------- --------- --------------- --------------- C013078 102400.00 Disk 102400.00 20020530.092504 20020626.084518 C013079 102400.00 Disk 102400.00 20020530.092502 20020629.085203 C013080 102400.00 Disk 102400.00 20020530.133129 20020626.112011 C013081 102400.00 Disk 102400.00 20020530.140757 20020629.142117 C013082 102400.00 Disk 49181.65 20020529.144604 20020629.142042 C013083 102400.00 Disk 0.00 (6 rows)
In this example, the only disk available for monthly saves is C013083. More disks will need to be added to the off line pool before another monthly save set can be run.
Perform this step as root on sushi-offline.cs.wisc.edu
Run the command:
# lsmod | grep 3w_xxxx
If this command gives a line that looks like:
3w_xxxx some-number some-more-information
it may mean that someone else is doing an off line restore, or running a monthly save set. After verifying that no one else is doing anything with sushi off line data, check for any mounted sushi disks, unmount them if necessary, and remove the module with the command:
# rmmod 3w_xxxx
Verify that the module is unloaded by re-running the lsmod command above and getting no output. Do not proceed until the module is unloaded.
Load the disks into any of the numbered disk slots on sushi-offline. You can use any slot; the operating system will properly mount the disk regardless of which slot it is in. The slot marked boot (or some such) is the boot disk, and Bad Things (tm) will happen if you remove it, so don't.
Then run the command:
# modprobe 3w_xxxx
When the 3w_xxxx module loads, it will identify the disks present to the OS.
With the save set disks and the 3w_xxxx module loaded, log in as root on sushi-offline.cs.wisc.edu and run the command:
# /s/std/bin/runauth -a -l sushi /s/sushi/bin/sushi offline monthlysave media-id-1 media-id-2 media-id-3 ...
The sushi program will automatically mount the disks as needed and transfer data from the on-line pool to the monthly save set. It will display messages while it progresses though the atoms.
For example, to create a save set with disks C013078, C013079, C013080, C013081, and C013082, run the command:
# /s/std/bin/runauth -a -l sushi /s/sushi/bin/sushi offline monthlysave C013078 C013079 C013080 C013081 C013082
As any labstaff user, run the sushi command offline scan --not_written. This will show you any atoms that should be in the save set, but aren't. This list should be empty. If there are atoms listed there, you want to find out why. It may mean that sushi thought it created a backup, but really didn't. In general, it means there's a bug somewhere in the system.
(Still as root on sushi-offline.cs.wisc.edu)
Remove the 3w_xxxx module:
# rmmod 3w_xxxx
# lsmod | grep 3w_xxxx
If the lsmod/grep command produces output that shows module still loaded, guess what, it's still loaded. Stop. Figure out what went wrong before proceeding.
After you verify that the 3w_xxxx module is unloaded, remove the disks from sushi-offline.cs.wisc.edu and store them in the appropriate location.
If you need to add disks to the off line pool, follow these instructions. Do this on host sushi-offline.cs.wisc.edu, as root.
Note: On newer hosts the module name is 3w_9xxx instead of 3w_xxxx. Adjust the directions below depending on the hardware you have.
Make sure the 3w_xxxx module is unloaded
# rmmod 3w_xxxx
# lsmod | grep 3w
Install a new disk in a removable bracket. Label the bracket with the inventory number of the disk.
Load the disk into one of the numbered slots on sushi-offline.cs.wisc.edu, and load the 3w_xxxx module.
# modprobe 3w_xxxx
Run the fdisk program on disk /dev/sda. Create a single, primary partition that contains all the space on the disk.
# fdisk /dev/sda
(Enter Appropriate fdisk
commands-- (d)elete any existing partitions, then (n)ew,
(p)rimary, partition 1, default first and last cylinder,
(p)rint, look it over to make sure it's the whole disk,
(w)rite)
Create an ext3 partition on /dev/sda1 with a label of the inventory number of the disk.
# mke2fs -j -m 2 -L inventory-number /dev/sda1
E.g.:
# mke2fs -j -m 2 -L C013083 /dev/sda1
Remove the 3w_xxxx module, then unload the disk and set it aside for safe keeping.
# rmmod 3w_xxxx
On a different computer, authenticated as yourself, add the disk to the database with the sushi pool add command.
% sushi pool add inventory-tag size Disk comment
For the current 120GB off line disks, use a 'size' of 102400m (i.e. 102400 MB, or 102.4 GB). For example, a real command might look like:
% sushi pool add C013083 102400m Disk "Added 7/24/2002"
Repeat with other disks as needed.
The sushi offline recycle sub-command is used to clear database entries for off line media so that the media can be re-used for a new monthly save set.
To clear an off line disk, use a command such as:
% sushi offline recycle --nomedia --storage_id media_id
This will clear the database entries for off line device media_id; however, it will not remove any actual data from the media. After running the recycle sub-command, it will be necessary to re-initialize the media before writing new save-set data onto it. See the entry Adding Disks to the Off Line Pool elsewhere in this document for instructions on making a blank file system on an off line disk (note that the disk is already partitioned; all the needs to be done is to re-create the file system).