Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Apr 2002 10:01:07 +0930
From:      Greg 'groggy' Lehey <grog@FreeBSD.org>
To:        Toomas Aas <toomas.aas@raad.tartu.ee>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: *invalid* vinum drive
Message-ID:  <20020402100107.F61467@wantadilla.lemis.com>
In-Reply-To: <200204012044.g31KinO06955@lv.raad.tartu.ee>
References:  <200204012044.g31KinO06955@lv.raad.tartu.ee>

next in thread | previous in thread | raw e-mail | index | archive | help
[Format recovered--see http://www.lemis.com/email/email-format.html]

Output lines wrapped.

On Monday,  1 April 2002 at 23:43:56 +0300, Toomas Aas wrote:
> Hello!
>
> After a terrible crash (power loss) my vinum configuration is invalid.
> I have a mirrored volume of two plexes, each plex has one subdisk.
> The physical partitions involved are da0s2e and da1s1e.
>
> At boot time, the following is logged to messages:
>
> Apr  1 23:05:24 kuller /kernel: vinum: No space for  on drive1
>
> This is the weird output of 'vinum list' command:
> ------------------------------------------------------------------------------------------
> kuller# vinum list
> 2 drives:
> D drive0                State: up       Device /dev/da0s2e      Avail: 0/7750 MB (0%)
> D drive1                State: up       Device /dev/da1s1e      Avail: 15499/7750 MB (200%)
> D *invalid*             State: referenced       Device  Avail: 0/0 MB
>
> 1 volumes:
> V mirror01              State: up       Plexes:       2 Size:       7749 MB
>
> 2 plexes:
> P mirror01.p0         C State: up       Subdisks:     1 Size:       7749 MB
> P mirror01.p1         C State: faulty   Subdisks:     1 Size:       7749 MB
>
> 2 subdisks:
> S mirror01.p1.s0        State: stale    PO:        0  B Size:       7749 MB
> S mirror01.p0.s0        State: up       PO:        0  B Size:       7749 MB
> --------------------------------------------------------------------------------------------
>
> /var/log/vinum_history contains nothing out of the ordinary.
>
> But the on-disk configuration is visibly invalid:
>
> this is for da0s2e:
> IN VINOkuller.tlvsisedrive0^_;<&aWEVf{   N^Pvolume mirror01 state up
> plex name mirror01.p0 state up org concat vol mirror01
> plex name mirror01.p1 state up org concat vol mirror01
> sd name mirror01.p0.s0 drive drive0 plex mirror01.p0 len 15871955s driveoffset 2
> 65s state up plexoffset 0s
> sd name mirror01.p1.s0 drive drive1 plex mirror01.p1 len 15871735s driveoffset 2
> 65s state up plexoffset 0s
>
> this is for da1s1e:
> IN VINOkuller.tlvsisedrive1^_;[D<d`WEVf{   Nvolume mirror01 state up
> plex name mirror01.p0 state up org concat vol mirror01
> plex name mirror01.p1 state up org concat vol mirror01
> sd name mirror01.p0.s0 drive drive1 plex mirror01.p0 len 15871955s driveoffset 2
> 65s state up plexoffset 0s
> sd name mirror01.p1.s0 drive *invalid* plex mirror01.p1 len 15871735s driveoffse
> t 265s state up plexoffset 0s
>
> The configuration on da0s2e looks OK (to my inexperienced eye), but the
> configuration on da1s1e is really weird. Can anybody (anybody whose name
> starts with G ;-)) tell me if there is a way to gracefully recover from
> this mess?

Well, it remains a mess.  I'd guess that drive0 went down first, and
there was time for Vinum to note the fact and write the configuration
to drive1.  When you restart, drive1 is more up-to-date, so that
information is taken as valid.  Note that it's very possible that the
two halves of the mirror are out of sync.

> If I read the page http://www.vinumvm.org/vinum/how-to-debug.html
> correctly, I should be able to re-create the objects with 'vinum create'
> and the original data should remain intact (if not already damaged by
> the power loss). Is this correct? Luckily I still have the configuration
> file that I used to create this configuration.

Well, yes.  You've found your configuration on disk, and you recognize
which is correct, so you're as good as home.  Take the good config
information and write:

drive drive0 device /dev/da0s2e
drive drive1 device /dev/da1s1e
volume mirror01 state up
 plex name mirror01.p0 state up org concat vol mirror01
 plex name mirror01.p1 state up org concat vol mirror01
 sd name mirror01.p0.s0 drive drive0 plex mirror01.p0 len 15871955s driveoffset 265s state up plexoffset 0s
 sd name mirror01.p1.s0 drive drive1 plex mirror01.p1 len 15871735s driveoffset 265s state up plexoffset 0s

Remove the "state up" from this file; Vinum will complain otherwise:

drive drive0 device /dev/da0s2e
drive drive1 device /dev/da1s1e
volume mirror01
 plex name mirror01.p0 org concat vol mirror01
 plex name mirror01.p1 org concat vol mirror01
 sd name mirror01.p0.s0 drive drive0 plex mirror01.p0 len 15871955s driveoffset 265s plexoffset 0s
 sd name mirror01.p1.s0 drive drive1 plex mirror01.p1 len 15871735s driveoffset 265s plexoffset 0s

Then stop Vinum, and recreate the configuration with this file.

Greg
--
When replying to this message, please copy the original recipients.
If you don't, I may ignore the reply.
For more information, see http://www.lemis.com/questions.html
See complete headers for address and phone numbers

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020402100107.F61467>