NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble mounting on startup via fstab

Hello,

 

I previously modified fstab to mount an external disk to a CompactRio, and this works well.

 

 

/dev/sda1      /x            ext3       defaults         0  2

 

 

I want to add a bind mount that also is available after startup. To do so, I added the following after the above:

 

 

/x/data  /sftp/share/mydata  none       defaults,bind    0  0

 

 

If I run `mount -a`, the bind mount becomes available. However, if I reboot the system, the bind mount is not automatically mounted.

 

After some research, I see that the mounts are setup by the /etc/init.d/mountall.sh script:

 

mount -at nonfs,nosmbfs,noncpfs 2>/dev/null

 

 

I would expect this to mount the bindfs, but it unfortunately appears not to be doing so.

 

Any help is appreciated!

0 Kudos
Message 1 of 2
(1,085 Views)

methinks mountall will race badly against udev. You should write a custom udev rule to do what you want here.

 

Otherwise, I would be very curious what would happen if you removed 

-t nonfs,nosmbfs,noncpfs

 

It's possible that some improvement could be made here; an odd util-linux mount behavior could be getting tickled.

 

Adding `-v` to the mount options may also be helpful in diagnosing this (in conjunction with bootup logs).

0 Kudos
Message 2 of 2
(1,050 Views)