This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!



I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!

Change size of a ZFS-Volume while online

Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
drnicolas
Advanced User
Advanced User
Posts: 180
Joined: 15 Aug 2013 14:03
Location: Wiesbaden, Germany
Status: Offline

Change size of a ZFS-Volume while online

Post 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.
HP Proliant N54L - Bios Mod -16GB non-ECC-RAM - ZFS RAIDZ1 (3x3TB) - 1VM running XigmaNAS 11.2.0.4.6026

sleid
PowerUser
PowerUser
Posts: 774
Joined: 23 Jun 2012 07:36
Location: FRANCE LIMOUSIN CORREZE
Status: Offline

Re: Change size of a ZFS-Volume while online

Post 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.
12.1.0.4 - Ingva (revision 7852)
FreeBSD 12.1-RELEASE-p12 #0 r368465M: Tue Dec 8 23:25:11 CET 2020
X64-embedded sur Intel(R) Atom(TM) CPU C2750 @ 2.40GHz Boot UEFI
ASRock C2750D4I 2 X 8GB DDR3 ECC
Pool of 2 vdev Raidz1: 3 WDC WD40EFRX + 3 WDC WD40EFRX

drnicolas
Advanced User
Advanced User
Posts: 180
Joined: 15 Aug 2013 14:03
Location: Wiesbaden, Germany
Status: Offline

Re: Change size of a ZFS-Volume while online

Post 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!
HP Proliant N54L - Bios Mod -16GB non-ECC-RAM - ZFS RAIDZ1 (3x3TB) - 1VM running XigmaNAS 11.2.0.4.6026

User avatar
ChriZathens
Forum Moderator
Forum Moderator
Posts: 758
Joined: 23 Jun 2012 09:14
Location: Athens, Greece
Contact:
Status: Offline

Re: Change size of a ZFS-Volume while online

Post by ChriZathens »

Did you actually extend the partition from disk manager in windows?
My Nas
  1. Case: Fractal Design Define R2
  2. M/B: Supermicro x9scl-f
  3. CPU: Intel Celeron G1620
  4. RAM: 16GB DDR3 ECC (2 x Kingston KVR1333D3E9S/8G)
  5. PSU: Chieftec 850w 80+ modular
  6. Storage: 8x2TB HDDs in a RaidZ2 array ~ 10.1 TB usable disk space
  7. O/S: XigmaNAS 11.2.0.4.6625 -amd64 embedded
  8. Extra H/W: Dell Perc H310 SAS controller, crosflashed to LSI 9211-8i IT mode, 8GB Innodisk D150SV SATADOM for O/S

Backup Nas: U-NAS NSC-400, Gigabyte MB10-DS4 (4x4TB Seagate Exos disks in RaidZ configuration - 32GB RAM)

drnicolas
Advanced User
Advanced User
Posts: 180
Joined: 15 Aug 2013 14:03
Location: Wiesbaden, Germany
Status: Offline

Re: Change size of a ZFS-Volume while online

Post 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!
HP Proliant N54L - Bios Mod -16GB non-ECC-RAM - ZFS RAIDZ1 (3x3TB) - 1VM running XigmaNAS 11.2.0.4.6026

drnicolas
Advanced User
Advanced User
Posts: 180
Joined: 15 Aug 2013 14:03
Location: Wiesbaden, Germany
Status: Offline

Re: Change size of a ZFS-Volume while online

Post 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!
HP Proliant N54L - Bios Mod -16GB non-ECC-RAM - ZFS RAIDZ1 (3x3TB) - 1VM running XigmaNAS 11.2.0.4.6026

sleid
PowerUser
PowerUser
Posts: 774
Joined: 23 Jun 2012 07:36
Location: FRANCE LIMOUSIN CORREZE
Status: Offline

Re: Change size of a ZFS-Volume while online

Post 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?
12.1.0.4 - Ingva (revision 7852)
FreeBSD 12.1-RELEASE-p12 #0 r368465M: Tue Dec 8 23:25:11 CET 2020
X64-embedded sur Intel(R) Atom(TM) CPU C2750 @ 2.40GHz Boot UEFI
ASRock C2750D4I 2 X 8GB DDR3 ECC
Pool of 2 vdev Raidz1: 3 WDC WD40EFRX + 3 WDC WD40EFRX

drnicolas
Advanced User
Advanced User
Posts: 180
Joined: 15 Aug 2013 14:03
Location: Wiesbaden, Germany
Status: Offline

Re: Change size of a ZFS-Volume while online

Post 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.
HP Proliant N54L - Bios Mod -16GB non-ECC-RAM - ZFS RAIDZ1 (3x3TB) - 1VM running XigmaNAS 11.2.0.4.6026

sleid
PowerUser
PowerUser
Posts: 774
Joined: 23 Jun 2012 07:36
Location: FRANCE LIMOUSIN CORREZE
Status: Offline

Re: Change size of a ZFS-Volume while online

Post by sleid »

hi,
NO, in conclusion, it seems to be an issue of Windows 8 , not windows 7 !!
12.1.0.4 - Ingva (revision 7852)
FreeBSD 12.1-RELEASE-p12 #0 r368465M: Tue Dec 8 23:25:11 CET 2020
X64-embedded sur Intel(R) Atom(TM) CPU C2750 @ 2.40GHz Boot UEFI
ASRock C2750D4I 2 X 8GB DDR3 ECC
Pool of 2 vdev Raidz1: 3 WDC WD40EFRX + 3 WDC WD40EFRX

drnicolas
Advanced User
Advanced User
Posts: 180
Joined: 15 Aug 2013 14:03
Location: Wiesbaden, Germany
Status: Offline

Re: Change size of a ZFS-Volume while online

Post by drnicolas »

Oka, my Problem happened in Windows 7. I don't have Windows 8 so far.
HP Proliant N54L - Bios Mod -16GB non-ECC-RAM - ZFS RAIDZ1 (3x3TB) - 1VM running XigmaNAS 11.2.0.4.6026

sleid
PowerUser
PowerUser
Posts: 774
Joined: 23 Jun 2012 07:36
Location: FRANCE LIMOUSIN CORREZE
Status: Offline

Re: Change size of a ZFS-Volume while online

Post 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.
12.1.0.4 - Ingva (revision 7852)
FreeBSD 12.1-RELEASE-p12 #0 r368465M: Tue Dec 8 23:25:11 CET 2020
X64-embedded sur Intel(R) Atom(TM) CPU C2750 @ 2.40GHz Boot UEFI
ASRock C2750D4I 2 X 8GB DDR3 ECC
Pool of 2 vdev Raidz1: 3 WDC WD40EFRX + 3 WDC WD40EFRX

Post Reply

Return to “ZFS (only!)”