[lxc-devel] [patch 4/6] [draft] Add separate interface for mounting

Andrian Nord nightnord at gmail.com
Wed Nov 18 19:04:26 UTC 2009


> Andrian, why are you repeating and requiring whole mntent thing, even
> if not all fields are useful/applicable in our case?

Because i really don't know how it works internally (I have no time to
investigate now). I'll try to look on this some time later, as Daniel
told, that there would be no more applied patches before release, so
I'll have some time for that, I hope.

> For example, the 2 extra fields at the end - they're not used by lxc.
> How about parsing 3 first fields and just ignore the rest?  With this,
> there's no reason to use mntent structure too, since it contains extra
> stuff...

Yes, I've seen that too. As far as I know this is used only by fsck, but
i'm not sure, as I've said before.

> It is a good idea to allow bind-mounts here.  But not a good idea
> at all to allow normal block device mounts.  The reason is simple:
> lack of fsck.  Real fstab gets processed by fsck first and by mount
> next.  Here we don't run fsck pass...  which is quite dangerous.

For 'real' fsck it's true only for ext* systems, if I'm right. Other
filesystems has no internal mount-count or something else (or at least,
I don't know about them and, probably, most users also don't know about
them, if they exists =)). Running autofsck is rc-system task, it's
usually done before read-write remounting, yes, but it's really not
necessary.

First point: you still may specify your volume into hn's /etc/fstab
with noauto option, but valid check request - it will be checked, but
still mounted only when needed. But, probably, you are right here -
there is no much need for such overhead (but there is possibility of
variables ;))

Second: there is a bunch of 'virtual' filesystems, like tmpfs, that are
especially useful in such environment, but requires as-needed mount (and
there is no need of fsck =)).

Anyway, if you are so much against fstab files, there is possibility of
making some kind of 'composite' config values and usage like:
lxc.mount.bind = {/aaa, /bbbb, ro}
lxc.mount.tmpfs = {/ddddd, size=12M}

for most commonly used options. But this is a task for really far and
happy future, I suppose




More information about the lxc-devel mailing list