[Gb-ccb] Backup of the CCB microdrive
Martin Shepherd
mcs at astro.caltech.edu
Thu Oct 13 01:39:09 EDT 2005
I gather that the top of the CCB is currently off. Before the lid is
put back on again, it would be great if somebody could remove the CCB
microdrive for an hour or so, and back it up to a disk somewhere. If you
are too busy, then I'll see if I can do some kind of backup over the
net, although doing that on an active filesystem is always dicey.
The following notes are based on my experience of backing up the
microdrive in Pasadena.
1. Preparation:
Before going going to the trouble of removing the microdrive, I
suggest that you get the flash-card reader installed on a linux
machine, and find a place to temporarily store the 2GB image-file
that will come from the microdrive. Since the latter file should
compress down to around 600MB, you will subsequently need a
permanent place for a 600MB file.
I left the flash-card reader that I previously used for microdrive
backups, with Brian. I suggest that you use this, since it is known
to work with the microdrive. When I was using this, I was
pleasantly surprised to find that when the microdrive was plugged
into this flash-card reader, I could run fdisk, install boot
loaders, and apply other hard-disk utilities to the microdrive, as
though it were an IDE disk. That may or may not be a common feature
of all flash-card readers, but I do know that this one works.
If the distribution of Linux that you are using doesn't
automatically associate a mount-point with the flash-card reader,
when you plug it in to the USB port and insert a flash-card or the
microdrive, then get a sysadmin to edit /etc/updfstab.conf, find
the clause that starts with the line:
device flash {
and add a line that says:
match hd STORAGE\ DEVICE
Thereafter (provided that the flash-card reader has been plugged in
to the USB port), whenever you insert a flash-card or microdrive,
you should see a mount-point called, /mnt/flash. To mount this, you
would then type:
mount /mnt/flash
However for the backup don't mount it, since its contents need to
be treated as a single large stable file, rather than an active
filesystem.
2. Now extract the microdrive from the CCB, after shutting it down and
turning off the power. The microdrive is difficult to get at
without removing the GPIO card, so Randy, JD, or Jason should do
this.
3. Insert the microdrive in the flash-card reader, and check that a
mount-point (probably /mnt/flash) shows up in the /mnt/ directory.
4. Now look in /etc/fstab for a line that refers to the above
mount-point, and write down the name of the device-file that
appears in the first column of that line. On my computer this was
/dev/sda1. This is actually the name of the first partition on the
disk, whereas we want to address the whole device. Therefore when
backing up this device I backed up /dev/sda, not /dev/sda1.
5. If you mounted the microdrive, unmount it now. Then go to a
directory that has space for the 2GB microdrive-image and, assuming
that the device above was /dev/sda (replace this name with the
actual device name if not), type:
dd if=/dev/sda of=ccb_microdrive_image
This will take some time.
6. Once the dd finishes, remove the microdrive, and place it back in
the CCB.
7. If you have time, you could now remove the 2nd microdrive from the
spare CCB computer (last seen in the lab, by the monitor), insert
it into the flash-card reader, and copy the above image file onto
it, by typing:
dd if=ccb_microdrive_image of=/dev/sda
Then restore the microdrive to the spare CCB computer. This would
give us a live backup.
8. Regardless of whether you do the above step, compress the image
file with gzip, and move the result to a more permanent location.
gzip ccb_microdrive_image
cp ccb_microdrive_image.gz /wherever/CCB/archive_dir/
Thanks,
Martin
More information about the gb-ccb
mailing list