[systemd-devel] systemd-fstab-generator and multiple mounts to same mount point

John Lane systemd at jelmail.com
Tue Jan 15 07:41:15 PST 2013


On 04/01/13 02:56, Peeters Simon wrote:
>
> I think one of the only usecase for this kind of overmounting is to bind mount
> a subdir of  a mountpoint on top of that mountpoint: (as in Johns original post)
> mount /dev/somedev /images
> mount --bind /images/1354 /images
>
> so it might be a solution to add a BindSubdir= option to the unit file
> like this:
> [Mount]
> What=/dev/somedev
> Where=/images
> BindSubdir=1354
>
> So that multiple mount units for the same mount point are not needed.
> I think this is a quiet clean solution, but anyhow just my 2c.
>
>
> Simon
>

I would agree with Simon's suggestion. Such a 'BindSubdir' option would 
satisfy my use case. I can try and write a patch to implement a Bind 
option if this solution would be acceptable ?

(meanwhile, I've updated my original patch for the current source tree 
to keep it up to date).

Are there any further thoughts on this?

Thanks,
John



More information about the systemd-devel mailing list