Expand iscsi file extend

Status
Not open for further replies.

didolgi

Dabbler
Joined
Mar 19, 2013
Messages
18
Hi - I've just expanded my ZFS zpool by swapping for larger drives, and I'm in the process of re-silvering the last drive now. The next step will be to expand a iSCSI file extent that sits on the volume. I found the wiki page for it but something doesn't make sense to me.

http://doc.freenas.org/index.php/ISCSI#File_Extent_Based_LUN

Code:
File Extent Based LUN
Before growing a file extent based LUN, make sure that all initiators are disconnected. Stop the iSCSI service in Control Services.
Then, go to Services → iSCSI → File Extents → View File Extents to determine the path of the file extent to grow. Open Shell to grow the extent. This example grows /mnt/volume1/data by 2G:
truncate -s +2g /mnt/volume1/data
Go back to Services → iSCSI → File Extents → View File Extents and click the Edit button for the file extent. Set the size to 0 as this causes the iSCSI target to use the existing size of the file.
You can now start the iSCSI service and allow initiators to connect.


In the wiki it says to set the iSCSI file extent size to 0 - but I've seen posts that say this causes problems. Can anybody give me more information? Do I want to use 0 or not? What is the risk if do?

Thanks.
 
J

jpaetzel

Guest
You definitely want to use 0, which tells the iSCSI target to use the file that's there regardless of the size. If you put in a size the target will truncate the file to use whatever size you specify.

Once you've grown the target you'll have to grow the labels and filesystem on the target as well, but that's usually a client side operation.
 
Status
Not open for further replies.
Top