I'm on Ubuntu 16.04.1 LTS and I have a ZFS pool named unas containing two mirrored drives. I have now attached two more drives and I want to add these new drives to my unas pool as a pair of mirrored drives so that I end up with one pool, named unas, which contains 4 drives, grouped into mirrored pairs.
The results of the zpool status
command, shown below, show my current configuration. What steps and commands do I use to mirror the two new drives and then add those mirrored drives to my unas pool?
Is it as simple as using the following command to add the two new drives as a mirrored pair?
$ zpool add unas mirror newDrive1 newDrive2
The results of my current zpool status are:
$ sudo zpool status
pool: unas
state: ONLINE
scan: scrub repaired 1.50M in 36h3m with 0 errors on Thu Jun 9 08:06:41 2016
config:
NAME STATE READ WRITE CKSUM
unas ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ata-WDC_WD30EFRX-68EUZN0_WD-WCC4N1VUU0LX ONLINE 0 0 0
ata-WDC_WD30EFRX-68EUZN0_WD-WCC4N7FSX6F9 ONLINE 0 0 0
errors: No known data errors
Yes, it is.
If you are unclear about such things in the future, just test them out with small files on your old pool first. You can create pools from regular files as long as their size is at least 64MB. The commands are the same, just give it the full paths of the files instead of the device paths.
On Solaris this would be: