Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Mar 2018 12:39:18 +0200
From:      Andriy Gapon <avg@FreeBSD.org>
To:        Eugene Grosbein <eugen@grosbein.net>, FreeBSD Stable <freebsd-stable@FreeBSD.org>
Cc:        Alexander Motin <mav@freebsd.org>
Subject:   Re: GEOM strange error
Message-ID:  <b2237e86-637d-262c-39d2-bc4ab0d259f9@FreeBSD.org>
In-Reply-To: <5AA79BBC.70009@grosbein.net>
References:  <5AA79BBC.70009@grosbein.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 13/03/2018 11:37, Eugene Grosbein wrote:
> Hi!
> 
> Let's create a stripe and GPT over it using test files as backing store:
> 
> truncate -s 1G d0
> truncate -s 1G d1
> mdconfig -af d0		# gives md0
> mdconfig -af d1		# gives md1
> 
> gpart create -s GPT md0
> gpart create -s GPT md1
> gpart destroy -F md1
> gpart destroy -F md0	# no errors still
> 
> gstripe label -s $((128*1024)) st0 md0 md1
> gpart create -s GPT /dev/stripe/st0
> dmesg -a
> 
> GEOM_STRIPE: Device st0 created (id=4000112224).
> GEOM_STRIPE: Disk md0 attached to st0.
> GEOM_STRIPE: Disk md1 attached to st0.
> GEOM_STRIPE: Device stripe/st0 activated.
> GEOM: md0: corrupt or invalid GPT detected.
> GEOM: md0: GPT rejected -- may not be recoverable.
> 
> Why does it emit such md0-related error?

When GPT is placed on st0 it's opened for writing and, thus, md0 and md1 are
open for writing too.  Afterwards, the write access count is cleared from three
of them and that triggers re-tasting.  I guess that g_part code tries to taste
md0 and md1 and sees the GPT label at the start of md0 and the label is
correctly rejected because it's inconsistent with md0's parameters.

-- 
Andriy Gapon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b2237e86-637d-262c-39d2-bc4ab0d259f9>