Solved Import previous ZFS disks to new system

Hi,

I've recently had a problem with a FreeBSD update, and so started over with a fresh install of my boot drive.

On the previous install I had a ZRAID pool with 12 disks. I would like to know how I can get these disks back into a new zpool on the new system.

I was going to just try:

Code:
zpool create -m /mnt tank [disk1, disk2, ... ]

But was unsure if that would wipe out the data on these disks.

Any help is greatly appreciated!
 
I was going to just try:

Code:
zpool create -m /mnt tank [disk1, disk2, ... ]

But was unsure if that would wipe out the data on these disks.

Indeed it does, don't do that!

From the zpool(8) manualpage:
Creates a new storage pool containing the virtual devices specified
on the command line.

Now, if you were going to use it then you'd soon discover some of the nice fail saves in ZFS: it would recognize the existing pool and refuse to create a new one unless you specifically told it to (using an override).

The command you're looking for is # zfs import. Just running this command without any parameters should list your old pool. After that you can use the required parameters, please see the previously mentioned manualpage.

Hope this helps!
 
Thanks for the very fast response!

I had tried
Code:
# zfs import
but it wouldn't recognize the pool ("no such pool available"). HOWEVER, after spending some quality time with the man page, I found the "-F" flag, and
Code:
# zfs import -F tank
worked like a charm.

Thanks again.
 
Back
Top