adding drive to raidz1

James R. Van Artsdalen james-freebsd-fs2 at jrv.org
Fri Jun 19 04:12:39 UTC 2009


As a feature suggestion why not reject an "zpool add" of a non-redundant
vdev to a pool of redundant vdev's unless -f is given?  A command of
that sort is almost always a mistake so requiring -f would seem no
hardship for anyone...

Randy Bush wrote:
> 	    NAME        STATE     READ WRITE CKSUM
> 	    tank        ONLINE       0     0     0
> 	      raidz1    ONLINE       0     0     0
> 		ad4s3   ONLINE       0     0     0
> 		ad5s3   ONLINE       0     0     0
> 		ad6s1   ONLINE       0     0     0
> 	      ad7s1     ONLINE       0     0     0
>   

As was said, a vdev (ad7s1) cannot be removed from a pool, and a device
cannot be added to a raidz.

However, I believe it is possible to attach a device to a single-device
vdev such as ad7s1 and turn that vdev into a mirror, regaining
redundancy without recreating the pool, perhaps something like:

# zpool attach tank ad7s1 ad8s1

to get

	    NAME        STATE     READ WRITE CKSUM
	    tank        ONLINE       0     0     0
	      raidz1    ONLINE       0     0     0
		ad4s3   ONLINE       0     0     0
		ad5s3   ONLINE       0     0     0
		ad6s1   ONLINE       0     0     0
              mirror    ONLINE       0     0     0
	        ad7s1   ONLINE       0     0     0
	        ad8s1   ONLINE       0     0     0

(hand edited, not actual zpool output)

Even if the pool the pool is to be rebuilt I suggest converting the naked vdevs to mirrors in the meantime to avoid disaster...

PS. I prefer pools of mirrors over raidz anyway with such a small number of devices since it's easier to protect against many more kinds of system faults (i.e., power supply, cable, device firmware, host controller, driver, etc).



More information about the freebsd-fs mailing list