Brool brool (n.) : a low roar; a deep murmur or humming

External Firewire Drive With Gentoo

 |  coding

I bought an external hard drive to back up a bunch of stuff that I have laying around on computers. I purchased the Seagate 200GB Firewire drive because a) Techbargains pointed out that there was a sale on them and b) I neglected to read the reviews on CNet. That said, the drive seems fast enough, counter to CNet’s review.

Now, the other thing to mention is that this is true backup, not a sort of archival solution — I have a DVD writer for archival. (Although I will admit to briefly lusting after one of the Buffalo Terastations whilst in Fry’s).

At any rate, getting it set up on Gentoo was as easy as plugging it in. Oh, no it wasn’t!

I needed to rebuild the kernel first. Make sure you have the following:

General Setup --->
  [*] Support for hot-pluggable devices

and, if you want the drive to also be usable with Windows, you may need:

File Systems -->
  DOS/FAT/NT Filesystems -->
    ; MSDOS fs support
    ; FAT (Windows-95) fs support
    (437) Default codepage for FAT
    (iso8859-1) Default iocharset for FAT

For Firewire, some combination of:

Device Drivers -->
  SCSI device support -->
    <*> SCSI disk support
     SCSI generic support
  IEEE 1394 (Firewire) support -->
     OHCI-1394 support
     SBP-2 support (Harddisks etc.)
     Raw IEEE1394 I/O support
     IEC61883-1 Plug support

After doing the above, I had a problem: I couldn’t mount the drive, but instead got a “Invalid Media Value (0x6)” warning, as well as the following from mount:

# mount -t vfat /dev/sdc1 /mnt/backup
mount: wrong fs type, bad option, bad superblock on /dev/sdc1, 
or too many mounted file system

Googling around a lot revealed that I needed to configure the 437 code page; so before you build the kernel, edit the .config file and add:


(or whatever appropriate codepages are for your locale, but at least one source I read said that only cp437 was currently supported).

Whew! Okay, kernel compiled and new image copied to your boot drive? Turn it on and plug it into the firewire port. Run dmesg to see what device it is, and then mount it:

modprobe vfat
mount -t vfat /dev/sdc1 /mnt/backup

After using it for a bit, though, I ended up reformatting it with ext3 so I could use a very cool rsync backup method. My script for backing up ended up looking like:

#!/bin/bash doback() { echo rsync -a -v --delete --link-dest=/mnt/bck/backup.1/$1 /$1/ backup.0/$1 rsync -a -v --delete --link-dest=/mnt/bck/backup.1/$1 /$1/ backup.0/$1 } mount /dev/sdc1 /mnt/bck # rotate the archives cd /mnt/bck rm -rf backup.5 mv backup.4 backup.5 mv backup.3 backup.4 mv backup.2 backup.3 mv backup.1 backup.2 mv backup.0 backup.1 mkdir backup.0 # backup SVN mkdir /mnt/bck/backup.0/svn svn-hot-backup /var/svn /mnt/bck/backup.0/svn/ # backup directories doback etc >/tmp/backup-log doback code >>/tmp/backup-log doback home >>/tmp/backup-log doback root >>/tmp/backup-log doback backup >>/tmp/backup-log doback archive >>/tmp/backup-log # copy backup log to the backup mv /tmp/backup-log /mnt/bck/backup.0

Read the linked rsync article for more details, but it is very cool: the backup proceeds quickly, a full image is always in backup.0, and backup.1 through backup.5 hold incremental changes as necessary.

Happiness is a backed up system.


Comments are moderated whenever I remember that I have a blog.

Joe Hancock | 2006-05-11 01:15:59
I've been looking at buying one of I'm totally persuaded. You've got to love Gentoo!
Add a comment