Monday, July 7, 2014

Mirror Upgrade

My NAS is configured with two mirrors for file sharing (over SMB) with other Windows computers:

Disk Size (MB)Description Device model Virtual devicePoolDatasetPathSMB Share
da01907730Seagate Barracuda Green (AF)ST2000DL003-9VT166tank_mirror_0tankalex/mnt/tank/alex/alex
da11907730Seagate Barracuda Green (AF)ST2000DL003-9VT166music/mnt/tank/music/music
da22861589Seagate Barracuda 7200.14 (AF)ST3000DM001-1E6166vault_mirror_1vaultalex

da32861589Seagate Barracuda 7200.14 (AF)ST3000DM001-1E6166movies/mnt/vault/moviesmovies

I plan to purchase two 4TB drives to upgrade mirror vault.  Then after 30 or so days I will use these hard drives to upgrade mirror tank.
I did this successfully in the past.  This time I will document the procedure and will try to stay away from command line.

I powered down the system, installed new hard drive - there are plenty of empty positions available in the drive cages, powered the system up.
New drive da4 immediately appeared in Diagnostics\Information\Disks.
I go to Disk\Management,
da4 is not there.
I click Rescan Disks.
da4 appears.  I edit it to: set APM to 127,  activate SMART.
Apply changes.
I click Disk\Format, select da4 and specify ZFS.
Diagnostics\Information\Disks for da4 looks like this:
DeviceDevice modelDescription Size Serial number Rotation rate Transfer rate S.M.A.R.T. Controller Controller model Temperature Status
da4ST4000VN000-1H4168n/a3815448MBZ30150F65900 rpm6.0 Gb/sAvailable , Enabledmps0LSI SAS200835 °CONLINE

Time to add da4 to mirror vault.
This post outlines the steps involved in maintaining the mirror.  In a nutshell it recommends to take one disk offline and to add another thus replacing the first one.  I am a proponent of a different approach.  You add a 3rd disk to a mirror.  You leave it there for a while.  In the meantime not only old files are copied to the new disk.  Also all I/O operations are duplicated to 3rd disk and early failure might be detected.  If disk still works after 30 days, you can remove one of the older disks.  Add anew larger capacity disk.  Repeat.
The above approach relies on command

zpool add <existing pool> <device>

Unfortunately I found no way to issue it through GUI, thus the need to use command line:

Edit: nest post will be about a proper way to upgrade the mirror.