Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Solaris Volume Manager Question

Status
Not open for further replies.

kHz

MIS
Joined
Dec 6, 2004
Messages
1,359
Location
US
I have one server that was half-done by a contractor a few months ago and now need to be completed.

The rootdev entry in /etc/system is commented out (*); and the /etc/vfstab entries are /dev/dsk/c1t0d0s0 and so forth (not /dev/md/dsk/d0, etc.); but I have meta entries (from metastat -p) that show:
d5 -m d15 d25 1
d15 1 1 c1t0d0s5
d25 1 1 c1t1d0s5
and on for d0 (d10,d20), d1 (d11,d21) , d3 (d13,d23), d4 (d14,d24)

And there are no state database replicas.

Would you say to metadetach and metaclear all mirrors and submirrors and then just start over? To me it doesn't appear that the mirrors/submirrors are even being used since it is booting from c1t0d0s0 there is no rootdev entry in /etc/system. And since there are no state database replicas I think they are leftover entries that should just be cleaned up and then start over (i.e., metadb, metainit, metattach).
 
Hmm... are you saying there is no state database at all? How does that work??

I'd start again from scratch and set it up the way I liked it, if I were you... if it's using underlying devices the mirrors certainly won't be valid.

Annihilannic.
 
Yeah. No state databases at all. And the /etc/fstab is using the disk /dev/dsk/(c?t?d?s?) and not a metadevice (/dev/md/dsk/c?t?d?s?). Plus the rootdev entry in /etc/system is commented out.

That is why I was thinking of running a metadetach and metaclear on all mirrors/submirrors and starting over.

Just want to make sure somebody else is seeing what I am.

Thanks.
 
I'm curious... where does metastat -p obtain that information from then, if there is no state database?

What does it display when you run metadb?

Annihilannic.
 
I would start over from the beginning. Most likely he did a half-ass attempt; fudged something up and never bothered to fix it.

Code:
This is how I setup Disksuite:

1. Install the SDS Disk Packages 
2. Partition the drives in the same exact way. 
prtvtoc /dev/rdsk/cWtXdYs2 | fmthard -s - /dev/rdsk/cAtBdCs2 
3. You need to create to Metadatabases I usually use slice 6 and/or 7 on both drives. If you forgot to create them reboot of a CD-Rom single user mode and steal some from the swap space. 
metadb -a -f 2 cWtXdYs6 cWtXdYs7 cAtBdCs6 cAtBdCs7 
4. vi /etc/lvm/md.tab 
# Slice 0 root drive / 
d10 1 1 /dev/dsk/cWtXdYs0 (Primary) 
d20 1 1 /dev/dsk/cAtBdCs0 (Secondary) 
d0 -m d10 
# Slice 1 root drive swap 
d11 1 1 /dev/dsk/cWtXdYs1 (Primary) 
d21 1 1 /dev/dsk/cAtBdCs1 (Secondary) 
d1 -m d11 
# Slice 3 root drive /var 
d13 1 1 /dev/dsk/cWtXdYs3 (Primary) 
d23 1 1 /dev/dsk/cAtBdCs3 (Secondary) 
d3 -m d13 
# Slice 4 root drive /usr 
d14 1 1 /dev/dsk/cWtXdYs4 (Primary) 
d24 1 1 /dev/dsk/cAtBdCs4 (Secondary) 
d4 -m d14 
# Slice 5 root drive /opt 
d14 1 1 /dev/dsk/cWtXdYs5 (Primary) 
d24 1 1 /dev/dsk/cAtBdCs5 (Secondary) 
d4 -m d14 
5. metainit -a -f 
6. metaroot d0 
7. vi /etc/vfstab 
change all /dev/dsk/cWtXdYs5 and /dev/rdsk/cWtXdYs5 to /dev/md/dsk/dx and /dev/md/rdsk/dx 
8. reboot (Must be performed) 
9. metattach d0 d20 
10. metattach d1 d21 
11. metattach d3 d23 
12. metattach d4 d24 
13. metattach d5 d25 
14. metastat | grep -i resyn 
15. When everything is synced your drives are now fully mirrored
 
Below are the results from metadb and metastat -p:
# metastat -p
d5 -m d15 d25 1
d15 1 1 c1t0d0s5
d25 1 1 c1t1d0s5
d4 -m d14 d24 1
d14 1 1 c1t0d0s4
d24 1 1 c1t1d0s4
d3 -m d13 d23 1
d13 1 1 c1t0d0s3
d23 1 1 c1t1d0s3
d1 -m d11 d21 1
d11 1 1 c1t0d0s1
d21 1 1 c1t1d0s1
d0 -m d10 d20 1
d10 1 1 c1t0d0s0
d20 1 1 c1t1d0s0
# metadb
#

coffeysm - before doing that a metadetach and metaclear would need to be ran first though, even though the metadevices are not being used, to clear up what is there (even though there aren't any state databases?)
 
I agree I was just giving you my procedures in case you did not have any. I read enough of your posts and answers to know you have a clue as to what your doing ;)
 
Thanks for your help!
 
@kHz

what is the output of 'metadb'?

Best Regards, Franz
--
Solaris System Manager from Munich, Germany
I used to work for Sun Microsystems Support (EMEA) for 5 years in the domain of the OS, Backup and Storage
 
daFranze, the output of metadb returns nothing. Hopefully I can run a metadetach and metaclear to get rid of them so I can start over. But since there isn't any state databases I don't know why it sees them and how it could clear them or detach them.

Thanks.
 
kHz, do you know what disk slices the metadb replicas once lived in? (It's possible to clean up using dd ...)
 
I would check your /etc/system file also, you said that the metaroot was commented out. Maybe the genious also commented out the metadb entries in there. I think they would appear similar to this: <b>set md:mddb_blah_blah_blah</b>, also check under /etc/lvm there is some stuff in there.

Otherwise I would try metaclear if that still does not work then I would just comment out all SDS entries in /etc/system:

forceload: misc/md_trans
forceload: misc/md_raid
forceload: misc/md_hotspares
forceload: misc/md_sp
forceload: misc/md_stripe
forceload: misc/md_mirror
set md:mddb_blah_blah_blah

Then re-verify /etc/vfstab and remove the SDS packages then readd them, and start over. I have done that a few times, without any problems.
 
huebs, yes I do know the slices the metadb were on. But the metadb commands doesn't return anything, just the metastat output returns something.

bricenowa, thanks for the link.

coffeysm,
The SDS entries in /etc/system are commented out.

> grep md /etc/system
*forceload: misc/md_trans
*forceload: misc/md_raid
*forceload: misc/md_hotspares
*forceload: misc/md_sp
*forceload: misc/md_stripe
*forceload: misc/md_mirror
*rootdev:/pseudo/md@:0,0,blk

The /etc/lvm/md.cf file does contain the contents of my metastat output.

Even though the /etc/lvm/md.cf file says not to edit by hand, what would be wrong with removing all lines for the metadevices if metaclear doesn't work? The metadevices don't actually exist anyway.

Thanks for all the advice and input!
 
You can probably clear them out and then reboot the system. If I remember correctly I think that is the actual config file the program uses. I am thinking that it got corrupted somehow and SDS was not properly removed or configured correctly. It is strange though that there are no metadb references in your /etc/system file. You could just try re-creating the metadb.

metadb -a -f -c 2 /dev/dsk/cWtXdYsZ /dev/dsk/cWtXdYsZ

Then maybe try the metaclear?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top