Check your Metastats….
# metastat -p
d60 -m d61 d62 1
d61 1 1 c0t0d0s6
d62 1 1 c0t1d0s6
d20 -m d21 d22 1
d21 1 1 c0t0d0s1
d22 1 1 c0t1d0s1
d10 -m d11 d12 1
d11 1 1 c0t0d0s0
d12 1 1 c0t1d0s0
1. Detach Sub-mirrors
First, we need to break the mirror, by removing all of the sub-mirrors that are contained on c0t1d0. In our case, we have mirrors d60,d20,d10 and there sub-mirrors followed by next two numbers eg. d61,d62
# metadetach d10 d12
# metadetach d20 d22
# metadetach d60 d62
This will removes submirror from mirrors.
2. de-metaroot
The proper way to create a mirrored root volume is to use the metaroot tool to modify /etc/vfstab and /etc/system for you. The good thing about this is that you can use the same tool to to de-configure it too. Keeping in mind that we want our root slice to be c0t0d0s0, we run:
# metaroot /dev/dsk/c0t0d0s0
3. Update vfstab
Now, we need to edit /etc/vfstab and replace all of the mirror device mounts with their c0t0d0 counterparts. If your original vfstab looked like this:
bash-3.2# cat /etc/vfstab
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
fd – /dev/fd fd – no –
/proc – /proc proc – no –
/dev/md/dsk/d20 – – swap – no –
/dev/md/dsk/d10 /dev/md/rdsk/d10 / ufs 1 no –
/dev/md/dsk/d60 /dev/md/rdsk/d60 /weblogic ufs 2 yes –
/devices – /devices devfs – no –
sharefs – /etc/dfs/sharetab sharefs – no –
ctfs – /system/contract ctfs – no –
objfs – /system/object objfs – no –
swap – /tmp tmpfs – yes –
…
Then your new vfstab should look something like this:
…
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
fd – /dev/fd fd – no –
/proc – /proc proc – no –
/dev/dsk/c0t0d0s1 – – swap – no –
/dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no –
/dev/dsk/c0t0d0s6 /dev/rdsk/c0t0d0s6 /weblogic ufs 2 yes –
/dev/dsk/c0t1d0s6 /dev/rdsk/c0t1d0s6 /data01 ufs 2 yes –
/devices – /devices devfs – no –
sharefs – /etc/dfs/sharetab sharefs – no –
ctfs – /system/contract ctfs – no –
objfs – /system/object objfs – no –
swap – /tmp tmpfs – yes —
…
4. Configure your Dump Device
Here’s the caveat for mirrored swap – you’re probably using /dev/md/dsk/d5 for your dump device. Let’s fix that now. First run
dumpadm | grep ‘/md/’
If that returns any output, then run this (using your single-disk slice for swap):
dumpadm -s /var/crash/`hostname` -d /dev/dsk/c0t0d0s1
5. Reboot and Verify
Cross your fingers, and do a
init 6
Once you’re back up, look at the output of
df -h && swap -l
and make sure there’s no references to any ‘md’ devices.
6. Remove the Mirrors, Remaining Sub-mirrors, and MetaDB’s
Now that we are running in a single disk environment, we need to remove the mirrors and submirrors. Again, ripe for a one-liner:
# metaclear -r d10
# metaclear -r d20
# metaclear -r d60
At this point, ‘metastat’ should return no mirrors. Now, we can remove the metadb’s from slice 7 on both disks. Only do this if you’re not using SVM for anything else!
You can verify your metadb…
bash-3.2# metadb –i
Now Remove…..
metadb -df /dev/dsk/c0t1d0s7
metadb -df /dev/dsk/c0t0d0s7