Skip to contentSkip to conversation

bug v2.29-rc2, /etc/mtab file

DISCUSSION Ruediger Meier 2 participants 5 messages Oct 20, 2016 Util-Linux package

lore
Share & tools
lore
#0 lore raw

Hi,

On RHEL/CentOs-6 with /etc/mtab file some of our mount tests write something to /etc/mtab. AFAIR it should be ignored nowadays by default, right?

After our test-suite was running I see these lines left in /etc/mtab:

tmpd /home/abuild/rpmbuild/BUILD/util-linux-2.29-rc2/tests/output/mount/fstab-broken-mnt tmpfs rw 0 0 tmpd /home/abuild/rpmbuild/BUILD/util-linux-2.29-rc2/tests/output/mount/fstab-broken-mnt tmpfs rw 0 0 none /home/abuild/rpmbuild/BUILD/util-linux-2.29-rc2/tests/output/mount/fstab-none-mnt tmpfs rw,nosuid,nodev,relatime 0 0

cu,
Rudi

maintainer
#1 lore raw
Quoted 10 lines · Ruediger Meier

Hi,

On RHEL/CentOs-6 with /etc/mtab file some of our mount tests write something to /etc/mtab. AFAIR it should be ignored nowadays by default, right?

After our test-suite was running I see these lines left in /etc/mtab:

tmpd /home/abuild/rpmbuild/BUILD/util-linux-2.29-rc2/tests/output/mount/fstab-broken-mnt tmpfs rw 0 0 tmpd /home/abuild/rpmbuild/BUILD/util-linux-2.29-rc2/tests/output/mount/fstab-broken-mnt tmpfs rw 0 0 none /home/abuild/rpmbuild/BUILD/util-linux-2.29-rc2/tests/output/mount/fstab-none-mnt tmpfs rw,nosuid,nodev,relatime 0 0

Because our mount (from the test) calls /sbin/mount.tmpfs where is executed standard mount(8) from system.

I'll improve the test to call umount --fake to clean up mtab.

Karel

Signature · 2 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com
#2 lore raw
Quoted 18 lines · Karel Zak
Quoted 9 lines · Ruediger Meier

Hi,

On RHEL/CentOs-6 with /etc/mtab file some of our mount tests write something to /etc/mtab. AFAIR it should be ignored nowadays by default, right?

After our test-suite was running I see these lines left in /etc/mtab:

Quoted 7 lines

tmpd /home/abuild/rpmbuild/BUILD/util-linux-2.29-rc2/tests/output/mount/ fstab-broken-mnt tmpfs rw 0 0 tmpd /home/abuild/rpmbuild/BUILD/util-linux-2.29-rc2/tests/output/mount/ fstab-broken-mnt tmpfs rw 0 0 none /home/abuild/rpmbuild/BUILD/util-linux-2.29-rc2/tests/output/mount/ fstab-none-mnt tmpfs rw,nosuid,nodev,relatime 0 0

Quoted 2 lines

Because our mount (from the test) calls /sbin/mount.tmpfs where is executed standard mount(8) from system.

Ah interesting. That's why it works on my local system (also mtab file) where I don't have /sbin/mount.tmpfs.

Quoted 1 line

I'll improve the test to call umount --fake to clean up mtab.

Still a bit annoying that these "third party mount binaries" may modify mtab but our umount does not.

cu,
Rudi

maintainer
#3 lore raw
Quoted 22 lines · Ruediger Meier
Quoted 18 lines · Karel Zak
Quoted 9 lines · Ruediger Meier

Hi,

On RHEL/CentOs-6 with /etc/mtab file some of our mount tests write something to /etc/mtab. AFAIR it should be ignored nowadays by default, right?

After our test-suite was running I see these lines left in /etc/mtab:

Quoted 7 lines

tmpd /home/abuild/rpmbuild/BUILD/util-linux-2.29-rc2/tests/output/mount/ fstab-broken-mnt tmpfs rw 0 0 tmpd /home/abuild/rpmbuild/BUILD/util-linux-2.29-rc2/tests/output/mount/ fstab-broken-mnt tmpfs rw 0 0 none /home/abuild/rpmbuild/BUILD/util-linux-2.29-rc2/tests/output/mount/ fstab-none-mnt tmpfs rw,nosuid,nodev,relatime 0 0

Quoted 2 lines

Because our mount (from the test) calls /sbin/mount.tmpfs where is executed standard mount(8) from system.

Quoted 7 lines

Ah interesting. That's why it works on my local system (also mtab file) where I don't have /sbin/mount.tmpfs.

Quoted 1 line

I'll improve the test to call umount --fake to clean up mtab.

Still a bit annoying that these "third party mount binaries" may modify mtab but our umount does not.

Well, this problem cannot exist on system where mtab is symlink. All "third party mount binaries" should be able to detect the symlink. The symlink is supported by mount(8) for 10+ years.

And on system where is regular mtab you don't want to use util-linux compiled without mtab support.

Karel

Signature · 2 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com
maintainer
#4 lore raw
In reply to Ruediger Meier
Quoted 5 lines · Ruediger Meier

After our test-suite was running I see these lines left in /etc/mtab:

tmpd /home/abuild/rpmbuild/BUILD/util-linux-2.29-rc2/tests/output/mount/fstab-broken-mnt tmpfs rw 0 0 tmpd /home/abuild/rpmbuild/BUILD/util-linux-2.29-rc2/tests/output/mount/fstab-broken-mnt tmpfs rw 0 0 none /home/abuild/rpmbuild/BUILD/util-linux-2.29-rc2/tests/output/mount/fstab-none-mnt tmpfs rw,nosuid,nodev,relatime 0 0

Should be fixed now.

Karel

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