[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [atomic-devel] Running docker-storage-setup from a UI

On Mon, Apr 18, 2016 at 12:02:49PM +0300, Marius Vollmer wrote:
> Vivek Goyal <vgoyal redhat com> writes:
> > On Fri, Apr 15, 2016 at 02:46:24PM +0300, Marius Vollmer wrote:
> >
> >> Sorry, I was talking about d-s-s.  Do you think it is a bug in d-s-s
> >> that pvcreate might prompt during its run and make it fail in a
> >> non-interactive use?
> >
> > No it is not a bug. If user provided a disk to dss which alrady has
> > signatures from other tools, we will not use that disk for thin
> > pool. One needs to wipe all the signatures and then provide that disk
> > to dss.
> Just to repeat this (and then I shut up :-), in my case pvcreate found a
> obsolete and unaccessible signature somewhere in the middle of a disk
> that didn't have a partition table and looked empty to everyone involved
> when it was given to d-s-s.  The disk did not contain a xfs partition,
> just a random, left-over signature that happened to be at the right
> place for the partition that d-s-s has created.

Ok, I am playing with it more and trying to understand it better.

So If I create a partition say /dev/sdb1 and create "mkfs.xfs /dev/sdb1"
and later remove partition /dev/sdb1 (which will leave xfs signature
somewhere around 2048 sector by default) and then pass disk /dev/sdb
to pvcreate, it only complains about dos signature (if it is present). It
does not care about if there is any other signature later in the disk.

I guess may be wipefs has internal defaults and that xfs signature does
not even appear in the list. But if I re-create partition table and
do "wipefs /dev/sdb1" suddenly that xfs signautre becomes visible to
wipefs as well as pvcreate and now pvcreate refuses to create partition.

IOW, if wipefs finds a signature, pvcreate will complain otherwise
it will not. And as dss creates a partition on disk, we make that
signature visible to wipefs which was not visible otherwise.

Even if we do "wipefs -a /dev/sda" on whole disk in the beginning it will not
help because at that point of time wipefs only lists partition table
signature and not xfs signature. So pvcreate will still fail.

So I still feel that by default we need to be defensive and if we find
a signature at any point of time, we bail out. And implement an option to
override this behavior where we will wipe-out/ignore signature found
and continue with the operation.

> > dss being a service does not mean it will automatically wipe off any
> > exisitng signatures on disk. It is very risky. I am not sure why are
> > you taking it so lightly.
> Because the current behavior of d-s-s in this area feels more like an
> accident than design, and I had assumed it was unintended.

I had not thought about it much till now. Now you have run into it, good
we are discussing the details now and coming up with a defined behavior.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]