[kwlug-disc] Multiple disks to single mount point

John Van Ostrand john at netdirect.ca
Wed Mar 10 16:52:30 EST 2010

----- "Chris Irwin" <chris at chrisirwin.ca> wrote:

> I'm currently using a 3.5" SATA hotswap bay for backups, swapping out
> a
> drive every week, and swapping a new one in. I'm considering changing
> the UUIDs on my backup filesystems to all be the same, thus I can
> have
> an entry in /etc/fstab that will work, rather than my current routine
> of
> manually checking dmesg and mounting/umounting devices directly. 
> Can anybody think of a negative side of having duplicated UUIDs? You
> can
> assume I won't have multiple disks connected at a single time.
> Or is there a better way to control mounting multiple drives to a
> common
> mount-point? I tried multiple UUID entries in fstab, but it only
> looks
> for the first if I tell it to mount /mnt/backup and fails with only
> the
> second drive connected.

It seems to me that you could use the different UUIDs as a feature. To ensure that the correct one is in the drive you could set up some pool of UUIDs and use a script file to u*mount (a test for the regex audience). Have the script time stamp each UUID, maybe as a file name in /var/lib/mybackup and don't allow the script to overwrite one that's too recent.

Use a custom shell script to mount the volume just before backup and umount it after. That way you also get an off-line feature for backup so a single admin screw up won't hose last night's backup.

More information about the kwlug-disc mailing list