Need some ZFS help

Soldato
Joined
18 Oct 2002
Posts
7,139
Location
Ironing
Is it possible to grow a ZFS volume?

I know that a ZFS filesystem will grow to the size of the zpool that it's in, but if I create a ZFS volume (fixed size - zfs create -V 4G tank/iscsi/is1) for use as an iSCSI target, can I grow it to a larger size when I increase the size of the zpool?

Thanks :)
 
Hi,

My answer is 'I don't think so' However, I will ask one of the ZFS dev team tomorrow for a definite answer.

There is of course, nothing wrong with creating a newer larger fixed size device, copying the contents over, and setting the iSCSI share on the new drive with the same name (after disabling the old one)

//TrX

EDIT: You got me thinking, So I had a play, and the -V xxG just sets the ZFS software volsize attribute:

We can edit this:

zfs get all tank/xVM/bunty
NAME PROPERTY VALUE SOURCE
*OTHER STUFF*
tank/xVM/bunty volsize 20G -
*OTHER STUFF*

root@zfs / $ zfs set volsize=30gb tank/xVM/bunty

root@zfs / $ zfs get all tank/xVM/bunty
tank/xVM/bunty volsize 30G -

What the file system created on top of this iSCSI volume will make of the sudden space change however... I have no idea. (Or whether it will even let you with the iSCSI export turned on)

Ext2 and reiser can grow, you will need to use a partitioning to do this tho (qtparted works). What FS have you got ontop of the iSCSI export?

Hope this helps.
*BTW, let me know how you get on*
//TrX
 
Last edited:
Oooo, looks cool, thanks for the help.

I've tested this on other iscsi platforms with NTFS running as the FS on the iSCSI. Basically, windows sees a bigger disk, but the ntfs partition stays the same size. Therefore I can either create a new partition in the empty space, or use diskpart and grow the ntfs partition. Works a treat.

I'll give this a go on solaris when I next get in the office. If it works, it'll be amazing :)
 
Back
Top Bottom