How to replace failed root disk under Solaris Volume Manager (SVM ...

December 18, 2017 | Author: Anonymous | Category: Solaris
Share Embed


Short Description

11/12/2014 How to replace failed root disk under Solaris Volume Manager (SVM) THE GEEK DIARY SOLARIS SOLARIS 11 ZONES LD...

Description

11/12/2014

How to replace failed root disk under Solaris Volume Manager (SVM)

THE GEEK DIARY SOLARIS

SOLARIS 11

ZONES

LDOMS

VCS

LINUX

INTERVIEW QUESTIONS

How to replace failed root disk under Solaris Volume Manager (SVM) 1  Share

6  Share

1  Tweet

1  Share

How to replace a disk under ZFS in Solaris Replacing a failed disk under VxVM

In the last post we discussed about replacing failed disk in ZFS. Now let us see some of the examples of replacing failed root disk under Solaris volume manager. Note that the failed root disk is under a mirrored configuration.

Replacing the failed root disk Consider the mirrored root disk configuration as shown below containing the root and swap mirrors and sub mirrors. As shown the disk c1t0d0 is failed causing the root and swap sub mirrors (d11 and d1) to be in maintenance state.

Get Your Cloud Together A Single Integrated Platform to Do Anything! We Offer True Flexibility

http://thegeekdiary.com/how­to­replace­failed­root­disk­under­solaris­volume­manager­svm/

1/6

11/12/2014

How to replace failed root disk under Solaris Volume Manager (SVM)

# metastat ‐c d10              m  6.0GB d11 (maint) d12         ‐‐‐ swap     d11          s  6.0GB c1t0d0s1 (maint)     d12          s  6.0GB c1t1d0s1 d0               m  74GB d1 (maint) d2            ‐‐‐ root     d1           s  74GB c1t0d0s0 (maint)     d2           s  74GB c1t1d0s0

1. First thing is to remove the sub mirrors in maintenance state. use the metadetach command to detach the failed submirrors : Syntax : # metadetach [mirror] [sub‐mirror]

Detach the sub­mirrors d11 and d1 : # metadetach d10 d11 # metadetach d0 d1

2. Next is to remove any metadb on the failed disk. Check for the metadbs configured in the system. # metadb         flags           first blk       block count      a        u         16              8192            /dev/dsk/c1t0d0s7      a        u         8208            8192            /dev/dsk/c1t0d0s7      a        u         16400           8192            /dev/dsk/c1t0d0s7      a        u         16              8192            /dev/dsk/c1t1d0s7      a        u         8208            8192            /dev/dsk/c1t1d0s7      a        u         16400           8192            /dev/dsk/c1t1d0s7

As shown above remove the 3 metadbs on c1t0d0s7 slice. # metadb ‐d c1t0d0s7

3. We need to remove the disk from the OS before physically removing it from the server. Refer the below post to remove the disk using cfgadm or luxadm. How to remove a failed disk using luxadm and cfgadm

4. Now add the new disk and run devfsadm to scan for the newly added disk. # devfsadm http://thegeekdiary.com/how­to­replace­failed­root­disk­under­solaris­volume­manager­svm/

2/6

11/12/2014

How to replace failed root disk under Solaris Volume Manager (SVM)

5. Once the disk is detected we need to copy the VTOC table from the c1t0d0 to the newly added disk using the fmthard command : # prtvtoc /dev/rdsk/c1t0d0s2 | fmthard ‐s ‐ /dev/rdsk/c1t1d0s2    fmthard:  New volume table of contents now in place.

6. Install the bootblk on slice 0 of the new disk. # installboot /usr/platform/sun4u/lib/fs/ufs/bootblk /dev/rdsk/c1t1d0s0

7. Add the metadbs we deleted. # metadb ‐afc 3 c1t0d0s7

8. Update the device ID in the SVM database. # metadevadm ‐u c1t0d0    Updating Solaris Volume Manager device relocation information for c1t0d0    Old device reloc information:        id1,sd@n5000cca000368d24    New device reloc information:        id1,sd@n5000c500052fb987

9. Attach the detach sub mirrors using the metaattach command. The syntax to do so is : Syntax : # metattach [mirror] [submirror]

This would start the re­sync sub mirrors. # metattach d10 d11 # metattach d0 d1

10. In case you did not detach the sub mirrors in step 1, run the metereplace command to start the sync which will return the sub mirrors to the ‘Okay’ state: # metareplace ‐e d0  c1t0d0s0    d0: device c1t0d0s0 is enabled # metareplace ‐e d10  c1t0d0s1    d10: device c1t0d0s1 is enabled

11. To check the synching status use metastat ­c command : # metastat ‐c d10              m  6.0GB d11 (resync‐53%) d12     d11          s  6.0GB c1t0d0s1 http://thegeekdiary.com/how­to­replace­failed­root­disk­under­solaris­volume­manager­svm/

3/6

11/12/2014

How to replace failed root disk under Solaris Volume Manager (SVM)

    d12          s  6.0GB c1t1d0s1 d0               m  74GB d1 (resync‐27%) d2     d1           s  74GB c1t0d0s0     d2           s  74GB c1t1d0s0

To continuously check the status of sync every 10 seconds use : # while true; do metastat | grep done; sleep 10; done

For x86/x64 hardware In case of a x86/x64 hardware, we need to do some extra steps for the disk replacements. First we need to create a new partition with fdisk before we can copy the VTOC table from the disk c1t1d0. # fdisk ‐b /usr/lib/fs/ufs/mboot /dev/rdsk/c1t0d0p0 No fdisk table exists. The default partition for the disk is:   a 100% "SOLARIS System" partition Type "y" to accept the default partition,  otherwise type "n" to edit the  partition table. y

Secondly, we need to install grub instead of bootblk onto the new disk. # /sbin/installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c1t0d0s0

How to replace a disk under ZFS in Solaris Replacing a failed disk under VxVM

Filed Under: SVM

http://thegeekdiary.com/how­to­replace­failed­root­disk­under­solaris­volume­manager­svm/

4/6

11/12/2014

How to replace failed root disk under Solaris Volume Manager (SVM)

Related Posts Solaris Volume Manager (SVM) command line reference (Cheat Sheet) The ultimate Solaris Volume Manager (SVM) interview questions Solaris Volume Manager (SVM) : Growing mirrored metadevices online SVM : How to un­encapsulate root disk (SPARC) Solaris Volume Manager (SVM) : Growing concat metadevice

LOAD COMMENTS

Search the blog ...

Thegeekdiary Like You like this.

You and 336 others like Thegeekdiary.

MEET THE GEEK India based Unix Admin, Cloud Evangelist and a Virtualization lover. I am Sandeep Patil. I work as a Unix Administrator and love playing around with Solaris and various other virtualization and HA solutions. Read More…

Sandeep P Follow 157 followers

@patilsandeep911 http://thegeekdiary.com/how­to­replace­failed­root­disk­under­solaris­volume­manager­svm/

5/6

11/12/2014

How to replace failed root disk under Solaris Volume Manager (SVM)

GET YOUR FREE E­BOOK Download the FREE ebook ­ The Complete Oracle Hardware reference Enter your email

SUBSCRIBE

AR C H IVES

C ON TAC T U S

http://thegeekdiary.com/how­to­replace­failed­root­disk­under­solaris­volume­manager­svm/

C OPYR IGH T

6/6

View more...

Comments

Copyright © 2017 DATENPDF Inc.