Am 2016-07-13 um 22:19 schrieb Jon LaBadie:

I've not used it on Linux, but an Overlay FS (OFS) was introduced
in the kernel about 2 years ago.  With that, your two drives
could have their own fixed mount points.  Then their root dirs
could be overlayed so both trees appear under a single directory.
If one drive was not there, only half the vtapes would appear.

I have to research if it is possible to have both layers writeable.

I like the udev-rules-way better.
Have the 2 disks in fstab:


UUID=57584... /mnt/externaldisk1 ext4 relatime,user 0 1
UUID=fae45... /mnt/externaldisk2 ext4 relatime,user 0 1

in /etc/udev/rules.d something like:

KERNEL=="sd*", SUBSYSTEM=="usb", ATTRS{serial}=="57584..blah", RUN+="/bin/ln -snf /mnt/externaldisk1 /mnt/diskchanger"

(2nd line for 2nd disk ...)

maybe let the RUN+= point at some small bash script to cover the case when both disks are attached at the same time or so

I will test that as soon as I have physical access to the both drives and can plug them in and out myself (currently ~30km away from me).

udev is part of every modern distro, dunno about overlayfs (modules or so).

greets, Stefan

Reply via email to