[lkml]   [2003]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: About /etc/mtab and /proc/mounts
    Kasper Dupont <> writes:
    > > /var is clearly the right place for this;
    > Is it?

    Yes. On some systems, /var and /tmp are the _only_ read-write filesystems.

    > > if /var isn't mounted initially, I'd suggest that mount should
    > > simply not update any file at that point, and the init-script that
    > > mounts /var can be responsible from propagating information from
    > > /proc/mounts to /var/whatever.
    > Would you fsck /var while it is mounted?

    No, of course not; that's why I suggest it's up to the init scripts to
    make sure that /proc/mounts gets propagated to /var/whatever. They
    usually will know enough about what's going on to take care of any
    special cases and add any extra info that's relevant.

    If a program such as `mount' wants to use mtab and finds that it's not
    present (possibly because /var isn't mounted), it should either use
    /proc/mounts instead, or just ignore it.

    > I think part of the problem is that /var is used for both files
    > we want to keep across reboot, and files we do not want to keep
    > across reboot.

    [/var/run is for `non-persistant' files]

    > There are cases where it is undesirable to have mtab in /var,
    > but if mount expect to find mtab somewhere under /var, we can't
    > even use a symlink to get it out of there, because /var needs
    > to be mounted before the symlink can be followed.

    It will simply appear to mount as if the file isn't present, in which
    case it should gracefully stop trying to use it [see above].

    It seems like the attempt here is to somehow make everything just work
    magically _without_ modifying any tools that use mtab -- and I think
    that just isn't doable in every situation.

    Quidquid latine dictum sit, altum viditur.
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:33    [W:0.020 / U:3.544 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site