Moving ZFS pool devices

Moving a ZFS pool of disks to a new storage server is supported and easy.

A few notes:

  • ZFS formatted disks contain a GUID to identify them.   The order physical order they are installed or how they are connected makes no difference.
  • It is important to write Disk serial numbers down by their install slot as this makes it much easier to identify a failed disk in the future.  Some systems have the ability to light up a drive ID light on the failed disk,  otherwise it’s much harder to tell.
  • Best practice is to ‘export’ them from the old server first. My pool was called ‘bigpool’
    >zfs export bigpool
  • Any ZIL slog devices in the pool are exported along with data disks.  It may be better to first remove the log device if you are not migrating that with the pool.
>zpool remove bigpool diskid
>zpool export bigpool

It may be easier to remove the  slog disk from the GUI so you don’t have to find it’s ID.

Note: If you move to a new server without removing the Slog  the pool will fail to import without the Slog!

If this happens you can bypass this check and import anyway with the -m ( ignore log devices ) command.

>zpool import -m bigpool

Note that if you import from the command line the imported pool is visible with zpool status,  but the GUI does not see it.    What I wound up doing is:

zpool import -m bigpool oldpool  ( skip checking for log, rename to oldpool )
zpool remove oldpool diskid  ( remove cache device marked as missing )
zpool export oldpool
Then use GUI to import the renamed pool missing the slog.

 

Note:  Avoid upgrading zpool and zfs versions until you have a known very stable system.

Some useful commands:

zpool list       - summary of all pools
zpool status     - Details summary of pools
glable status    - Disk GUID mapping to device name
smartctl -a /dev/da1 | grep ^Serial   - Show device serial number
gpart list       - List all GPT partitions ( replaces fdisk )
gpart list da1   - List GPT partitions on da1
gpart show - Concise summary of all partitions.
camcontrol devlist - 
dmesg -  grep for da (serial numbers show in kernel log )

One thought on “Moving ZFS pool devices

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s