ZFS Expanding old ZFS pool

Scenario:

  • FreeBSD 9.3
  • Server with 6 SATA ports
  • 6x1TB SATA drives, configured as 3 mirrors in one pool
  • Pool has ashift of 9

I have two new 4TB drives (WD RE4's). You can see where this is going...

Too much data to copy off locally and restore the pool. Most of this is cold storage, so I'm not concerned with having this be a speed demon. Can I add the new drives with an ashift of 9?

I have plenty of other old systems that will be having the same problem soon - limited drive bays, old drives, need to expand (yay for early adopters).
 
https://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/zfs-zpool.html
19.3.9. Growing a Pool

The usable size of a redundant pool is limited by the capacity of the smallest device in each vdev. The smallest device can be replaced with a larger device. After completing a replace or resilver operation, the pool can grow to use the capacity of the new device. For example, consider a mirror of a 1 TB drive and a 2 TB drive. The usable space is 1 TB. When the 1 TB drive is replaced with another 2 TB drive, the resilvering process copies the existing data onto the new drive. Because both of the devices now have 2 TB capacity, the mirror's available space can be grown to 2 TB.

Expansion is triggered by using zpool online -e on each device. After expansion of all devices, the additional space becomes available to the pool.
 
The ashift property is VDEV specific, you can expand your pool with new VDEV that has ashift=12 if that is required for proper operation with those disks. You can't however replace the old disks in the existing VDEVS and modify the ashift property, the property is set permanently at the VDEV creation time.
 
Got it. So if I had more ports and was adding these drives as a new vdev, no problem. I could do the gnop(8) dance, make them a mirror and add them to the pool with the proper ashift. In my case I'm replacing two drives so I use the existing ashift value.

If the drive reports 4K sectors, is that an issue (I don't know that they do or not)?

I wish I had an eSATA port or something, the array is at around 3.8TB which might, maybe, almost, but probably not fit on a 4TB drive. I could technically shuffle things around...

edit: Bonus - the board does have additional SAS ports, but the controller (LSI 1068) is limited to 2TB drives. Grr.
 
Last edited by a moderator:
If the drive reports 4K sectors, is that an issue (I don't know that they do or not)?

If the drives report 4 KB sectors properly you have no problem, it's only a problem when they report 512 B sectors but use 4 KB sectors internally.
 
Back
Top