You are on page 1of 13

2/16/2018 How to Replace the faulty disk in VxVM - UnixRock

About Contact Advertise Usage

Home About Solaris Linux Free-E Books VMWARE-ESX

Labels Search About Me

Home » VxVM » How to Replace the faulty disk in VxVM


Raj Kumar
Follow 158
How to Replace the faulty disk in VxVM V i e w my complete p r o f i l e
Raj Kumar on 13:01 No Comment

In this post we will discussing about most common issue of replacing the faulty VxVM disk in UNIX server.
Every Unix System Admin should gone through this situation where they removing/replacing the faulty VxVM
disk. Here we can see the procedure for replacing the faulty disk through "vxdiskadm" command, however we Unixrock
can also do the same in command line mode which is preferred. 155 likes
Assume that diskgroup "unixrockdg" is having one faultydisk
unixrockdg04 (c3t9d0s2) which needs to be replaced. Let we can do the high
level plan before doing the replacement.
Like Page Share

HIGH LEVEL PLAN:


Step1: Take the Backup of System and Disk Configuration.(Recommended to 1 friend likes this
take cfg2html or explorer)
Step2: Remove the disk from VxVM level by using vxdiskadm utility
Step3: Unconfigure the disk from Os level by using cfgadm command.
Step4: Request to change the faulty disk.
Step5: Configure the disk from Os level by using cfgadm and devfsadm command.
Step6: Replace the disk from VxVM level by using vxdiskadm utility.
Step7: Start the VOLUME and Mount the same.

Let we can start the activity after taking the valid configuration backup.Below output is confirming that
Populars Labels Archive
unixrockdg04(c3t9d0s2) is failed status.
Exam Dumps (1) Interview Questions (3) LDOM (7)
LINUX (6) LVM (1) Performance (1) Solaris 11 (9)

http://www.unixrock.com/2013/09/how-to-replace-faulty-disk-in-vxvm.html 1/13
2/16/2018 How to Replace the faulty disk in VxVM - UnixRock

root@unixrock # vxdisk list Solaris ACL (2) Solaris Basics (16) Solaris
SVM (4) Solaris Zones (5) Troubleshoot (11)
DEVICE TYPE DISK GROUP STATUS
VMware (2) VxVM (7)
c1t0d0s2 sliced rootdisk rootdg online
c1t1d0s2 sliced rootmirr rootdg online
c3t8d0s2 sliced unixrockdg03 unixrockdg online Popular Posts
c3t10d0s2 sliced - - online
c3t11d0s2 sliced unixrockdg01 unixrockdg online How to configure Solaris ROOT mirroring
c3t12d0s2 sliced unixrockdg02 unixrockdg online SVM

- - unixrockdg04 unixrockdg failed was:c3t9d0s2 One of the greatest feature in Solaris is that
really handy disk management software
root@unixrock #
which is inbuilt and it’s called Solaris Volume
Manag...
Remove the failed disk from VxVM with using vxdiskadm command.
How to use SETUID SETGID and
root@unixrock # vxdiskadm Stickybit Permissions
In this post we are going to
Volume Manager Support Operations discuss about three special types
of permissions which can be set for
Menu: VolumeManager/Disk
executable files and public directorie...

1 Add or initialize one or more disks User Management Interview


2 Encapsulate one or more disks Questions
3 Remove a disk Intent of this post is to help the
4 Remove a disk for replacement person who are going to attend the
5 Replace a failed or removed disk basic level of Solaris interview. Few of the
User Admin’s related Q...
6 Mirror volumes on a disk
7 Move volumes from a disk How to Identify Sparse or Whole
8 Enable access to (import) a disk group Root Zones
9 Remove access to (deport) a disk group First question in your mind is to
10 Enable (online) a disk device identify the Non-Global Zone
11 Disable (offline) a disk device whether they Sparse or Whole Root Zone in
12 Mark a disk as a spare for a disk group real time. This post will help y...

13 Turn off the spare flag on a disk


How to Allow Root Direct Login in
14 Unrelocate subdisks back to a disk Solaris 11
15 Exclude a disk from hot-relocation use
In this post we are going to see
16 Make a disk available for hot-relocation use how to allow root direct login on
17 Prevent multipathing/Suppress devices from VxVM's view console in Solaris 11. As we all know, Solaris
18 Allow multipathing/Unsuppress devices from VxVM's view 11 having a restriction ...
19 List currently suppressed/non-multipathed devices
http://www.unixrock.com/2013/09/how-to-replace-faulty-disk-in-vxvm.html 2/13
2/16/2018 How to Replace the faulty disk in VxVM - UnixRock

20 Change the disk naming scheme


Solaris Basic Interview Questions
21 Get the newly connected/zoned disks in VxVM view
Intent of this post is to help the
list List disk information person who are going to attend the
basic level of Solaris interview.
Few of Basic Solaris Admin’s relat...
? Display help about menu
?? Display help about the menuing system How to Replace the faulty disk in
VxVM
q Exit from menus
In this post we will discussing
about most common issue of
Select an operation to perform: 4 replacing the faulty VxVM disk in UNIX server.
Every Unix System Admin shoul...
Remove a disk for replacement
Menu: VolumeManager/Disk/RemoveForReplace How to Configure NTP Server and
Client

Use this menu operation to remove a physical disk from a disk The Network time Protocol (NTP) is
an internet protocol which is useful
group, while retaining the disk name. This changes the state
to synchronize system clocks to coordinate
for the disk name to a "removed" disk. If there are any
with Universal Tim...
initialized disks that are not part of a disk group, you will be
given the option of using one of these disks as a replacement. Solaris - Configuring RBAC
Role-Based Access Control (RBAC)
Enter disk name [,list,q,?] list is a inbuilt security feature in
Solaris which can be assigned to
Disk group: rootdg roles, such as system administrat...

How to Fix the Corrupted GRUB


DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE Solaris X86
In this article we are going to
dm rootdisk c1t0d0s2 sliced 10175 143339136 - discuss about how to fix the
dm rootmirr c1t1d0s2 sliced 10175 143339136 - Corrupted Grub while booting the Solaris X86
server. Last week I have faced t...
Disk group: unixrockdg

DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE

dm unixrockdg01 c3t11d0s2 sliced 9919 143328960 -


dm unixrockdg02 c3t12d0s2 sliced 9919 143328960 -
dm unixrockdg03 c3t8d0s2 sliced 9919 143328960 -
dm unixrockdg04 - - - - NODEVICE

http://www.unixrock.com/2013/09/how-to-replace-faulty-disk-in-vxvm.html 3/13
2/16/2018 How to Replace the faulty disk in VxVM - UnixRock

Enter disk name [,list,q,?] unixrockdg04

The following volumes will be disabled as a result of this


operation:

unixrockvol

These volumes will require restoration from backup.

Are you sure you want do do this? [y,n,q,?] (default: n) y

The requested operation is to remove disk unixrockdg04 from disk group


unixrockdg. The disk name will be kept, along with any volumes using
the disk, allowing replacement of the disk.

Select "Replace a failed or removed disk" from the main menu


when you wish to replace the disk.

Continue with operation? [y,n,q,?] (default: y) y

Removal of disk unixrockdg04 completed successfully.

Remove another disk? [y,n,q,?] (default: n) n

Volume Manager Support Operations


Menu: VolumeManager/Disk

1 Add or initialize one or more disks


2 Encapsulate one or more disks
3 Remove a disk
4 Remove a disk for replacement
5 Replace a failed or removed disk
6 Mirror volumes on a disk
7 Move volumes from a disk
8 Enable access to (import) a disk group
9 Remove access to (deport) a disk group

http://www.unixrock.com/2013/09/how-to-replace-faulty-disk-in-vxvm.html 4/13
2/16/2018 How to Replace the faulty disk in VxVM - UnixRock

10 Enable (online) a disk device


11 Disable (offline) a disk device
12 Mark a disk as a spare for a disk group
13 Turn off the spare flag on a disk
14 Unrelocate subdisks back to a disk
15 Exclude a disk from hot-relocation use
16 Make a disk available for hot-relocation use
17 Prevent multipathing/Suppress devices from VxVM's view
18 Allow multipathing/Unsuppress devices from VxVM's view
19 List currently suppressed/non-multipathed devices
20 Change the disk naming scheme
21 Get the newly connected/zoned disks in VxVM view
list List disk information

? Display help about menu


?? Display help about the menuing system
q Exit from menus

Select an operation to perform: q

Goodbye.

Now we can see the failed disk status as "Removed"

root@unixrock # vxdisk list


DEVICE TYPE DISK GROUP STATUS
c1t0d0s2 sliced rootdisk rootdg online
c1t1d0s2 sliced rootmirr rootdg online
c3t8d0s2 sliced unixrockdg03 unixrockdg online
c3t9d0s2 sliced - - error
c3t10d0s2 sliced - - online
c3t11d0s2 sliced unixrockdg01 unixrockdg online
c3t12d0s2 sliced unixrockdg02 unixrockdg online
- - unixrockdg04 unixrockdg removed was:c3t9d0s2

http://www.unixrock.com/2013/09/how-to-replace-faulty-disk-in-vxvm.html 5/13
2/16/2018 How to Replace the faulty disk in VxVM - UnixRock

Once we removed the disk from VxVM level, we have to remove the faulty disk from OS level by using cfgadm -
c unconfigure .

root@unixrock # cfgadm -c unconfigure c3::dsk/c3t9d0


root@unixrock #

Once its done, we have to replace the faulty disk physically and configure the disk in OS level.

root@unixrock # cfgadm -c configure c3::dsk/c3t9d0


root@unixrock #
root@unixrock # devfsadm -c disk
root@unixrock # echo|format|grep -i c3t9d0
3. c3t9d0 SUN72G cyl 14087 alt 2 hd 24 sec 424
root@unixrock #

Now the disk is available in OS level, we have to get the disk into VxVM control now.

root@unixrock # vxdctl enable


root@unixrock # vxdiskadm

Volume Manager Support Operations


Menu: VolumeManager/Disk

1 Add or initialize one or more disks


2 Encapsulate one or more disks
3 Remove a disk
4 Remove a disk for replacement
5 Replace a failed or removed disk
6 Mirror volumes on a disk
7 Move volumes from a disk
8 Enable access to (import) a disk group
9 Remove access to (deport) a disk group
10 Enable (online) a disk device
11 Disable (offline) a disk device
12 Mark a disk as a spare for a disk group
13 Turn off the spare flag on a disk
14 Unrelocate subdisks back to a disk

http://www.unixrock.com/2013/09/how-to-replace-faulty-disk-in-vxvm.html 6/13
2/16/2018 How to Replace the faulty disk in VxVM - UnixRock

15 Exclude a disk from hot-relocation use


16 Make a disk available for hot-relocation use
17 Prevent multipathing/Suppress devices from VxVM's view
18 Allow multipathing/Unsuppress devices from VxVM's view
19 List currently suppressed/non-multipathed devices
20 Change the disk naming scheme
21 Get the newly connected/zoned disks in VxVM view
list List disk information

? Display help about menu


?? Display help about the menuing system
q Exit from menus

Select an operation to perform: 5

Replace a failed or removed disk


Menu: VolumeManager/Disk/ReplaceDisk

Use this menu operation to specify a replacement disk for a disk


that you removed with the "Remove a disk for replacement" menu
operation, or that failed during use. You will be prompted for
a disk name to replace and a disk device to use as a replacement.
You can choose an uninitialized disk, in which case the disk will
be initialized, or you can choose a disk that you have already
initialized using the Add or initialize a disk menu operation.

Select a removed or failed disk [,list,q,?] list

Disk group: rootdg

DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE

Disk group: unixrockdg

DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE

http://www.unixrock.com/2013/09/how-to-replace-faulty-disk-in-vxvm.html 7/13
2/16/2018 How to Replace the faulty disk in VxVM - UnixRock

dm unixrockdg04 - - - - REMOVED

Select a removed or failed disk [,list,q,?] unixrockdg04

Select disk device to initialize [

,list,q,?] list

DEVICE DISK GROUP STATUS


c1t0d0 rootdisk rootdg online
c1t1d0 rootmirr rootdg online
c3t8d0 unixrockdg03 unixrockdg online
c3t9d0 - - error
c3t10d0 - - online
c3t11d0 unixrockdg01 unixrockdg online
c3t12d0 unixrockdg02 unixrockdg online

Select disk device to initialize [

,list,q,?] c3t9d0

The following disk device has a valid VTOC, but does not appear to have
been initialized for the Volume Manager. If there is data on the disk
that should NOT be destroyed you should encapsulate the existing disk
partitions as volumes instead of adding the disk as a new disk.
Output format: [Device_Name]

c3t9d0

Encapsulate this device? [y,n,q,?] (default: y) n

c3t9d0

Instead of encapsulating, initialize? [y,n,q,?] (default: n) y

http://www.unixrock.com/2013/09/how-to-replace-faulty-disk-in-vxvm.html 8/13
2/16/2018 How to Replace the faulty disk in VxVM - UnixRock

The requested operation is to initialize disk device c3t9d0 and


to then use that device to replace the removed or failed disk
unixrockdg04 in disk group unixrockdg.

Continue with operation? [y,n,q,?] (default: y)

Use a default private region length for the disk?


[y,n,q,?] (default: y)

Replacement of disk unixrockdg04 in group unixrockdg with disk device


c3t9d0 completed successfully.

Replace another disk? [y,n,q,?] (default: n)

Checking the status

root@unixrock # vxdisk list


DEVICE TYPE DISK GROUP STATUS
c1t0d0s2 sliced rootdisk rootdg online
c1t1d0s2 sliced rootmirr rootdg online
c3t8d0s2 sliced unixrockdg03 unixrockdg online
c3t9d0s2 sliced unixrockdg04 unixrockdg online
c3t10d0s2 sliced - - online
c3t11d0s2 sliced unixrockdg01 unixrockdg online
c3t12d0s2 sliced unixrockdg02 unixrockdg online
root@unixrock #

We have successfully replaced the faulty disk. however we have to check the VOLUME status. Below output
"unixrockvol" is disabled status.

root@unixrock # vxprint -hvtg unixrockdg


V NAME RVG KSTATE STATE LENGTH READPOL PREFPLEX UTYPE
PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE
SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE
SV NAME PLEX VOLNAME NVOLLAYR LENGTH [COL/]OFF AM/NM MODE

http://www.unixrock.com/2013/09/how-to-replace-faulty-disk-in-vxvm.html 9/13
2/16/2018 How to Replace the faulty disk in VxVM - UnixRock

DC NAME PARENTVOL LOGVOL


SP NAME SNAPVOL DCO

v unixrockvol - DISABLED ACTIVE 573313024 SELECT - fsgen


pl unixrock-01 unixrockvol DISABLED RECOVER 573315840 CONCAT - RW
sd unixrockdg03-01 unixrock-01 unixrockdg03 0 143328960 0 c3t8d0 ENA
sd unixrockdg04-01 unixrock-01 unixrockdg04 0 143328960 143328960 c3t9d0 ENA
sd unixrockdg01-01 unixrock-01 unixrockdg01 0 143328960 286657920 c3t11d0 ENA
sd unixrockdg02-01 unixrock-01 unixrockdg02 0 143328960 429986880 c3t12d0 ENA
root@unixrock #

I tried below steps make the volume active status.

root@unixrock # vxrecover -s unixrockvol


root@unixrock # vxprint -hvtg unixrockdg
V NAME RVG KSTATE STATE LENGTH READPOL PREFPLEX UTYPE
PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE
SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE
SV NAME PLEX VOLNAME NVOLLAYR LENGTH [COL/]OFF AM/NM MODE
DC NAME PARENTVOL LOGVOL
SP NAME SNAPVOL DCO

v unixrockvol - DISABLED ACTIVE 573313024 SELECT - fsgen


pl unixrock-01 unixrockvol DISABLED RECOVER 573315840 CONCAT - RW
sd unixrockdg03-01 unixrock-01 unixrockdg03 0 143328960 0 c3t8d0 ENA
sd unixrockdg04-01 unixrock-01 unixrockdg04 0 143328960 143328960 c3t9d0 ENA
sd unixrockdg01-01 unixrock-01 unixrockdg01 0 143328960 286657920 c3t11d0 ENA
sd unixrockdg02-01 unixrock-01 unixrockdg02 0 143328960 429986880 c3t12d0 ENA
root@unixrock # vxtask list
TASKID PTID TYPE/STATE PCT PROGRESS
root@unixrock # vxvol -g unixrockdg startall
vxvm:vxvol: ERROR: Volume unixrockvol has no CLEAN or non-volatile ACTIVE plexes
root@unixrock #

Then I follow the below steps in order to make the volume active status.

http://www.unixrock.com/2013/09/how-to-replace-faulty-disk-in-vxvm.html 10/13
2/16/2018 How to Replace the faulty disk in VxVM - UnixRock

root@unixrock # vxmend -g unixrockdg fix stale unixrock-01


root@unixrock # vxmend -g unixrockdg fix clean unixrock-01
root@unixrock # vxvol -g unixrockdg start unixrockvol
root@unixrock #
root@unixrock # vxprint -hvtg unixrockdg
V NAME RVG KSTATE STATE LENGTH READPOL PREFPLEX UTYPE
PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE
SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE
SV NAME PLEX VOLNAME NVOLLAYR LENGTH [COL/]OFF AM/NM MODE
DC NAME PARENTVOL LOGVOL
SP NAME SNAPVOL DCO

v unixrockvol - ENABLED ACTIVE 573313024 SELECT - fsgen


pl unixrock-01 unixrockvol ENABLED ACTIVE 573315840 CONCAT - RW
sd unixrockdg03-01 unixrock-01 unixrockdg03 0 143328960 0 c3t8d0 ENA
sd unixrockdg04-01 unixrock-01 unixrockdg04 0 143328960 143328960 c3t9d0 ENA
sd unixrockdg01-01 unixrock-01 unixrockdg01 0 143328960 286657920 c3t11d0 ENA
sd unixrockdg02-01 unixrock-01 unixrockdg02 0 143328960 429986880 c3t12d0 ENA
root@unixrock #

Then I tried to mount the Volume, but I got below errors

root@unixrock # mount /unixrock


mount: /dev/vx/dsk/unixrockdg/unixrockvol is already mounted, /unixrock is busy,
or the allowable number of mount points has been exceeded
root@unixrock # mount -v|grep -i /unixrock
root@unixrock #

Then i did some breakfix in order to mount the volume

root@unixrock # mv /unixrock /unixrock_old


root@unixrock # mkdir /unixrock
root@unixrock # mount /unixrock
root@unixrock # df -k|grep -i unixrock
Filesystem kbytes used avail capacity Mounted on
/dev/vx/dsk/unixrockdg/unixrockvol

http://www.unixrock.com/2013/09/how-to-replace-faulty-disk-in-vxvm.html 11/13
2/16/2018 How to Replace the faulty disk in VxVM - UnixRock

282176390 29435764 249918863 11% /unixrock


root@unixrock #

Now we have successfully replaced the faulty disk and mounted the volume. Thanks for reading this post.

Next Previous
How to mount ISO image in LINUX server Older Post

Related Posts

1 Comment UnixRock 
1 Login

Sort by Best
 Recommend ⤤ Share

Join the discussion…

LOG IN WITH
OR SIGN UP WITH DISQUS ?

Name

Maradaapa Saroj Pradeep • 3 years ago


hi Rajkumar

I tried to replace a failed drive in my VM when i went through the option 5 by using vxdiskadm and
gave my disk name but it saying bad number. (I removed the disk from my VM Machine using
settings options) for your reference. Please help me how i can proceed further. and its raid5.

--------------------------------------------------------------------------------------------
Select a removed or failed disk [<disk>,list,q,?] list

Disk group: sarojdg

DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE


http://www.unixrock.com/2013/09/how-to-replace-faulty-disk-in-vxvm.html 12/13
2/16/2018 How to Replace the faulty disk in VxVM - UnixRock
DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE

dm disk4 - - - - REMOVED

Disk group: mydg

DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE

Select a removed or failed disk [<disk>,list,q,?] disk4

see more

△ ▽ • Reply • Share ›

ALSO ON UNIXROCK

How to mount ISO image in LINUX server How to check which process is holding the
1 comment • 4 years ago port
Lingeswaran R — NIce nfo... 1 comment • 4 years ago
Balaji Vemula — Hi Raj,After the q2srtream what
is this means "0xffffffff874bc780" and from where
you took this value. can you please suggest on

Administration of Solaris ACL (Access How to Allow Root Direct Login in Solaris 11
Control List) 1 comment • 4 years ago
2 comments • 5 years ago Magwai — hello....am trying to install Oracle
Vivek Raj — Is there a way to figure out who 11gR2 RAC on Solaris 11 using Oracle
changed acl permissions on given directory in Virtualbox, am stucked somewhere when trying to
some sort of logs ?

Copyright © 2012 UnixRock All Right Reserved


Designed by IVYthemes | MKR Site

http://www.unixrock.com/2013/09/how-to-replace-faulty-disk-in-vxvm.html 13/13

You might also like