Skip to contentSkip to conversation

Using /etc/fstab.d

DISCUSSION Roger Leigh 2 participants 4 messages Nov 27, 2011 – Nov 29, 2011 Util-Linux package

lore
Share & tools
lore
#0 lore raw

Hi folks,

I noticed that support had recently been added for /etc/fstab.d. In Debian, we're configuring with --enable-libmount-mount, but I'm not seeing it being used; strace shows no opendir/stat calls for it. Is anything else necessary to enable it, or is it not yet actually used by mount?

I've just created a file /etc/fstab.d/test.fstab, and then tried "mount /foo", where /foo would be the entry in test.fstab, but don't see anything happening.

Thanks,
Roger

Signature · 4 lines
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.
maintainer
#1 lore raw
Quoted 5 lines · Roger Leigh

I noticed that support had recently been added for /etc/fstab.d. In Debian, we're configuring with --enable-libmount-mount, but I'm not seeing it being used; strace shows no opendir/stat calls for it. Is anything else necessary to enable it, or is it not yet actually used by mount?

Do you really have the latest git tree (gil pull to refresh)?

Quoted 3 lines

I've just created a file /etc/fstab.d/test.fstab, and then tried "mount /foo", where /foo would be the entry in test.fstab, but don't see anything happening.

[git clone / git clean -xdf; cd util-linux]

 $ ./autogen.sh
 $ ./configure --enable-libmount-mount
 $ make -C mount/ mount
 # cat /etc/fstab.d/tests.fstab 
 /home/fs-images/ext2.img /mnt/loop      auto    defaults,noauto
 # ./mount/mount /mnt/loop
 # findmnt /mnt/loop
 TARGET    SOURCE     FSTYPE OPTIONS
 /mnt/loop /dev/loop0 ext2   rw,relatime,errors=continue
 # findmnt --fstab /mnt/loop
 TARGET    SOURCE                   FSTYPE OPTIONS
 /mnt/loop /home/fs-images/ext2.img auto   defaults,noauto

.. so works for me ;-)

Try

       LIBMOUNT_DEBUG=0xffff ./mount/mount ...

to debug the problem.

Karel

Signature · 2 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com
#2 lore raw
Quoted 8 lines · Karel Zak
Quoted 5 lines · Roger Leigh

I noticed that support had recently been added for /etc/fstab.d. In Debian, we're configuring with --enable-libmount-mount, but I'm not seeing it being used; strace shows no opendir/stat calls for it. Is anything else necessary to enable it, or is it not yet actually used by mount?

Do you really have the latest git tree (gil pull to refresh)?

I was testing the 2.20.1 release, which I saw had fstab.d support implemented (at least partially) in libmount. It does indeed now work with current git. Just saw that it was only enabled last week in mount, looking at the history. Will it be long until this is in a release?

Thanks,
Roger

Signature · 4 lines
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.
maintainer
#3 lore raw
Quoted 11 lines · Roger Leigh
Quoted 8 lines · Karel Zak
Quoted 5 lines · Roger Leigh

I noticed that support had recently been added for /etc/fstab.d. In Debian, we're configuring with --enable-libmount-mount, but I'm not seeing it being used; strace shows no opendir/stat calls for it. Is anything else necessary to enable it, or is it not yet actually used by mount?

Do you really have the latest git tree (gil pull to refresh)?

I was testing the 2.20.1 release, which I saw had fstab.d

ah.. :-)

Quoted 4 lines

support implemented (at least partially) in libmount. It does indeed now work with current git. Just saw that it was only enabled last week in mount, looking at the history. Will it be long until this is in a release?

The feature going to be supported in the next release 2.21 (beta next month), I don't expect any changes in this area.

Karel

Signature · 2 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com