Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Sep 2003 13:52:12 +0200
From:      Stijn Hoop <stijn@win.tue.nl>
To:        freebsd-questions@freebsd.org
Subject:   Re: replace a working vinum drive in RAID-5 config
Message-ID:  <20030910115212.GN89391@pcwin002.win.tue.nl>
In-Reply-To: <20030910101609.GJ89391@pcwin002.win.tue.nl>
References:  <20030910101609.GJ89391@pcwin002.win.tue.nl>

next in thread | previous in thread | raw e-mail | index | archive | help

--qGV0fN9tzfkG3CxV
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Sep 10, 2003 at 12:16:09PM +0200, Stijn Hoop wrote:
> I'm trying to find out how to replace a drive in a vinum RAID-5 volume
> that's still working. I have the following volume (copied by hand, sorry):
>=20
> V local		State: up	Plexes:		1 Size:		167 GB
> P local.p0	     R5 State: up	Subdisks:	4 Size:		167 GB
> S local.p0.s0		State: up	PO:	     0  B Size:		 55 GB
> S local.p0.s1		State: up	PO:	   512 kB Size:		 55 GB
> S local.p0.s2		State: up	PO:	  1024 kB Size:		 55 GB
> S local.p0.s3		State: up	PO:	  1536 kB Size:		 55 GB
>=20
> with s0..s3 on drives locala..d. Drive localc is on device /dev/ad14s1e,
> and that's the IDE disk I want to replace.

Here's what I just did, for the record:

> - boot the system single user
> - enter vinum
> - issue 'start' to read the configuration and start all volumes
> - issue 'stop localc'

this gave me 'can't stop localc: Device Busy(16)'

Strange, because I had done that just before to test this without replacing
the drive, and at that time vinum really responded with:

> - this sets the state of local.p0.s2 to degraded automatically

Anyway, since that didn't appear to work, this time I thought I'd be brave =
and
I just went on:

> - stop vinum
> - halt the system
> - physically replace the drive
> - boot the system single user

I decided to skip the next step until after the 'vinum start':

> - fdisk / disklabel the new drive to include a 55GB sized vinum partition

So I did:

> - enter vinum
> - issue 'start' to read the configuration and start all volumes

Whereupon vinum complained that localc was referenced but non-existant,
and therefore local.p0.s2 was 'crashed' and local.p0 was 'stale' (IIRC).
My volume was still up and contained the data *phew*.

So then I did:

> - fdisk / disklabel the new drive to include a 55GB sized vinum partition

And I had to tell vinum that drive localc was now on that partition,
so I created a text file containing just the line

drive localc device /dev/ad14s1e

and issued

vinum create -f /tmp/drive.conf

And then vinum automatically found that the drive was back, and therefore
local.p0.s2 was 'stale'. After that, the next step was

> - issue 'start local.p0.s2' to revive the subdisk

And vinum started reviving the disk in the background.

To recap the necessary procedure:

- turn off pc
- physically replace drive
- boot single user
- issue 'vinum start'
- fdisk/disklabel new drive to include samesized vinum partition
- create the drive using the old name in the vinum configuration
- 'start' the associated subdisk to begin the revive process

Hope this helps others,

--Stijn

--=20
Nostalgia ain't what it used to be.

--qGV0fN9tzfkG3CxV
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (FreeBSD)

iD8DBQE/XxBsY3r/tLQmfWcRArvNAJ42Gx5FExFVnWkStZoNDIbV72XCCgCeOaLx
Ot0AaEpQyvPA6HhhKSEBM34=
=Mon0
-----END PGP SIGNATURE-----

--qGV0fN9tzfkG3CxV--



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