Creating file extents

Status
Not open for further replies.

aufalien

Patron
Joined
Jul 25, 2013
Messages
374
Hi,

HW specs to get them out of the way;

12 bay SuperMicro chassis
12 WD Enterprise 3TB drives
32GB ECC ram
E3 1241v3 @3.5Ghz
FreeNAS 9.2.1.7

I've managed to create a device extent for use in FC target mode, worked well, fairly simple to set up once I got my head around concepts etc...

I'd like to create a file extent in seeing how well they work. Based on what I've read, they provide greater flexibility and more efficiency in terms of resource allocation.

However for the life of me I cannot seem to create a file extent on a volume or a data set.

I'm reading and following the 9.2.1 manual pages 192-193 section 8.7.2.1 and following tables 8.7b and 8.7c, the web site version seems to follow the manual word for word on this topic as well.

My RaidZ2 volume is 10.7TB and I've specified 8TB as a file extent size as I wish to stay within 80% usage. Plus I like round even numbers :)

Attached is a pic of what I've done in creating a file extent on top of a volume.

Below are the log messages resulting from trying to start the iSCSI service;

notifier: ctld: error returned from LUN creation request: ctl_be_block_open: error opening /mnt/data3/san.extent
ctld[19851]: error returned from LUN creation request: ctl_be_block_open: error opening /mnt/data3/san.extent

I was under the impression that when specifying a file extent name and its size, that this file would automatically get created. When would it get created, ie; what kicks off the file creation process?

And words of wisdom are appreciated.
 

Attachments

  • file_extent.jpg
    file_extent.jpg
    25.2 KB · Views: 283

aufalien

Patron
Joined
Jul 25, 2013
Messages
374
I sat on this a bit and will instead dd a file of 8TB and use that for my file extent.

Again, I do appreciate any wisdom or views on this.
 

aufalien

Patron
Joined
Jul 25, 2013
Messages
374
Hi,

Wondering if its best, when using dd to use /dev/random or /dev/zero for a file extent?
 

lk7777

Cadet
Joined
Aug 9, 2014
Messages
7
Hi,

HW specs to get them out of the way;

12 bay SuperMicro chassis
12 WD Enterprise 3TB drives
32GB ECC ram
E3 1241v3 @3.5Ghz
FreeNAS 9.2.1.7

I've managed to create a device extent for use in FC target mode, worked well, fairly simple to set up once I got my head around concepts etc...

I'd like to create a file extent in seeing how well they work. Based on what I've read, they provide greater flexibility and more efficiency in terms of resource allocation.

However for the life of me I cannot seem to create a file extent on a volume or a data set.

I'm reading and following the 9.2.1 manual pages 192-193 section 8.7.2.1 and following tables 8.7b and 8.7c, the web site version seems to follow the manual word for word on this topic as well.

My RaidZ2 volume is 10.7TB and I've specified 8TB as a file extent size as I wish to stay within 80% usage. Plus I like round even numbers :)

Attached is a pic of what I've done in creating a file extent on top of a volume.

Below are the log messages resulting from trying to start the iSCSI service;

notifier: ctld: error returned from LUN creation request: ctl_be_block_open: error opening /mnt/data3/san.extent
ctld[19851]: error returned from LUN creation request: ctl_be_block_open: error opening /mnt/data3/san.extent

I was under the impression that when specifying a file extent name and its size, that this file would automatically get created. When would it get created, ie; what kicks off the file creation process?

And words of wisdom are appreciated.
 
Last edited:

aufalien

Patron
Joined
Jul 25, 2013
Messages
374
Thanks much for the reply. I know thats in the manual as well and thought to have tired it. I will and report back.

What mechanism is that going to use in extent file creation, a simple dd?

And does it do this right away upon saving the changed to the extent file name and size?
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
did who remove what post?
 

aufalien

Patron
Joined
Jul 25, 2013
Messages
374
I tried exactly as suggested which was also per the manual and the file extent never gets created.

Would any one mind seeing if they could verify?

I ended up creating a file via dd /dev/zero being ~80% in size of my ZFS dataset. And using that as my file extent.
 

lk7777

Cadet
Joined
Aug 9, 2014
Messages
7
Did you remove your post? Was something wrong with it?
Hi aufalien,

Yes, I have removed my post because I do not feel yet that I can give any recommendations on how to work with the freeNAS. I am new to freeNAS, freeBSD and ZFS. I was on OpenFiler but it seems this project is not developed anymore, so I decided to switch to freeNAS but have a lot of questions and doubts about using it in production environment. Regarding your question about a File extent, I was able to create a file extent yesterday but today all my attempts failed. That is why I can't give any advise on this subject. What I did as a workaround:

1. Stopped iSCSI service
2. from Shell: truncate -s +500g /mnt/ZFSVOL1/dataset1vol1/mysan. It will create a new file 'mysan'.
3. In GUI, created a new extent with the name 'mysan', selected existing /mnt/ZFSVOL1/dataset1vol1/mysan and set the size to 0.
4. from Shell: ls -lh /mnt/ZFSVOL1/dataset1vol1, mysan size is 500GB.
5. Started iSCSI service

Regards.
 

aufalien

Patron
Joined
Jul 25, 2013
Messages
374
Hi aufalien,

Yes, I have removed my post because I do not feel yet that I can give any recommendations on how to work with the freeNAS. I am new to freeNAS, freeBSD and ZFS. I was on OpenFiler but it seems this project is not developed anymore, so I decided to switch to freeNAS but have a lot of questions and doubts about using it in production environment. Regarding your question about a File extent, I was able to create a file extent yesterday but today all my attempts failed. That is why I can't give any advise on this subject. What I did as a workaround:

1. Stopped iSCSI service
2. from Shell: truncate -s +500g /mnt/ZFSVOL1/dataset1vol1/mysan. It will create a new file 'mysan'.
3. In GUI, created a new extent with the name 'mysan', selected existing /mnt/ZFSVOL1/dataset1vol1/mysan and set the size to 0.
4. from Shell: ls -lh /mnt/ZFSVOL1/dataset1vol1, mysan size is 500GB.
5. Started iSCSI service

Regards.

Many thanks. Do you feel truncate is better suited then dd for this file extent creation?
 

lk7777

Cadet
Joined
Aug 9, 2014
Messages
7
You can check this.

truncate:
"...A file created using this method will be a ‘sparse file’ if the filesystem supports it, meaning that storage for any given part of its content will not be reserved until it is first written to. Advantages are that the file can be created very quickly and does not occupy unnecessary disc space. Drawbacks are that the reported amount of free disc space can be misleading (because it does not take account of space that the file may need to occupy in the future), and an ENOSPC (no space left on device) error can occur when writing to the file even if it is not being extended...."

So the truncate is a thin provisioning and dd with the count (for the required size) is a thick provisioning.
Probably dd is a better solution if you want to be sure that you have enough space for your file extent.
 

aufalien

Patron
Joined
Jul 25, 2013
Messages
374
You can check this.

truncate:
"...A file created using this method will be a ‘sparse file’ if the filesystem supports it, meaning that storage for any given part of its content will not be reserved until it is first written to. Advantages are that the file can be created very quickly and does not occupy unnecessary disc space. Drawbacks are that the reported amount of free disc space can be misleading (because it does not take account of space that the file may need to occupy in the future), and an ENOSPC (no space left on device) error can occur when writing to the file even if it is not being extended...."

So the truncate is a thin provisioning and dd with the count (for the required size) is a thick provisioning.
Probably dd is a better solution if you want to be sure that you have enough space for your file extent.

Awesome, many many thanks for your time.

So far, based in testing over FC4, and I'm doing real world and benches, ZVOLs and file based extents are the same speed. I did find this post;

http://forums.freenas.org/index.php...he-iscsi-target-in-freenas.22256/#post-136191

Scroll down to Mavs responses. However there is the issue of performance over time with regards to fragmentation. Cyberjock did bring up how one can simply copy a file extent to a new one, rename to original and bayam, fragmentation solved.

Fragmentation I cannot mimic so that will have to be a wait and see.
 

lk7777

Cadet
Joined
Aug 9, 2014
Messages
7
I figured out that those file extent files are created only after some target is associated with the file extent. It all makes sense now.
 
Status
Not open for further replies.
Top