ZFS How to add free space to zpool from different storage device

As we're running out of disk space, I've added another block storage device and made it a zfs partition with gpart :

Code:
$ gpart show
=>       40  125829040  vtbd0  GPT  (60G)
         40       1024      1  freebsd-boot  (512K)
       1064    6291456      2  freebsd-zfs  (3.0G)
    6292520  117440512      3  freebsd-zfs  (56G)
  123733032    2096048      4  freebsd-swap  (1.0G)

=>      40  20971440  vtbd1  GPT  (10G)
        40  20971440      1  freebsd-zfs  (10G)

So /dev/vtbd0p3 is used as a zpool and basically I'd like to add /dev/vtbd1p1 as new free space to the existing pool.

I know how to grow a zfs partition on the same device, but I don't know how to do it across devices. My only idea would be to create a new zpool and then take one of the existing zfs mountpoints and move that over to the new pool. If that's the way to do it, what's the cleanest way of doing this?

As I couldn't find any how-tos on this I suspect it's not possible to simply expand the pool but maybe someone has a tip on the best way of doing it?

Thanks!

Marco
 
Judging by the device names these are virtual disks, why don't you increase the size of the original disk? Then remove the swap partition and extend the existing freebsd-zfs partition. ZFS will automatically detect the size increase and automatically resize accordingly.

You can add the extra disk to the existing pool but this will result in a striped set (RAID0). Which is a bit dangerous, if any of the disks become unavailable the whole pool will fail.
 
Good idea but I can't do that, it's block storage from our hosting provider that shows up as a separate virtual device :(
 
In that case, this:
My only idea would be to create a new zpool and then take one of the existing zfs mountpoints and move that over to the new pool. If that's the way to do it, what's the cleanest way of doing this?
That's probably the best option. You can transfer the data with a regular copy command or get fancy and use "zfs send | zfs receive" to transfer whole datasets.
 
Back
Top