Your server has a ZFS storage pool that is configured as follows:
The server has two spate 140-GB disk drives: c3t5d0 c3t6d0
Which command would add redundancy to the pool1 storage pool?
A.
zpool attach pool1 c3t5d0 c3t6d0
B.
zpool attach pool1 c3t3d0 c3c5d0; zpoo1 attach pool1 c3t4d0 c3t6d0
C.
zpool mirror pool1 c3t5d0 c3t6d0
D.
zpool add pool1 mirror c3t5d0 c3t6d0
E.
zpool add raidz pool1 c3t5d0 c3t6d0
Explanation:
You can convert a non-redundant storage pool into a redundant storage pool by
using the zpool attach command.
Note: zpool attach [-f] pool device new_deviceAttaches new_device to an existing zpool device. The existing device cannot be part of a raidz
configuration. If device is not currently part of a mirrored configuration, device automatically
transforms into a two-way mirror of device and new_device. If device is part of a two-way mirror,
attaching new_device creates a three-way mirror, and so on. In either case, new_device begins to
resilver immediately.
Reference: Converting a Non-Redundant ZFS Storage Pool to a Mirrored ZFS Storage Pool
Reference: man zpool
B
A is correct
pal is right.
The correct answer is [B].
E has wrong syntax (raidz cannot be on the name’s place, as it is a reserved word)
D is wrong, as it adds a mirror to the pool not mirrors the pool, leaves the initial disks in stripe:
NAME STATE READ WRITE CKSUM
pool1 ONLINE 0 0 0
c2t0d0 ONLINE 0 0 0
c2t1d0 ONLINE 0 0 0
mirror-2 ONLINE 0 0 0
c2t2d0 ONLINE 0 0 0
c2t3d0 ONLINE 0 0 0
C is wrong, as there is no such option to zpool as zpool mirror…
A is wrong, because the disks are not in the pool.
So [B] is correct, and working as well.
root@sol11-ai:/# zpool mirror pool1 c2t2d0 c2t3d0
unrecognized command ‘mirror’
For more info, run: zpool help
root@sol11-ai:/# zpool attach pool1 c2t2d0 c2t3d0
cannot attach c2t3d0 to c2t2d0: no such device in pool
root@sol11-ai:/# zpool attach pool1 c2t0d0 c2t2d0
root@sol11-ai:/# zpool attach pool1 c2t1d0 c2t3d0
zporoot@sol11-ai:/# zpool status pool1
pool: pool1
state: ONLINE
scan: resilvered 42.5K in 0h0m with 0 errors on Tue Apr 28 08:09:28 2015
config:
NAME STATE READ WRITE CKSUM
pool1 ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
c2t0d0 ONLINE 0 0 0
c2t2d0 ONLINE 0 0 0
mirror-1 ONLINE 0 0 0
c2t1d0 ONLINE 0 0 0
c2t3d0 ONLINE 0 0 0