maas-devel team mailing list archive
-
maas-devel team
-
Mailing list archive
-
Message #01858
Re: Which disk is the root disk (Juju + MAAS)
On Wed, 30 Jul 2014, Mark Shuttleworth wrote:
>
> Interesting - at this stage I don't think we're modelling storage in
> MAAS, so I would have thought the choice of root disk was entirely done
> by curtin. Scott M cc'd for curtin commentary.
>
> It *might be* that:
>
> * curtin comes up on the machine and picks /dev/sda
> * it writes an fstab with the UUID of that disk (not "/dev/sda"), e.g.
>
> $ cat /etc/fstab
> LABEL=cloudimg-rootfs / ext4 defaults 0 0
>
> - it does not write anything which explicitly maps that UUID to sda
>
> * the machine reboots
> * in this case whatever assigns disk device names sees a different disk
> first, becoming sda, and the labelled disk second, which it marks as sdb
>
> Either way the charm should *handle* an sdb root disk, but yes, we
> shouldn't move disks around like that unexpectedly.
curtin probably did install to what it thought was the first disk. 2
things then are possible from there:
a.) disks came up in a different order on reboot, but the LABEL=
successfully did find the root disk, which is good.
b.) disks came up in the same order, but existing LABEL of
cloudimg-rootfs and *its* undefined order made root be /dev/sdb.
I dont suspect this, though as it would have resulted in bad juju
user-data, and probably fail to boot.
So it surely would have seemed like 'a'. I'm not sure exactly what we can
do about that.
There are definitely ways of finding devices by a more consistent path.
Ie, you can use /dev/disk/by-lable or /dev/disk/by-uuid, but i don't know
that you can easily guarantee that a given block device (possibly by its
path) will be /dev/sda and another will be /dev/sdb.
Certainly the charm can be made more generic to find an "empty" device
rather than picking /dev/sdb.
>
> Mark
>
>
> On 30/07/14 15:13, David Britton wrote:
> > Hi MAASers --
> >
> > I deployed a charm yesterday (swift-storage) to Juju + MAAS, and the
> > disk obtained for root was '/dev/sdb', which caused an issue in the
> > swift-storage charm:
> >
> > https://bugs.launchpad.net/charms/+source/swift-storage/+bug/1350049
> > https://bugs.launchpad.net/charms/+source/swift-storage/+bug/1350051
> >
> > I searched around for any contract inherent in Juju+MAAS and couldn't
> > find one.
> >
> > Is it expected that /dev/sda will be the root disk? Was this case I had
> > a valid bug?
> >
>
>
>
Follow ups
References