samba.x.eliezer613 at spamgourmet.com
2019-Dec-25 01:38 UTC
[Samba] mounting ext usb drive
Hi, trying to mount on demand, external USB drive which is /bkup. /etc/fstab has it as: ?UUID=4C76D06176D04CF8 /bkup?????? ntfs-3g?? noauto,user,rw??? 0?????? 0 The following does open a share but its not really /bkup and its not writeable. Corrections are welcome. Thanks. [backup_drive] ??????? preexec = /bin/mount /bkup ??????? comment = Backup Drive ??????? path = /bkup ??????? writable = yes ??????? postexec = /bin/umount /bkup If /bkup is mounted then the above share works from Windows or Unix clients. Thing is, wanted it to only mount when actually needed. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: <http://lists.samba.org/pipermail/samba/attachments/20191224/b7ef7b7a/signature.sig>
On 25/12/2019 01:38, samba.x.eliezer613--- via samba wrote:> Hi, trying to mount on demand, external USB drive which is /bkup. > /etc/fstab has it as: > ?UUID=4C76D06176D04CF8 /bkup?????? ntfs-3g?? noauto,user,rw??? 0?????? 0 > The following does open a share but its not really /bkup and its not > writeable. Corrections are welcome. > Thanks. > > [backup_drive] > ??????? preexec = /bin/mount /bkup > ??????? comment = Backup Drive > ??????? path = /bkup > ??????? writable = yes > ??????? postexec = /bin/umount /bkup > > If /bkup is mounted then the above share works from Windows or Unix > clients. Thing is, wanted it to only mount when actually needed.You normally need to be root to use mount, so try 'root preexec' & 'root postexec', or read up on 'noauto' in fstab Rowland