[xen-tools-discuss] Defining Partitions

Axel Beckert abe at deuxchevaux.org
Sun Oct 31 12:01:41 CET 2010


Hi,

JFTR: Stephane and me are both at MiniDebConf at Paris this weekend
discussing these issues in real life. :-)

On Sun, Oct 31, 2010 at 10:13:47AM +0100, St?phane Jourdois wrote:
>>> Is this a bug or did I forget anything?
>>
>> Both, curiously: You did not order your partitions in "mount" order, and
>> xen-tools neither did :-) So /foo/bar/boot was mounted before /foo/bar,
>> and then the former could not be seen...
>
> Just a quick clarification: mount(8) does the same, ie. it does not  
> order your fstab, it reads it sequentially.

Ok, thanks for looking this up.

> This is even documented in man 5 fstab :
> "The order of records in fstab is important because fsck(8), mount(8),  
> and umount(8) sequentially iterate through fstab doing their thing."
>
> Last bit is that root filesystem is always mounted first in linux, so  
> root cannot overlap others, and only problems are with /foo and /foo/bar  
> filesystems.
>
> I also checked that in util-linux-ng source code.
>
> So... 2 things :
> - the fix is wrong,

Well, not complete and a bit too strict, but not wrong. :-)

> we have to sort @PARTITIONS in the code, not just sort it when
> mounting, because fstab order will also be wrong in domU, even if
> the problem is solved for your use-case ;

Yeah, indeed.

> - perhaps we should just do the same as mount(8), ie. mount root first,  
> but mount others in order. This is a one-liner fix : unshift $part in  
> @PARTITIONS if mountpoint is '/', instead of pushing it.

I agree that this would be the best solution.

Thanks for looking into this and for the patches.

		Kind regards, Axel
-- 
/~\  Plain Text Ribbon Campaign                   | Axel Beckert
\ /  Say No to HTML in E-Mail and News            | abe at deuxchevaux.org  (Mail)
 X   See http://www.asciiribbon.org/              | abe at noone.org (Mail+Jabber)
/ \  I love long mails: http://email.is-not-s.ms/ | http://noone.org/abe/ (Web)


More information about the xen-tools-discuss mailing list