Page 1 of 1

ZFS (RAIDZ1) Missing Space

Posted: 21 Oct 2015 10:09
by redrick72
Hi everybody,
I'm going mad trying to understand why I've different views of my space and finally the situation is that I've no more space on my pool!!!
Here some hints to show my situation.
Nas4Free version:
N4F_Version.JPG
Nas4Free space usage from GUI:
Space_Usage.JPG
My pool:
Pool001.JPG
Some ZFS commands:
ZFS_list.JPG
ZFS_get.JPG
So...I really believe I've more that 50GB free on the pool, but I can't add anything since the system tells me that there's no free space (0)!!!
Did someone know how I can recover/get back my missing space???
Thank you!

Re: ZFS (RAIDZ1) Missing Space

Posted: 21 Oct 2015 10:36
by crowi
It is used as overhead, but you shouldn't fill your pool this much, you might get severe performance problems
see #8:
http://constantin.glez.de/blog/2010/04/ ... #freespace

Re: ZFS (RAIDZ1) Missing Space

Posted: 21 Oct 2015 11:05
by redrick72
Thank you for your fast answer.
If I free up some space do you think I'll recover also overhead space? For example, if I'm going to delete 100GB files I'll recover 120GB space?
Anyway, looking at your link, I've to manage to have about 20% of free space on the pool to let it work properly.
I can obtain that in 2 ways:
- by deleting some files from the pool. I hope that the space will be recovered (as I said above).
- by changing the disks (one at a time) and resilvering the pool (now I've 500GB disks and I'm planning to have 2TB disks). Did you foresee any problem doing that with a pool that's filled up like mine? Maybe I've to free some space before doing that?
Thank you.

Re: ZFS (RAIDZ1) Missing Space

Posted: 21 Oct 2015 12:08
by redrick72
I've a big problem now!
I've moved out to another disk 100GB of files, but they're still in place in the pool. If I try to delete them "rm -f" the system doesn't delete the file!!!
So, trying to get more free space moving files doesn't free up space!!! Files moved are in another disk, but I see also them on the ZFS pool and I can't delete them from ZFS!!!
???

Re: ZFS (RAIDZ1) Missing Space

Posted: 21 Oct 2015 12:10
by b0ssman
that happens when you fill the pool to 100%. one of the reasons you should not do it.

find a big file and do this
"echo > /path/to/file/you/want/to/delete"

Re: ZFS (RAIDZ1) Missing Space

Posted: 21 Oct 2015 12:42
by redrick72
Thank you it seems to work, with some differences.
When I sent the command using the full path it didn't work (not enough space on disk).
So, I browsed till the files directory and sent "echo > file_to_delete" and it worked!
Now I'm deleting some files and space seems to be recovered.
I'll let you know the progress...
Thanks again!

Re: ZFS (RAIDZ1) Missing Space

Posted: 21 Oct 2015 12:54
by crowi
by changing the disks (one at a time) and resilvering the pool (now I've 500GB disks and I'm planning to have 2TB disks). Did you foresee any problem doing that with a pool that's filled up like mine? Maybe I've to free some space before doing that?

-„If there’s more than one possible outcome of a job or task, and one of those outcomes will result in disaster or an undesirable consequence, then somebody will do it that way.“ Edward A. Murphy -

So:
- Back up your data (!)
- Then it depends on how many disks are in your pool, i.e. how often do you need to resilver and how fast and old are your disks.
Resilvering can stress the disks and lead to a fault. On RAIDZ1 only one drive can fail. If a seciond one fails during resilvering the data is most likely gone.
- Therefore it might be easier and faster to set up a new Pool and copy the data over.

Re: ZFS (RAIDZ1) Missing Space

Posted: 21 Oct 2015 13:53
by redrick72
Back again.
I've deleted some files (more than 100GB) and here's my situation.
After_Delete.JPG
I've 53GB of available space for swap partition that I don't need. Swap is intended to be fixed (in my mind).
How can I manage to see those 53GB in my data mountpoint instead in swap?
ThaaaaaaaaanX!

Re: ZFS (RAIDZ1) Missing Space

Posted: 21 Oct 2015 14:12
by redrick72
crowi wrote: - Back up your data (!)
- Then it depends on how many disks are in your pool, i.e. how often do you need to resilver and how fast and old are your disks.
Resilvering can stress the disks and lead to a fault. On RAIDZ1 only one drive can fail. If a seciond one fails during resilvering the data is most likely gone.
- Therefore it might be easier and faster to set up a new Pool and copy the data over.
I agree! I'll backup important data and then leave not important on the disks.
Then, I can't create a new Pool and copy the data over because in my HW I've only 4 SATA ports so I can't build up another ZFS Z1 pool with new disks without resilvering the old pool -> so introducing one new disk at a time.
I understand it's risky, but I don't want (and I can't afford now) to purchase a new server.

Re: ZFS (RAIDZ1) Missing Space

Posted: 21 Oct 2015 14:50
by Parkcomm
redrick72 wrote:How can I manage to see those 53GB in my data mountpoint instead in swap?
System|Advanced|Swap|Disable
zfs destroy

Re: ZFS (RAIDZ1) Missing Space

Posted: 21 Oct 2015 20:05
by redrick72
I've done it and I'm doing some verification.
It seems that the space I can see within N4F (both GUI or Command) is different of what i can see in Win 10 with the same volume mapped as a share....I'll go in deep.

Re: ZFS (RAIDZ1) Missing Space

Posted: 22 Oct 2015 18:41
by redrick72
Back again.
So, here's the situation via command line:
Space_Usage_ZFS.JPG
Then, I've mapped all that pool to a SMB share to access it via Windows.
Here what I've in Windows asking for properties on the share and asking for properties of all the directories and files included in that share: in my mind, but I think also in the reality, these must have the same value and mus be equal also to what extracted from ZFS list.
Share_Space.JPG
I've "ZFS list" command with the same value of the share properties in windows, but different (more than 200GB!!!) from the real files occupation.
The problem is that I think that the real value is the lower one, but when I reach the maximum used space expressed in the share properties I can't put more files!
How can I manage to have the real space occupation? Or better, to recover those 200GB...for me are not peanuts!

Re: ZFS (RAIDZ1) Missing Space

Posted: 23 Oct 2015 01:08
by Parkcomm
For technical correctness:

zpool list has more free space than zfs list because of compression

You can probably make that free space visible to SMB with an appropriate value for reservation inDisks|ZFS|Datasets|Dataset|Edit

However your zpool is full

(Crowl told you this in the first reply to your post)

Keep pool capacity under 80% for best performance. Due to the copy-on-write nature of ZFS, the filesystem gets heavily fragmented. Email reports of capacity at least monthly.

https://pthree.org/2012/12/13/zfs-admin ... d-caveats/

You already have 33% fragmentation, you are asking for trouble if you try to utilise the existing free capacity

Re: ZFS (RAIDZ1) Missing Space

Posted: 23 Oct 2015 10:07
by redrick72
Hi,
freeing up space was exactly what I made and the pictures in my previous post were the consequences.
I was wondering to have more free space (I moved roughly 250GB and only 90GB were recovered).
Anyway, after a reboot of the server, here's the new situation:
After_reboot.JPG
So, I've done nothing more and the situation changed in the way I was expecting.
I'll work to free up more space, but the situation now is quite pretty clear.
Still have fragmentation, but free space is now quite near to the 80% quota (85%)...
Thanks!

Re: ZFS (RAIDZ1) Missing Space

Posted: 23 Oct 2015 11:38
by Parkcomm
It won't unfragment, unless you delete those already fragmented files. Its not a problem in itself, don't worry about it.

I may have been a bit heavy handed in my last post - but I didn't want to be they guy that explained exactly how to use 100% of your capacity (the first three lines), and then saw you lock up your filesystem!

Personally for a home server, I wouldn't panic about 90% usage, if you have control over what goes on the file system.

Re: ZFS (RAIDZ1) Missing Space

Posted: 27 Oct 2015 16:38
by redrick72
Ok, don't worry!
I understand. Anyway, I use the NAS as Home File Server, so it's ok.
Since my HW has an eSATA port (with multiplier) I'm wondering to connect an external array of disks and create a new pool to have other space available.
For now, thank you (and all the people in the forum) for supporting me!!!

Re: ZFS (RAIDZ1) Missing Space

Posted: 28 Oct 2015 09:37
by Parkcomm
Have fun