Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

3 Answers

up vote 4 down vote accepted

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}

share|improve this answer
    
Do I have to export them first? (zpool export?) –  SofaKng Sep 26 '11 at 20:56
    
You should run the export, then reimport. –  ewwhite Sep 26 '11 at 21:10
add comment

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
share|improve this answer
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
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.