Tuesday, July 31, 2012

Replacing a disk in zpool

Replacing a disk in zpool using a new disk.



(PhyHost1:/)# zpool status zone1-pool
  pool: zone1-pool
 state: ONLINE
status: The pool is formatted using an older on-disk format.  The pool can
        still be used, but some features are unavailable.
action: Upgrade the pool using 'zpool upgrade'.  Once this is done, the
        pool will no longer be accessible on older software versions.
 scrub: resilver completed after 0h4m with 0 errors on Mon Apr 16 21:02:41 2012
config:

        NAME                        STATE     READ WRITE CKSUM
        zone1-pool                  ONLINE       0     0     0
          c2t60050974071C599Cd84s2  ONLINE       0     0     0  4.80G resilvered

errors: No known data errors
(PhyHost1:/)#


New disk

(PhyHost1:/)# ls -l /dev/rdsk/c2t60050974071C599Cd165s2
lrwxrwxrwx   1 root     root          76 Apr 18 16:11 /dev/rdsk/c2t60050974071C599Cd165s2 -> ../../devices/pci@fc,600000/SUNW,qlc@1/fp@0,0/ssd@w50000974081b599c,a5:c,raw
(PhyHost1:/)# /etc/vx/diag.d/vxdmpinq /dev/rdsk/c2t60050974071C599Cd165s2

Inquiry for /dev/rdsk/c2t60050974071C599Cd165s2, evpd 0x0, page code 0x0
        Vendor id                        : EMC
        Product id                       : SYMMETRIX
        Revision                         : 5874
        Serial Number                    : 50999000@
(PhyHost1:/)#
(PhyHost1:/)# zpool status | grep c2t60050974071C599Cd165
(PhyHost1:/)#
(PhyHost1:/)# vxdisk -o alldgs -e list | grep c2t60050974071C599Cd165
(PhyHost1:/)# vxdisk -o alldgs -e list | grep c2t60050974071C599Cd165s2
(PhyHost1:/)# vxdisk -o alldgs -e list | grep c5t50000974081B59A0d165s2
(PhyHost1:/)#


(PhyHost1:/)# zpool replace zone1-pool c2t60050974071C599Cd84s2 c2t60050974071C599Cd165s2

(PhyHost1:/)#




(PhyHost1:/)# zpool status zone1-pool
  pool: zone1-pool
 state: ONLINE
status: One or more devices is currently being resilvered.  The pool will
        continue to function, possibly in a degraded state.
action: Wait for the resilver to complete.
 scrub: resilver in progress for 0h2m, 57.92% done, 0h1m to go
config:

        NAME                           STATE     READ WRITE CKSUM
        zone1-pool                     ONLINE       0     0     0
          replacing-0                  ONLINE       0     0     0
            c2t60050974071C599Cd84s2   ONLINE       0     0     0
            c2t60050974071C599Cd165s2  ONLINE       0     0     0  2.78G resilvered

errors: No known data errors
(PhyHost1:/)#
(PhyHost1:/)# zpool status zone1-pool
  pool: zone1-pool
 state: ONLINE
status: The pool is formatted using an older on-disk format.  The pool can
        still be used, but some features are unavailable.
action: Upgrade the pool using 'zpool upgrade'.  Once this is done, the
        pool will no longer be accessible on older software versions.
 scrub: resilver completed after 0h4m with 0 errors on Wed Apr 18 16:46:19 2012
config:

        NAME                         STATE     READ WRITE CKSUM
        zone1-pool                   ONLINE       0     0     0
          c2t60050974071C599Cd165s2  ONLINE       0     0     0  4.80G resilvered

errors: No known data errors
(PhyHost1:/)#

The old disk will be automatically removed from the zpool

(PhyHost1:/)#
(PhyHost1:/)# zpool status zone1-pool
  pool: zone1-pool
 state: ONLINE
status: The pool is formatted using an older on-disk format.  The pool can
        still be used, but some features are unavailable.
action: Upgrade the pool using 'zpool upgrade'.  Once this is done, the
        pool will no longer be accessible on older software versions.
 scrub: resilver completed after 0h4m with 0 errors on Wed Apr 18 16:46:19 2012
config:

        NAME                         STATE     READ WRITE CKSUM
        zone1-pool                   ONLINE       0     0     0
          c2t60050974071C599Cd165s2  ONLINE       0     0     0  4.80G resilvered

errors: No known data errors
(PhyHost1:/)#
(PhyHost1:/)#


Old disk can be released from system and recuperated.

No comments:

Post a Comment