4

Can somebody explain how I can import (or transfer) a pool?

Right now I'm using a dedicated file server machine. It is using onboard SATA plus an LSI 9211-8i SAS card.

I'm moving everything into a brand new ESXi "all-in-one" box using 2x LSI 9211-8i cards and won't be using any onboard SATA.

How can I transfer my pool from the old system to the new (and virtualized) one with the slightly different hardware?

SofaKng
  • 389
  • 1
  • 11
  • 18

3 Answers3

4

How are you sharing your data on the pool? Are you presenting block storage or NFS? If NFS, you can scp or rsync the data to the new system. Otherwise, if you need to preserve your ZFS attributes, etc., you can use zfs send and zfs receive over netcat (nc) or ssh.

The following will send the snapshot named "move" of "filesystem" in zpool "tank" to a new server at 192.168.1.2 with destination tank/filesystem.

On the old system:

# zfs send tank/filesystem@move | nc 192.168.1.2 3001

On the new system:

# nc -l -p 3001 -vvv | time zfs recv -v -p tank
EEAA
  • 109,363
  • 18
  • 175
  • 245
ewwhite
  • 197,159
  • 92
  • 443
  • 809
  • 1
    Thanks! However, the physical drives are being moved and I don't have two sets of drives (which I think zfs send/receive needs). It sounds like export/import is what I need... – SofaKng Sep 26 '11 at 20:55
4

If you're keeping the disks, hook them up to your ESXi machine, pass them through to the VM (raw), and zpool import -f ${pool}

phresus
  • 257
  • 1
  • 8
2

If you can keep the old box running, try the zfs send/zfs receive pair of commands.

Essentially, you create a snapshot and send all data necessary to recreate it over a network connection with zfs send and then use zfs receive to integrate this into the new file system.

Edit:

What might be even easier/faster is to connect your SATA disks to some free SAS ports, mount your ZFS filesystem and then use either zfs send/receive or rsync  to migrate the data to the SAS arrays.

Sven
  • 98,649
  • 14
  • 180
  • 226