What I did...
1. create systemd .mount file
Code: Select all
$ vim /etc/systemd/system/dataTBs.mount
# unit to map UUID for encrypted drive to a static directory
[Unit]
Description=Mount Encrypted Drive Directory
Conflicts=umount.target
#Before=local-fs.target umount.target
#Before=umount.target
[Mount]
What=/dev/disk/by-uuid/4faf1458-9217-40e3-83d1-4b7e35ba3145
Where=/dataTBs
Type=ext4
Options=defaults,noauto,x-systemd.automount,x-systemd.device-timeout=3,x-systemd.mount-timeout=3,users,exec,nodev,nosuid,errors=remount-ro
[Install]
WantedBy=multi-user.target
$ systemctl enable /etc/systemd/system/dataTBs.mount
Code: Select all
# ref: https://docs.fedoraproject.org/en-US/Fedora/18/html/Installation_Guide/apcs04s06.html
$ vim /etc/crypttab
# to allow non-root users to mount encrypted partitions on a specific hard drive
# pass output of following command to DEVPATH argument where sdb is the drive with the encrypted partition
# $ udevadm info -q path -n /dev/sdb
# /devices/pci0000:00/0000:00:08.1/ata4/host3/target3:0:0/3:0:0:0/block/sdb
# reduce to host3/* means all devices on that sata port are mountable by non-root users
DEVPATH=="/devices/pci0000:00/0000:00:08.1/ata4/host3/*", ENV{UDISKS_SYSTEM}="0"
Note I went this route because trying to specify /etc/fstab options made the system unusable (would not boot/login) even with options=noauto,x-systemd.automount,x-systemd.device-timeout=3,x-systemd.mount-timeout=3.
Any help is appreciated.