setup-storage fails on blank disk

Brian Kroth bpkroth at gmail.com
Thu Jan 4 16:12:51 CET 2018


Ages ago I recall having a similar problem to that as well.  I think it was
a bug with the preserver_reinstall flag not working correctly with LVM
setups on fresh disks.  Pretty sure I ended up writing a hack that executed
early on in the classes phase to figure out if the disk was lacking a label
(partition table) and then creating one and setting the reinstall flag to
force the disk layout down.  Unfortunately I don't easily have access to
that code anymore, else I'd share it.  Also, it may no longer be
applicable.  setup-storage has changed a lot since then.

Cheers,
Brian

On Thu, Jan 4, 2018 at 8:41 AM, Justin Cattle <j at ocado.com> wrote:

> Hi,
>
>
> Are you 100% sure you tried it on a "fresh" disk that was really clean?
> It defiantly feels like there is some metadata or something remaining in
> some blocks on the disk.
>
> When FAI fails, are you able check for things like md info, dm info, lvm
> info and the like?
>
> You may have to do some dmsetup remove, vgremove or pvremove.
> wiptefs is also a good utility at clearing metadata, run it against any
> partitions before removing them.
> Then remove partitions with dd, put some zeros on the first few Mg of the
> disk.
>
>
>
>
> Cheers,
> Just
>
> On 4 January 2018 at 13:47, Andreas Heinlein <aheinlein at gmx.com> wrote:
>
>> Am 03.01.2018 um 17:28 schrieb Holger Parplies:
>> > Hi,
>> >
>> > Andreas Heinlein wrote on 2018-01-03 13:53:40 +0100 [setup-storage
>> fails on blank disk]:
>> >> [...]
>> >> I have encountered a problem with setup-storage which occurs only when
>> >> the disk is blank, i.e. wiped with nwipe/dban or brand new. It then
>> >> fails on creating the LVM; running 'pvcreate' returns 'cannot open
>> >> /dev/sda5 exclusively'.
>> > this is probably unrelated, but is there any reason to put the LVM PV
>> inside
>> > a "logical" volume? DOS extended partitions seem to be the worst hack
>> ever
>> > invented to get around a limitation in a bad design, yet they repeatedly
>> > and apparently unnecessarily pop up in quoted disk_configs:
>> >
>> >> [...]
>> >> This is your disk_config file:
>> >> # generic disk configuration for one small disk
>> >> # disk size from 500Mb up to what you can buy today
>> >> #
>> >> # <type> <mountpoint> <size in mb> <fstype> <mount options>  [extra
>> options]
>> >>
>> >> disk_config disk1 disklabel:msdos bootable:1 preserve_lazy:6
>> align-at:1M fstabkey:uuid
>> >> primary  /boot              300      ext4    rw      createopts="-O
>> ^64bit,^metadata_csum"
>> >> logical  -          29500-30000      -       -
>> >> logical  /media/daten  1024- ext4    acl     createopts="-O
>> ^64bit,^metadata_csum -L Daten"
>> > I count three partitions, which would work perfectly with primary
>> partitions
>> > (furthermore, you are using LVM to have an arbitrary number of named and
>> > dynamic "volumes" (i.e. partitions) anyway, so if you needed more, LVM
>> would
>> > be the superior mechanism; of course, your specific requirements may
>> vary).
>> > Ok, you are preserving a logical partition, so in this particular case
>> you'd
>> > actually need to stick with logical partitions, but the partition in
>> question
>> > is ext4, not FAT-based, so it doesn't appear to be a legacy Windoze
>> issue.
>> >
>> > My point: am I missing something, and there is some obscure benefit of
>> putting
>> > an LVM container within an extended-partition-container (such as hiding
>> it
>> > from something), or is it simply a common misconception that you for
>> some
>> > reason cannot or should not put an LVM PV (or even several individual
>> native
>> > Linux partitions - such as /, /var and /tmp) into primary partitions -
>> > assuming you only need upto four of them (and, obviously, assuming you
>> are
>> > still using MSDOS partition tables)?
>> >
>> > Or, differently: for a *blank disk*, you obviously won't be preserving
>> sda6,
>> > and you probably aren't referencing it by partition number
>> ("fstabkey:uuid"),
>> > so does using 'primary' instead of 'logical' for all three partitions
>> change
>> > anything concerning the error you are experiencing?
>> >
>> > Hope that helps someone (perhaps me ;-) ...
>> >
>> > Regards,
>> > Holger
>> Hello,
>>
>> yes, you are right - in some way, this *is* a legacy windows issue that
>> has developed over time. In fact, the preserved partition once was a FAT
>> partition as long as we had dualboot installations on these machines. We
>> finally removed the dualboot two or three years ago and chose to format
>> this partition ext4 instead. Why we didn't move to primary partitions or
>> put it within the LVM at that time - I don't know.
>>
>> On the other hand, up to now we had no problems with that, so no urge to
>> change anything. If you think it might help, I could try changing this.
>>
>> Bye,
>> Andreas
>>
>
>
> Notice:  This email is confidential and may contain copyright material of
> members of the Ocado Group. Opinions and views expressed in this message
> may not necessarily reflect the opinions and views of the members of the
> Ocado Group.
>
>
>
> If you are not the intended recipient, please notify us immediately and
> delete all copies of this message. Please note that it is your
> responsibility to scan this message for viruses.
>
>
>
> Fetch and Sizzle are trading names of Speciality Stores Limited and Fabled
> is a trading name of Marie Claire Beauty Limited, both members of the Ocado
> Group.
>
>
>
> References to the “Ocado Group” are to Ocado Group plc (registered in
> England and Wales with number 7098618) and its subsidiary undertakings (as
> that expression is defined in the Companies Act 2006) from time to time.
> The registered office of Ocado Group plc is Buildings One & Two, Trident
> Place, Mosquito Way, Hatfield, Hertfordshire, AL10 9UL.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20180104/f19a9f08/attachment-0001.html>


More information about the linux-fai mailing list