Thin Provisioning feature

Status
Not open for further replies.

annushka

Cadet
Joined
Nov 2, 2011
Messages
3
Hello,

Please help me to find how to use Thin Provisioning feature of FreeNAS 8.
As I understand, it shoud allow me to allocate more space for users than really exist.
I couldn't find how to do it in documentation or in forum.
Please somebody give me step-by-step instruction or some useful link.

Thanks.
 

annushka

Cadet
Joined
Nov 2, 2011
Messages
3
I tried to use thin provision with CIFS/SMB share or iSCSI disk. But it wasn't possible to allocate more space than storage has.
Where thin provision function should be used and how?
 

louisk

Patron
Joined
Aug 10, 2011
Messages
441
What documentation are you reading which suggests the ability to thin provision a CIFS or iSCSI volume?
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Well, if you look at it the right way, using a sparse file as an iSCSI extent might be considered "thin provisioning." Consider this:

total 119085856
drwxr-xr-x 2 root wheel 3 Sep 24 08:38 ./
drwxrwxrwx 18 root wheel 37 Nov 4 01:08 ../
-rw-r--r-- 1 root wheel 1099511627776 Nov 8 00:42 extent0

The total space used within the directory is nowhere near the claimed filesize; this is because the file was created using truncate and is being slowly allocated as it's being written to. The same thing works with CIFS of course. This is of only limited usefulness, but you can indeed allocate a file that's nearly infinitely large without regard to your actual available storage.

Now, for something that is more practical, the use of multiple datasets in ZFS can give the appearance of thin-provisioning-like behaviours. If you have a 1TB pool, and you create "dataset1" ... "dataset4", each dataset by default reports the remaining pool space as its own free space, but in reality the free space for 2, 3, and 4 goes down when stuff is written to dataset1 (etc).

It should be obvious that in all cases, you cannot actually STORE more data than you have space for. Deliberately setting up a scenario where the reported available space is greater than what you have requires some thoughtful design decisions; for example, it'd be exceedingly bad to rely on thin provisioning at the storage level in order to store ESXi VM's that in turn were thin provisioned; you have an exceptional opportunity for extreme badness to happen if the disk fills. ESXi pretty much freaks when it suddenly can't write to something it ought to be able to write to...
 

louisk

Patron
Joined
Aug 10, 2011
Messages
441
Well, if you look at it the right way, using a sparse file as an iSCSI extent might be considered "thin provisioning." Consider this:

...
Now, for something that is more practical, the use of multiple datasets in ZFS can give the appearance of thin-provisioning-like behaviours. If you have a 1TB pool, and you create "dataset1" ... "dataset4", each dataset by default reports the remaining pool space as its own free space, but in reality the free space for 2, 3, and 4 goes down when stuff is written to dataset1 (etc).

It should be obvious that in all cases, you cannot actually STORE more data than you have space for. Deliberately setting up a scenario where the reported available space is greater than what you have requires some thoughtful design decisions; for example, it'd be exceedingly bad to rely on thin provisioning at the storage level in order to store ESXi VM's that in turn were thin provisioned; you have an exceptional opportunity for extreme badness to happen if the disk fills. ESXi pretty much freaks when it suddenly can't write to something it ought to be able to write to...

This is why I wanted to know more about the documentation they were reading and what they were thinking. I couldn't actually think of a senario for CIFS other than ZFS, and that's not so much thin provisioning as it is just confusing.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
I call it stupid buzzwords and usually leave it at that. As an old-timer curmudgeon (I guess), I see all this newfangled stuff as unnecessary complexity. ;-)
 

louisk

Patron
Joined
Aug 10, 2011
Messages
441
Well yes, there is no end to words that people like to make up (near-line sas?) that really should be used to bury said people.
 

annushka

Cadet
Joined
Nov 2, 2011
Messages
3
To jgreco:
Thank you for useful post. So, this is the only way to try something like thin provisioning in FreeNAS now.

To louisk:
As I previously mentioned, I coudn't find anything in documentation about Thin Provisioning. But it was announced in features - see here:
http://www.freenas.org/features
Citation: "Thin Provisioning allows the administrator to allocate users more space than physically exists in the system."
So it was interesting, where this feature is exactly.
 

louisk

Patron
Joined
Aug 10, 2011
Messages
441
I expect that jgreco is correct with his pointer about ZFS and iSCSI extents. I can't think of any other way you could thin provision. As always, be careful if you decide to go this route. Its very easy to run out of space at an awkward time.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Its very easy to run out of space at an awkward time.

Heh, yeah, err, very easy. I did it inadvertently on a box I was just messing around with, forgot about, and a month later it had burnt up all its space. ESXi was *not* amused and for awhile I was not even sure I'd be able to retrieve the vmfs3 filesystem, it had gone to heck so quickly and had apparently written bad stuff in bad spots. IIRC. It didn't clear up just rebooting everything, at least.
 
Status
Not open for further replies.
Top