[opensuse] Problem with External Drive
I have OpenSuSE 13.1 using the default kernel trying to read some stuff off an external hard drive mounted via USB drive dock. The entire drive partition is encrypted. The auto mounter detects the drive and the fact it is encrypted, prompting for the passphrase and mounts it just fine. The problem is it only stays mounted for a short time and drops offline, then it detected agains, again prompting for the passphrase, etc. When I check the /dev/sd*, it first uses /dev/sdc*, then /dev/sdd*, then /dev/sde*, etc. The drives were attached to an OPenSuSE VM running under VMware ESXi using the USB passthrough feature, so I modified the disk_swap script I used to mount those drives which uses /dev/disk/by-id: umount /external echo "Please eject disk cartridge $current and insert cartrdge $next " echo " Please type OK when finished > "
reply while [ "$reply" != 'OK' ]; do echo reply="$reply" read reply done cryptsetup remove external #cryptsetup luksOpen /dev/disk/by-id/usb-USB_3.0_MassStorage_5VP374XR-0:0-part1 external echo "Mounting `ls -1 /dev/disk/by-id | grep MassStorage |grep part1 | cut -d' ' -f1`" cryptsetup luksOpen /dev/disk/by-id/`ls -1 /dev/disk/by-id | grep MassStorage |grep part1 | cut -d' ' -f1` external mount /dev/mapper/external /external df -h
This mounts the drive and it stays online for a longer time but eventually drops off as well. Could me problem be with the auto mounter or autofs? Should I disable them while trying to use this drive? Thank you, Lucky Leavell -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
В Mon, 16 Feb 2015 20:49:15 -0500 (EST) susemisc@unixpress.com пишет:
I have OpenSuSE 13.1 using the default kernel trying to read some stuff off an external hard drive mounted via USB drive dock. The entire drive partition is encrypted. The auto mounter detects the drive and the fact it is encrypted, prompting for the passphrase and mounts it just fine. The problem is it only stays mounted for a short time and drops offline, then it detected agains, again prompting for the passphrase, etc. When I check the /dev/sd*, it first uses /dev/sdc*, then /dev/sdd*, then /dev/sde*, etc.
...
Could me problem be with the auto mounter or autofs? Should I disable them while trying to use this drive?
The whole idea of autofs is to unmount after some inactivity timeout so it works by design. What is missing here is probably ability to execute arbitrary program when filesystem is unmounted (in this case it could allow cleaning up device from kernel). If this is the only filesystem used for automount you can simply disable timeout. See man automount and /etc/sysconfig/autofs. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (2)
-
Andrei Borzenkov
-
susemisc@unixpress.com