resizing zfs

I need to increase my zpool size but cannot do it (at least not easily) by adding new devices.

As I understand if I were to add new devices it would automatically increase the available space as if its autodetected.

What I have done is swapped the 2 4 gig drives for 2 8 gig drives, did one at a time so it resilvered etc. and all is fine on that side of things. However my zpool is still 4 gig.

Code:
root@vm py-zfs # zpool status
  pool: tank
 state: ONLINE
 scan: resilvered 2.82G in 0h7m with 0 errors on Thu Dec 23 21:03:23 2010
config:

        NAME                                            STATE     READ WRITE CKSUM
        tank                                            ONLINE       0     0     0
          mirror-0                                      ONLINE       0     0     0
            gptid/cd9942a8-0ed6-11e0-b657-08002785b01d  ONLINE       0     0     0
            gptid/14370682-0ed2-11e0-9dba-08002785b01d  ONLINE       0     0     0

errors: No known data errors

Code:
root@vm py-zfs # zpool list
NAME   SIZE  ALLOC   FREE    CAP  DEDUP  HEALTH  ALTROOT
tank  2.98G  2.81G   181M    94%  1.00x  ONLINE  -

Code:
root@vm py-zfs # gpart show
=>      34  16777149  ada0  GPT  (8.0G)
        34       128     1  freebsd-boot  (64K)
       162   2097152     2  freebsd-swap  (1.0G)
   2097314  14679869     3  freebsd-zfs  (7.0G)

=>      34  16777149  ada1  GPT  (8.0G)
        34       128     1  freebsd-boot  (64K)
       162   2097152     2  freebsd-swap  (1.0G)
   2097314  14679869     3  freebsd-zfs  (7.0G)

ufs and other filesystems can be increased in size to fit larger hdd's, is it not possible on zfs?

as usual I find solution myself right after posting :) still this post will serve to help others.

solution was to do
Code:
zfs set autoexpand=on tank
I then had to detach and reattach one of the disks so it picked up the change.
 
Back
Top