Allocate remaining space in ZVOL for iSCSI use

Status
Not open for further replies.
J

jazz

Guest
Hi all. I'm new to FreeNAS and have just got my first FreeNAS server up and running.

I used to have 3 x 1TB drives in a RAID5 for storing photos. On my new FreeNAS box I have the 3 drives set up with ZFS and RAIDZ which gives me 1.8TB of free space. So far so good. I'd now like to share this with iSCSI, which I know how to do. It's just that when I create the ZFS Volume I don't know how to say "use all remaining space".

Obviously if I just put 1800G in the size field there is leftover space that is not used. If I put 1.8T I get the error "volume size must be a multiple of volume block size".

Is there any way to just use all free space?

Thanks.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
You mean when you create the iSCSI file extent? You create file extents within a ZFS volume. When you create the ZFS volume, it already uses all the space; the "free space" reported is within the ZFS volume. You can create a file extent up to 1.8TB in size. I'm guessing that's what you mean.

There's probably no option to do that because most people won't want to fill a ZFS volume. It's a bad idea. You may need at least a little space in the future to do things like FreeNAS upgrades, which need to be written someplace temporarily. If you're really intent on doing it, you can go to the command line and use dd to fill the filesystem with a zero-filled file, then do an ls -l on it, get the size, and feed that to the GUI. All bytes used.

Not suggested though.
 
Status
Not open for further replies.
Top