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

John Lane systemd at jelmail.com
Thu Jan 3 09:18:27 PST 2013


On 03/01/13 16:40, Tom Gundersen wrote:
> On Thu, Jan 3, 2013 at 5:16 PM, John Lane <systemd at jelmail.com> wrote:
>> Hello. Here is a patch to allow systemd to handle overmounts defined in
>> /etc/fstab.
>>
>> https://raw.github.com/johnlane/archlinux-systemd/master/fstab-overmount.patch
> Please use spaces rather than tabs ;-)
I thought I did. I hate tabs too :)
>> It appends a suffix (an underscore followed by a number) to a mount unit
>> file name when one already exists.
> Hm, I didn't look carefully, but won't this break if you have a folder
> named, say, "/mnt_1"? I suppose you could use some unused escape code
> similarly to how '/' is encoded?
No, it's fine. I just tested it to make sure. It looks for the _ 
delimiter from the right-hand end of the name so it's ok (because all 
that can come to the right of it is a number and '.mount'.
>
>> This allows the mount unit file to be generated. The mount routine
>> is modified to consider the
>> suffix when checking that the mount point and unit file names match.
> How are you making sure that the mounts are stacked in the right
> order? You'd want to order mounts that are 'higher' in the stack
> After= the mounts that are lower down (in the same way as home.mount
> is now ordered After=-.mount).
I haven't considered that (I haven't modified the code to put in an 
"after") but I've been using it
all day and it seems to get them in the right order. If I have time I'll 
see if I can work out how to
stick in an "After" to point at the previous mount.
>> If I should submit this in some other way please let me know. Sorry I am not
>> more familiar with your process.
> Use 'git send-email', that way people can comment inline (and you
> avoid linke-break problems that usually results from pasting the patch
> into your email client).
>
> Cheers,
>
> Tom
>



More information about the systemd-devel mailing list