SUMMARY: not owner of metadevice database

From: Rob McMahon <>
Date: Wed Sep 13 2006 - 05:11:17 EDT
My metaset ended up in this state after a nasty crash (fan failed, over 
> Set name = dkset, Set number = 2
> Host                Owner
>   fserver             No (auto)
> Drive                            Dbase
> /dev/dsk/c3t500805F300171B51d1   No
> Trying to take ownership says
>  > metaset -s dkset -t -f
> metaset: fserver: dkset: not owner of metadevice database
> Exit 1
>  >
Time pressure meant that I had to bite the bullet, thinking at least 
I've got backups if it all goes horribly wrong.  Here's what I did:

Save the current partitioning in case I have to recover later

 > prtvtoc /dev/dsk/c3t500805F300171B51d1 > dkset.vtoc

Check the metadevices are in /etc/lvm/  I don't know of a way to 
recover this if you've not kept this up to date.  I always make sure I do.

Purge the diskset:

 > metaset -s dkset -P

Recreate with myself as a member, and the disk as a device:

 > metaset -s dkset -a -h fserver
 > metaset -s dkset -A enable
 > metaset -s dkset -a c3t500805F300171B51d1

Check the partitioning hasn't changed:

 > prtvtoc /dev/dsk/c3t500805F300171B51d1 | diff dkset.vtoc

Start breathing again.  Recreate metadevices:

 > tail

# dkset/d1 (/export/home/01)
dkset/d1 -m dkset/d10
dkset/d10         1 1 c3t500805F300171B51d1s0

# dkset/d2 (/export/home/02)
dkset/d2 -m dkset/d20
dkset/d20         1 1 c3t500805F300171B51d1s1
 > metainit -s dkset d10
 > metainit -s dkset d20
 > metainit -s dkset d1
 > metainit -s dkset d2
 > metastat -s dkset

(then metattach the sub-mirrors: I haven't actually got any yet) ... and 
I'm back in action.  I hate the bit on the metaset man page where it 
says that if it doesn't like your partitioning it'll repartition it and 
trash all your data.  It talks of slice 6 or 7 starting in cylinder 0 
and being "big enough".  My slice 6 is:

Part      Tag    Flag     First Sector          Size          Last Sector
  6        usr    wu                34         4.01MB           8241

So it probably starts in cylinder 0, though not sector 0, and the man 
page says, for "big enough", it says "the slice is no less than 4 
Mbytes, and probably closer to 6 Mbytes".  Hence my nervousness.  There 
should at least be a flag that tells it only to add the set if the disk 
looks properly formatted.



E-Mail:		PHONE:  +44 24 7652 3037
Rob McMahon, IT Services, Warwick University, Coventry, CV4 7AL, England
sunmanagers mailing list
Received on Wed Sep 13 05:11:48 2006

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:44:00 EST