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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

metadevice questions

Status
Not open for further replies.

nychris

MIS
Dec 4, 2004
103
US
I have a Solaris 6 server where the disks used in each metadevice does not correspond to the real disk numbers. For example, most of the disks that are part of metadevices start with c2tXdXsX, while the actual disk names in the system are c1tXdXsX. I believe this was caused by a hardware change that probably happened somewhere along the line. The metadevices still work somehow, but I'm not sure why or how they still work. I found out about this when one of the devices needed maintenance and I ran the metareplace command....

Code:
bash-2.05# metareplace -e d1 c2t5d0s3
metareplace: earthquake: c2t5d0s3: No such file or directory

The new disk name would be c1t5d0s3. I need to fix all of these for each metadevice. Here's an example of one...

Code:
d1: RAID
    State: Needs Maintenance
    Invoke: metareplace d1 c2t5d0s3 <new device>
    Interlace: 64 blocks
    Size: 100615336 blocks
Original device:
    Size: 100617984 blocks
        Device              Start Block  Dbase State        Hot Spare
        c2t5d0s3                5362     No    Maintenance
        c2t5d1s3                5362     No    Okay
        c2t5d3s3                5362     No    Okay
        c2t5d4s3                5362     No    Okay

What is the best way to recreate this RAID 5 mirror? Replace the disk, boot into single user mode, unmount the device, metaclear the d1 metadevice, ....but then I'm not sure of the commands I should run from there for RAID 5. I know how to take care of the mirrors, but not the RAID devices.

How are these devices still working when they are referencing disk names that do not exist anymore?

What, besides a defective disk, causes metadevices to require maintenance? This happens often, and a lot of times simply running the metareplace command fixes the situation.

Thanks for the help!
 
Code:
bash-2.05# metareplace -e d1 c2t5d0s3
metareplace: earthquake: c2t5d0s3: No such file or directory
How are these devices still working when they are referencing disk names that do not exist anymore?

hmm, never seen something like this, double check the format output, /etc/path_to_inst and the entries in /dev and /devices; a reconfigure boot is not the worst idea (pls have good backups, since this is an essential operation)

What is the best way to recreate this RAID 5 mirror? Replace the disk, boot into single user mode, unmount the device, metaclear the d1 metadevice, ....but then I'm not sure of the commands I should run from there for RAID 5. I know how to take care of the mirrors, but not the RAID devices.

it's just like with mirrors:
Code:
metareplace -e [i]metadevice physicaldevice[/i]

You can drop a RAID5 device and set it up again with
Code:
metainit [i]metadevice[/i] -r [i]physicaldevices[/i] -k
without initialising the RAID5. You might use this on your strange devicetree. But again: have good backups since these changes may destroy data.

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
 
I'd check your state db's. Run metadb -i and look at which devices are in use for your state databases. Also run metastat to see what devices that are registered. When disks in your metadevices have updated in the past, perhaps the disks that you added were from a different controller. Then perhaps the state databases recorded this information but it still displays as the original device. Seems strange. I'd recreate your state databases using your new device names and recreate your metadevices with the new configuration (raid 5 or whatever).


Good luck.
Jeff

 
I resolved this problem last week. Here's a quick summary:

- perform backups
- single user mode
- metaclear all devices
- recreate all metadevices without failed disks and resynch data
- shut down the server to replace the two failed disks
- the two RAID5 metadevices with the failed disk in each had to be recreated and have the backups restored
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top