* Trying to avoid incompatability on a mount enhancement
@ 2015-03-14 22:02 Isaac Dunham
2015-03-16 10:22 ` Karel Zak
0 siblings, 1 reply; 4+ messages in thread
From: Isaac Dunham @ 2015-03-14 22:02 UTC (permalink / raw)
To: util-linux
Hello,
I've been thinking about adding a feature to Busybox mount, but I'd
like to check on options that are already claimed in util-linux so I
don't cause a major incompatability.
The feature I'm thinking about is roughly analogous to "mkdir -p" or
"cpio -d":
it creates the mountpoints if needed.
This could be done by calling mkdir -p, or by calling mkdir() from mount.
The point is to allow one to mount /dev, /sys and all their subsystems
in one pass by using
mount -T /etc/vfstab -a -d
or something like that where /etc/vfstab contains (for example):
===
# Kernel filesystems to mount for bringing up the system
proc /proc proc noexec,nodev,nosuid 0 0
sysfs /sys sysfs noexec,nodev,nosuid 0 0
devfs /dev devtmpfs defaults 0 0
devshm /dev/shm tmpfs nodev,nosuid 0 0
devpts /dev/pts devpts noexec,nodev,nosuid 0 0
===
I'm thinking that the option should be ignored with -o bind,
because that may take a file or a directory.
Do you have any comments about the concept?
As far as I can see, -d, -m, and -p are all available (at least in
the version of util-linux mount that ships in Jessie).
Are there any plans to use any of these options?
Also, is there any interest in seeing this in util-linux mount?
(I'd assume some of the corresponding code would be added to libmount,
but I haven't really looked at util-linux code before--just Busybox and
Toybox mount(8) implementations.)
Thanks,
Isaac Dunham
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Trying to avoid incompatability on a mount enhancement
2015-03-14 22:02 Trying to avoid incompatability on a mount enhancement Isaac Dunham
@ 2015-03-16 10:22 ` Karel Zak
2015-03-16 17:19 ` Isaac Dunham
0 siblings, 1 reply; 4+ messages in thread
From: Karel Zak @ 2015-03-16 10:22 UTC (permalink / raw)
To: Isaac Dunham; +Cc: util-linux
On Sat, Mar 14, 2015 at 10:02:50PM +0000, Isaac Dunham wrote:
> Hello,
> I've been thinking about adding a feature to Busybox mount, but I'd
> like to check on options that are already claimed in util-linux so I
> don't cause a major incompatability.
>
> The feature I'm thinking about is roughly analogous to "mkdir -p" or
> "cpio -d":
> it creates the mountpoints if needed.
man mount:
x-mount.mkdir[=mode]
Allow to make a target directory (mountpoint). The
optional argument mode specifies the filesystem access mode
used for mkdir(2) in octal notation. The default mode is
0755. This functionality is supported only for root users.
... so:
mount /dev/sda1 /mnt/foo -o x-mount.mkdir
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Trying to avoid incompatability on a mount enhancement
2015-03-16 10:22 ` Karel Zak
@ 2015-03-16 17:19 ` Isaac Dunham
2015-03-16 20:23 ` Karel Zak
0 siblings, 1 reply; 4+ messages in thread
From: Isaac Dunham @ 2015-03-16 17:19 UTC (permalink / raw)
To: Karel Zak; +Cc: util-linux
On Mon, Mar 16, 2015 at 11:22:33AM +0100, Karel Zak wrote:
> On Sat, Mar 14, 2015 at 10:02:50PM +0000, Isaac Dunham wrote:
> > Hello,
> > I've been thinking about adding a feature to Busybox mount, but I'd
> > like to check on options that are already claimed in util-linux so I
> > don't cause a major incompatability.
> >
> > The feature I'm thinking about is roughly analogous to "mkdir -p" or
> > "cpio -d":
> > it creates the mountpoints if needed.
>
> man mount:
>
> x-mount.mkdir[=mode]
>
> Allow to make a target directory (mountpoint). The
> optional argument mode specifies the filesystem access mode
> used for mkdir(2) in octal notation. The default mode is
> 0755. This functionality is supported only for root users.
>
>
> ... so:
>
> mount /dev/sda1 /mnt/foo -o x-mount.mkdir
>
Thank you for responding.
I read about that some time after I sent the email; now comes the question
of whether Busybox will accept it.
I've already gotten a comment to the effect that x-mount.mkdir is "ugly"
(no clarifications provided), and that it's lacking the ability to set
owner/group for the mountpoint.
(The individual who opposes this is arguing in favor of adding a similar
but more expanded capability to mdev, the Busybox hotplugger.)
Thanks,
Isaac Dunham
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Trying to avoid incompatability on a mount enhancement
2015-03-16 17:19 ` Isaac Dunham
@ 2015-03-16 20:23 ` Karel Zak
0 siblings, 0 replies; 4+ messages in thread
From: Karel Zak @ 2015-03-16 20:23 UTC (permalink / raw)
To: Isaac Dunham; +Cc: util-linux
On Mon, Mar 16, 2015 at 05:19:59PM +0000, Isaac Dunham wrote:
> On Mon, Mar 16, 2015 at 11:22:33AM +0100, Karel Zak wrote:
> > x-mount.mkdir[=mode]
> >
> > Allow to make a target directory (mountpoint). The
> > optional argument mode specifies the filesystem access mode
> > used for mkdir(2) in octal notation. The default mode is
> > 0755. This functionality is supported only for root users.
> >
> >
> > ... so:
> >
> > mount /dev/sda1 /mnt/foo -o x-mount.mkdir
> >
>
> Thank you for responding.
> I read about that some time after I sent the email; now comes the question
> of whether Busybox will accept it.
>
> I've already gotten a comment to the effect that x-mount.mkdir is "ugly"
Well, x-* prefixes are generic solution for userspace mount options,
we already use it for more things (for example systemd).
> (no clarifications provided), and that it's lacking the ability to set
> owner/group for the mountpoint.
Good point, it would be possible to extend it for example to
x-mount.mkdir[=mode:user:group]
where :user and :group are optional and may be specified by UID/GID
or by username/groupname.
> (The individual who opposes this is arguing in favor of adding a similar
> but more expanded capability to mdev, the Busybox hotplugger.)
I have no clue about busybox hotplugger, for standard udev we
usually don't want to do things like "mount" in udev context.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-03-16 20:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-14 22:02 Trying to avoid incompatability on a mount enhancement Isaac Dunham
2015-03-16 10:22 ` Karel Zak
2015-03-16 17:19 ` Isaac Dunham
2015-03-16 20:23 ` Karel Zak
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.