public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
* Fwd: Bug#747948: mount: should warn user when potentially incorrect fstab order
       [not found] <20140513100450.GA1083@europecamions-interactive.com>
@ 2014-05-13 12:59 ` Phillip Susi
  2014-05-26 10:24   ` Karel Zak
  0 siblings, 1 reply; 3+ messages in thread
From: Phillip Susi @ 2014-05-13 12:59 UTC (permalink / raw)
  To: util-linux


[-- Attachment #1.1: Type: text/plain, Size: 59 bytes --]

Forwarding this request from debian to get your thoughts.

[-- Attachment #1.2: Bug#747948: mount: should warn user when potentially incorrect fstab order.eml --]
[-- Type: message/rfc822, Size: 12155 bytes --]

[-- Attachment #1.2.1.1: Type: text/plain, Size: 4244 bytes --]

Package: mount
Version: 2.20.1-5.3
Severity: wishlist

Hello, there.

Firstly, tl;dr: mount should warn when interlocked mountpoints in fstab
aren't in the expected order.

I recently noticed what at first seemed a bug in mount management of
fstab, but, according to the french mailing list users, it's more a lack
of warning.

Here is the problem: currently, at start, filesystems referenced in
fstab are mounted following their order in fstab. The problem is, when
/etc/fstab contains config for two filesystems with interlocked
mountpoints, in my case /var/www and /var/www/cache, they are not
necessarily in the right order. In my example, because of limitations in
my hosting provider installer and my drive configuration, /var/www/cache
configuration was stored before /var/www's one. Because man mount did
not contained any warning regarding mountpoints order, I assumed this
was automagically managed at start; of course, it proved me wrong, as
you can see in the following command dump taken after a reboot:

david@Curunir:~$ df -h
Sys. fich.    Taille Util. Dispo Uti% Monté sur
rootfs           54G  3,1G   49G   6% /
udev             10M     0   10M   0% /dev
tmpfs            13G  328K   13G   1% /run
/dev/md1         54G  3,1G   49G   6% /
tmpfs           5,0M     0  5,0M   0% /run/lock
tmpfs            35G     0   35G   0% /dev/shm
/dev/md3         20G  233M   19G   2% /var/log
/dev/md4        1,7T  852M  1,6T   1% /var/www/cache
/dev/md6         99G  188M   94G   1% /home
/dev/md7        1,7T  852M  1,6T   1% /var/www
tmpfs            32G     0   32G   0% /tmp
david@Curunir:~$ sudo su
[sudo] password for david: 
root@Curunir:/home/david# umount /dev/md4
umount: /var/www/cache: not mounted
root@Curunir:/home/david# mount /dev/md4
root@Curunir:/home/david# df -h
Sys. fich.  Taille Util. Dispo Uti% Monté sur
rootfs         54G  3,1G   49G   6% /
udev           10M     0   10M   0% /dev
tmpfs          13G  328K   13G   1% /run
/dev/md1       54G  3,1G   49G   6% /
tmpfs         5,0M     0  5,0M   0% /run/lock
tmpfs          35G     0   35G   0% /dev/shm
/dev/md3       20G  233M   19G   2% /var/log
/dev/md4      124G  188M  118G   1% /var/www/cache
/dev/md6       99G  188M   94G   1% /home
/dev/md7      1,7T  852M  1,6T   1% /var/www
tmpfs          32G  4,0K   32G   1% /tmp
/dev/md4      124G  188M  118G   1% /var/www/cache

As you can see, in this case, the mounting of /var/www/cache behaves
erratically when its configuration is placed before /var/www's one in
/etc/fstab. When I noticed this problem, I checked all system logs, but
none showed messages regarding the mountpoints order, so I suspected a
failed disk, but my hosting provider's checks did not show any problem,
no more than fsck -f. I almost reinstalled the system, but, at the last
moment, I thought of fstab and changed mountpoints order to place
/var/www before /var/www/cache, and, after a reboot, the problem was
solved.

I mailed yesterday the Debian french users mailing list about this
problem, which I thought of as a bug, but they explained me that, under
some conditions, this behaviour may prove helpful. Nevertheless,
I still think that mount should warn about this most likely unwanted
behaviour, both in its manpage and by logging warnings in dmesg or syslog,
in order to help users confronted to this problem. At first, I expected
mount to reject such a mountpoint order to avoid problems, but, if I'm
right, it should be a bit extreme and bother users who uses this
behaviour to their advantage.

So, I would like to request the addition in mount of a warning when it
tries to mount a filesystem whose mountpoint contains an already used
mountpoint in order to avoid confusion for filesystem administation.
This warning should be printed on stderr, if not in dmesg and syslog, to
allow the admin to correct mountpoints order in the most likely case the
current behaviour is not the expected one.

Thanks for reading.

Regards.
-- 
David Guyot
Administrateur système, réseau et télécommunications / Sysadmin
Europe Camions Interactive / Stockway
Moulin Collot
F-88500 Ambacourt
Tel: +33 (0)3 29 30 47 85
Fax : +33 (0)3 29 31 31 31

[-- Attachment #1.2.1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 553 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Fwd: Bug#747948: mount: should warn user when potentially incorrect fstab order
  2014-05-13 12:59 ` Fwd: Bug#747948: mount: should warn user when potentially incorrect fstab order Phillip Susi
@ 2014-05-26 10:24   ` Karel Zak
  2014-05-26 14:16     ` Phillip Susi
  0 siblings, 1 reply; 3+ messages in thread
From: Karel Zak @ 2014-05-26 10:24 UTC (permalink / raw)
  To: Phillip Susi; +Cc: util-linux

On Tue, May 13, 2014 at 08:59:42AM -0400, Phillip Susi wrote:
> Here is the problem: currently, at start, filesystems referenced in
> fstab are mounted following their order in fstab. The problem is, when

 I have added a note to the mount man page.

 Not sure if we want to add so complex fstab checking code to mount -a.

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Fwd: Bug#747948: mount: should warn user when potentially incorrect fstab order
  2014-05-26 10:24   ` Karel Zak
@ 2014-05-26 14:16     ` Phillip Susi
  0 siblings, 0 replies; 3+ messages in thread
From: Phillip Susi @ 2014-05-26 14:16 UTC (permalink / raw)
  To: Karel Zak; +Cc: util-linux

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 05/26/2014 06:24 AM, Karel Zak wrote:
> On Tue, May 13, 2014 at 08:59:42AM -0400, Phillip Susi wrote:
>> Here is the problem: currently, at start, filesystems referenced
>> in fstab are mounted following their order in fstab. The problem
>> is, when
> 
> I have added a note to the mount man page.
> 
> Not sure if we want to add so complex fstab checking code to mount
> -a.

I didn't think so either...


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBCgAGBQJTg0yrAAoJEI5FoCIzSKrwxFgH/3xx4mZKzEHnOLhn4q7riqXQ
6zVRGVPCPoZi2W//RSic+IsEQZhx99WelL929Zkm3PCi4haNr/IvpMqVXa1eUTeA
73y7rTz2Fwst6VFkLbw0nbKA9KngAjbxd7tSwV1cJcZsldzjWcGUnYSvJvschthG
wPs/2aIZygDCa9LLpdRf2m/nvAlQ3yCG41CF7hQfy1Er9LNxyFWlQv1b7Ikfb+Fy
8WORM1XXx5HjJya33M2ddrbkPSI11+thaxIrykJbphTCCqSDg40923MWFCLaCi1a
bSOHAqUcBhd7T0G68ceZlrcjn43gE/CgEqzMQ8pu0PQoJkqS4/9qGk3355Yiyc0=
=Ayow
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-05-26 14:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20140513100450.GA1083@europecamions-interactive.com>
2014-05-13 12:59 ` Fwd: Bug#747948: mount: should warn user when potentially incorrect fstab order Phillip Susi
2014-05-26 10:24   ` Karel Zak
2014-05-26 14:16     ` Phillip Susi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox