I have Ubuntu 12.04 with ZFS installed. There are two pools: rpool (the root filesystem) and rdata (all the data). rdata was built with 2 x 1TB WD EADS drives (with 512 byte physical sectors) in a ZFS mirror. rdata has many datasets on it in a hierarchy.
rdata is running out of space so I have purchased 2 x Seagate 3TB drives. Unfortunately, when I tried to add one the the new drives to the mirror, so that it would resilver, zpool attach failed saying
cannot attach /dev/disk/by-id/scsi-SATA_ST3000DM001-1CH_W1F1EE1G-part1 to /dev/disk/by-id/scsi-SATA_WDC_WD10EADS-00_WD-WCAU47275172-part1: devices have different sector alignment
I now know this is because the new drives ave 4k physical sectors and the only recovery path is to rebuild the pool. I am proposing to do the following:
- Ensure there is a snapshot of all datasets on rdata.
- Remove 1 element of the rdata mirror (so I have a known good backup and to free up a SATA port)
- Connect one of the new drives to the machine
- create a new pool called rdata1 with 4k sectors and a single physical device
- use zpool recv to restore the snapshots of rdata's datasets to rdata1
- At this point, rdata1 should be identical to rdata
- export the device on which rdata1 is located
- destroy rdata
- import the device that contained rdata1 as rdata
- remove the old physical disk and replace it with the other new disk
- attach the other new disk to the newly created rdata to re-create the mirror
Does this sound reasonable? I'll still have the second old disk if it goes wrong and as a final resort, I have another FreeNAS server that has a full backup of all the snapshots; just in case.