0

I'm trying to mount a zfs pool created on a different machine. To test out this scenario I have created two virtual machines in Virtualbox. The OS is Ubuntu 16.04.1 server in both cases. Machine1 has 5 virtual disks (one for the OS, the other four for the zpool).

nas1.vdi    
VirtualDisk1.vdi
VirtualDisk2.vdi
VirtualDisk3.vdi
VirtualDisk4.vdi

I created a pool on the VirtualDisk*.vdis and everything works as expected. The output of zpool status on machine1:

  pool: bigdata
 state: ONLINE
  scan: none requested
config:

    NAME        STATE     READ WRITE CKSUM
    bigdata     ONLINE       0     0     0
      mirror-0  ONLINE       0     0     0
        sdb     ONLINE       0     0     0
        sdc     ONLINE       0     0     0
      mirror-1  ONLINE       0     0     0
        sdd     ONLINE       0     0     0
        sde     ONLINE       0     0     0

I created a second machine to test importing/mounting the zpool created on machine1:

nas2.vdi
VirtualDisk1.vdi
VirtualDisk2.vdi
VirtualDisk3.vdi
VirtualDisk4.vdi

where the VirtualDisk*.vdis are the exact same disks from machine1 holding the zpool and nas2.vdi is the disk to hold the os. However no pool is detected; zpool list gives no pools available, zpools import gives no pools available to import.

The special devices /dev/sdb, /dev/sdc, /dev/sdd and /dev/sde/ are there.

What am I missing? Many thanks in advance!

2
  • Did you export the pool beforehand with zpool export? See also this Admin Guide.
    – Thomas
    Jan 7, 2017 at 13:53
  • @Thomas Yes, I tried exporting the pool but it didn't make any difference; it got unmounted from machine1 but still no pools available on machine2. I shut down machine1 before trying to mount the pool on machine2 btw.
    – jules
    Jan 7, 2017 at 15:02

1 Answer 1

0

I tried the same but only with one vdi file: VirtualDisk1.vdi and it worked. On the source OS (CentOS 7), I exported the pool with

zpool export

and on my destination OS (Ubuntu 16.10), I imported it with

zpool import -a

If you do not want to type this always into the command line, add this line into /etc/crontab

@reboot user sleep 30; /sbin/zpool import -a

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .