Page 1 of 1
Change size of a ZFS-Volume while online
Posted: 09 Sep 2013 23:01
by drnicolas
I am still doing experiments with ZFS/iSCSI.
- I created a Volume in ZFS with a size of 40GB
- I created an iSCSI-Target for the ZFS-volume
- the iSCSI-Target is used from another machine as a backup drive
-Already using the target, I changed the size of the volume and increased from 40G to 60G.
- The volume is then shown with 60G as expected (in NAS4Free)
- But, on the target machine , the size of the drive remains 40G!
Is this normal behaviour ? Or am I doing something wrong ?
In my opionion, changing sizes on the fly is one of the arguments for ZFS.
Re: Change size of a ZFS-Volume while online
Posted: 10 Sep 2013 07:10
by sleid
Hello,
_ Delete the iscsi target (make a screenshot before).
_ Delete the corresponding extension (make a screenshot before).
_ Increase the size of the disk (ZFS set volsize xxxx = (M, G, T) mountpoint / IscsiX).
_ Recreate the iSCSI target (disk size appears increased).
_ Recreate the corresponding extension.
_It Is no loss of data on the iSCSI disks
_If The disc by using a pc in wndows
If the target and extension have been recreated with the same names as before,
in the disk manager of the PC that is connected to the disk,
will appear a disk with a partition size of the former and an empty partition.
Simply extend the first partition with the empty partition to recover a disk
the new size containing the data.
Re: Change size of a ZFS-Volume while online
Posted: 13 Sep 2013 19:17
by drnicolas
Funny effect.
Your Tip works at first view
ZFS-vol is now 350G
target and extent have been deleted an re-created
In W2008 the iscsi-Initiator also is re-connected, but the disk Looks 59GB as before instead of 350GB.
IBut, in Disk-Management the size has inreased as expected, even with no empty space. The Partition has just grown!
How can this happen ? 350GB in disk-management and 59GB in windows-Explorer
even removing the drive-letter and re-assigning it did not Change it.
Last test: remove drive-letter, assign a different letter - no Change!
Re: Change size of a ZFS-Volume while online
Posted: 14 Sep 2013 16:35
by ChriZathens
Did you actually extend the partition from disk manager in windows?
Re: Change size of a ZFS-Volume while online
Posted: 14 Sep 2013 18:51
by drnicolas
Good Point!
I remember, I did not have to Change the partion size. It changed automatically from 60GB to 350GB. But only in Disk-Manager, not in Explorer.
Also the backup System sees ony 60gb!
Re: Change size of a ZFS-Volume while online
Posted: 14 Sep 2013 19:06
by drnicolas
Just tried another way:
Windows exploer says 60GB with 7.xxxGB free.
Disk-Management says 350GB Partition size.
Tried now to shrink the partiton:
size is about 350GB, shrinkable with 7800MB (this seems to be the space left in Windows Explorer!)
Trying to execute this, I get "wrong Parameter"!
There must soemthing be terribly wrong !
Next try;
Disconnect iscsi in Windows, delete all references to the iscsi-target.
Then delete extent and target, re-create them with new Serial-numbers.
Connect to iscsi-target again - the same Problem !!!! 60Gb instead of 350GB!
Re: Change size of a ZFS-Volume while online
Posted: 15 Sep 2013 06:54
by sleid
hello,
The problem is that W8 natively recognizes the raw format, and therefore does not show the extension of the non-formatted differently formatted.
This problem does not exist with previous versions of Windows.
I have yet no solution to offer.
The iscsi disk had been partitioned and formatted in NTFS with Windows 8?
Re: Change size of a ZFS-Volume while online
Posted: 15 Sep 2013 15:23
by drnicolas
In conclusion, it seems to be an issue of Windows 7 , not ZFS/iSCSI
I had to re-format the 350GB virtual disk. Now the capcity is correct, the Contents is gone!.
But the Problem will come back, as I have to wait for bigger hard-drives.
A good How-to for These cases from somebody with lots of experiences would be fine.
Re: Change size of a ZFS-Volume while online
Posted: 15 Sep 2013 16:10
by sleid
hi,
NO, in conclusion, it seems to be an issue of Windows 8 , not windows 7 !!
Re: Change size of a ZFS-Volume while online
Posted: 15 Sep 2013 18:14
by drnicolas
Oka, my Problem happened in Windows 7. I don't have Windows 8 so far.
Re: Change size of a ZFS-Volume while online
Posted: 15 Sep 2013 19:32
by sleid
I never had this problem with windows 7, but I use a procedure that requires restarting the NAS.
So I gives as given on the French forum.
Increase the size of a disk Iscsi: ZFS set volsize xxxx = (M, G, T) mountpoint / IscsiX
example: ZFS set volsize = 1200G Tank/Iscsi1
Is is possible to increase the size of a iscsi disk without destroying data? YES
to do this in the gui (services, iscsi target):
_ Remove the iscsi target (make a screenshot before).
_ Restart FreeNAS.
_ Remove the iscsi target (yes again!).
_ Remove the corresponding extension (make a screenshot before).
_ Increase the size of the disk (ZFS set volsize xxxx = (M, G, T) mountpoint / IscsiX).
_ Recreate the iSCSI target (disk size appears increased).
_ Recreate the corresponding extension.
If the target and extension have been recreated with the same names as before,
in the disk manager of the PC that is connected to the disk,
will appear a disk with a partition size of the former and an empty partition.
Simply extend the first partition with the empty partition to recover a disk
the new size containing the data.