You are not logged in.

#1 2018-02-05 21:51:00

SH1986
Member
Registered: 2018-02-05
Posts: 3

iscsi and bind mount through fstab

Hi,

I have been trying to figure out how to have fstab to bind mount, after my iscsi mount comes up.

In my fstab I got this:

UUID=e0568b08-5f27-4a52-a135-23e2343289a8a /opt/mount ext4 _netdev 0 0

Which is my iscsi mount, this works without any problems on boot.
But afterwards I need to do a bind mount for this folder /opt/mount/pictures to /home/sh/pictures.

I would like to have this done on system boot as well

mount --bind /opt/mount/pictures /home/sh/pictures

Been trying this in my fstab:

/opt/mount/pictures /home/sh/pictures none bind noauto,nofail,x-systemd.requires=/opt/mount/pictures,x-systemd.automount 0 0

But it ain't seems to work on boot. So what I want, is the bind part runs at last

Any good ideas how to accomplish this? smile

Best Regards
Soren

Offline

#2 2018-02-23 01:50:11

gps1539
Member
From: Los Gatos, CA
Registered: 2013-11-06
Posts: 165

Re: iscsi and bind mount through fstab

I'm guessing that fstab wont work as the iSCSI lun isn't mounted when it tries the bind mount. If mount -a works later, then one option may be to create a systemd unit to bind mount only when the iscsi lun is successfully mounted.

https://wiki.archlinux.org/index.php/Sy … pendencies

Offline

Board footer

Powered by FluxBB