Hello,
I have a 4 x 4TB disks Nas running with the TrueNAS service on it. The ZFS disk storage configuration is RAIDZ1 so the available space is about 75% of the physical storage. The service is up to date so right now I am running the TrueNAS 25.10.3.1 version.
Some days ago, my NAS has reached the 90% of the used space (It’s not related with the reasons but maybe it’s important). While the ZFS space was above the 90%, I have started to move some films from one dataset to another, and during that movement I have noticed that the used space has reached the 99.1%.
The first time I used the mv command to move the content of a folder to the new dataset but the films were not deleted until all were “copied” first, so I decide to change the way and I used a for loop to move one by one, and also I have used the command rsync with the --remove-source-files for the same reason (all the commands were executed directly on the NAS, not by SMB or NFS). No matter the way I have used, I have noticed that the free space is dissapearing even when the source file is deleted.
Here I have started to ask me where is the free space, because a film uses 30GB of space regardless the compression (they cannot be compressed), and the files weren’t duplicated. Also there are no snapshots on the pool, the datasets or similar:
% zfs list -t snapshot -r nas
no datasets available
also the freeing is almost 0 compared with the missing space:
% zpool get freeing nas
NAME PROPERTY VALUE SOURCE
nas freeing 17.8G -
The ZFS system was freeing some space but very far away from the lost space.
Thinking that maybe was something related with the fragmentation or the lack of free space because the pool was in a critical state staying above the 90% of the usage, I decided to free some space and move again the films. I deleted about 500GB of non critical videos, moved out to some old external HDD about 2.6TB freeing up to 3.1TB of space and leaving the ZFS near the much more confortable 70% of usage. After freeing all that space I have started to move the films again between datasets and for my surprise, another 500GB have been dissapeared from the pool and now I am unable to move the data that I have on my external drives back to their datasets. I am moving another 2TB of downloads to another dataset and I am getting the same, loosing again a lot of GB. I have not generated any new data in that NAS and from the 3.1TB I had, now I have 2.35TB and going down.
My pool and datasets distribution is:
- pool “nas”:
- nas/Media: source (Películas folder inside the dataset)
- nas/Media/Peliculas: destination
I am desesperated because I don’t know where is my space, what to do, what to check… I only know that my space is dissapearing without grown the containing data.
- I have checked if there are snapshots, and no, there are no snapshots. I have never created any but I have checked it anyway.
- The data is the same and it’s not duplicated. I have not seen any duplicated file.
- The configuration between the datasets is the same. Only changes the blocksize that was changed to 1MB (change to the original 128k blocksize later with the same result).
I have done a simple test moving one file:
% du 10\ minutos\ menos\ \(2019\)/10\ minutos\ menos\ \(2019\)\ Bluray-480p.avi --apparent-size
1797950 10 minutos menos (2019)/10 minutos menos (2019) Bluray-480p.avi
% du 10\ minutos\ menos\ \(2019\)/10\ minutos\ menos\ \(2019\)\ Bluray-480p.avi
1742350 10 minutos menos (2019)/10 minutos menos (2019) Bluray-480p.avi
mv 10\ minutos\ menos\ \(2019\)/10\ minutos\ menos\ \(2019\)\ Bluray-480p.avi ../
% du ../10\ minutos\ menos\ \(2019\)\ Bluray-480p.avi --apparent-size
1797950 ../10 minutos menos (2019) Bluray-480p.avi
% du ../10\ minutos\ menos\ \(2019\)\ Bluray-480p.avi
1795034 ../10 minutos menos (2019) Bluray-480p.avi
This is normal, the first uses a 1mb blocksize while the 2nd uses a 128k blocksize, so the compression of the data is a bit better and then the 2nd is bigger, but right now I am mooving the files from the 128k blocksize dataset to the 1mb blocksize dataset and I am loosing space. The compression cannot be because a mkv file contains a compressed video that at most you can compress a little, but not about a 23%.
Anyone can help my with this problem?, because for now the only solution I see is to destroy everything and start again, but I have no enough space outside the NAS to move all the data out and in again. Maybe I am missing something.
Thanks!!