您的位置:首页 > 其它

How to Replace a Device in a ZFS Storage Pool

2013-09-15 23:26 471 查看
The following example shows how to replace a device (c1t3d0) in amirrored storage pool tank

on Oracle's Sun Fire x4500 system. To replace the disk c1t3d0 witha new disk at the same

location (c1t3d0), then you must unconfigure the disk before youattempt to replace it. The

basic steps follow:

■ Take offline the disk (c1t3d0)to be replaced. You cannotunconfigure a disk that is currently

being used.

■ Use the cfgadm command to identify the disk (c1t3d0) to beunconfigured and unconfigure

it. The pool will be degraded with the offline disk in thismirrored configuration, but the

pool will continue to be available.

■ Physically replace the disk (c1t3d0). Ensure that the blue Readyto Remove LED is

illuminated before you physically remove the faulted drive.

■ Reconfigure the disk (c1t3d0).

■ Bring the new disk (c1t3d0) online.

■ Run the zpool replace command to replace the disk (c1t3d0).

Note – If you had previously set the pool property autoreplace toon, then any new device,

found in the same physical location as a device that previouslybelonged to the pool is

automatically formatted and replaced without using the zpoolreplace command. This

feature might not be supported on all hardware.

■ If a failed disk is automatically replaced with a hot spare, youmight need to detach the hot

spare after the failed disk is replaced. For example, if c2t4d0 isstill an active hot spare after

the failed disk is replaced, then detach it.

# zpool detach tank c2t4d0

The following example walks through the steps to replace a disk ina ZFS storage pool.

# zpool offline tank c1t3d0

# cfgadm | grep c1t3d0

sata1/3::dsk/c1t3d0 disk connected configured ok

# cfgadm -c unconfigure sata1/3

Unconfigure the device at:/devices/pci@0,0/pci1022,7458@2/pci11ab,11ab@1:3

This operation will suspend activity on the SATA device

Continue (yes/no)? yes

# cfgadm | grep sata1/3

sata1/3 disk connected unconfigured ok

# cfgadm -c configure sata1/3

# cfgadm | grep sata1/3

sata1/3::dsk/c1t3d0 disk connected configured ok

# zpool online tank c1t3d0

# zpool replace tank c1t3d0
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: