SOLVED Why is my Zpool misreporting used/free space?

Status
Not open for further replies.

frishi

Dabbler
Joined
Feb 12, 2015
Messages
12
I upgraded to 9.3 a month ago. Past that I upgraded my ZFS pools, and somewhere in that process, I must have done something stupid, because I lost my movies and tvshows. Music was on a different Zpool and that survived.

Now, bizarrely, the movies/tvshows zpool shows 3 TB used. When in fact:

Code:
du -ch movies -> 600G total
du -ch tvshows -> 343G total
du -ch software -> 89G total


I turned on snapshots after I upgraded to 9.3, FYI

How and why is my zpool is reporting 3TB as used is beyond me. Does this mean that my movies and tvshows were not deleted when I upgraded the zpool?

this is the output of my zpool list: (shikran is the zpool in question)

Code:
NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROO
T
freenas-boot 14.9G 945M 14.0G - - 6% 1.00x ONLINE -
misal 1.81T 822G 1.01T - 25% 44% 1.00x ONLINE /mnt
shikran 10.9T 3.92T 6.96T - 3% 36% 1.00x ONLINE /mnt
tari 2.72T 11.6G 2.71T - 0% 0% 1.00x ONLINE /mnt


Help!
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Well, snapshots will use some pool capacity, how much depends on how much has changed since the snapshot. What's the output of zfs list and zfs list -t snapshot?
 

frishi

Dabbler
Joined
Feb 12, 2015
Messages
12
Output of zfs list
Code:
NAME                                                      USED  AVAIL  REFER  MOUNTPOINT                                          
freenas-boot                                              944M  13.5G    31K  none                                                
freenas-boot/ROOT                                         936M  13.5G    31K  none                                                
freenas-boot/ROOT/Wizard-2015-01-03_22:39:50                1K  13.5G   931M  legacy                                              
freenas-boot/ROOT/default                                 936M  13.5G   935M  legacy                                              
freenas-boot/grub                                        7.77M  13.5G  7.77M  legacy                                              
misal                                                     822G   976G   160K  /mnt/misal                                          
misal/cloudfiles                                         6.09M   976G  6.09M  /mnt/misal/cloudfiles                               
misal/serverbackup                                       10.8G  89.2G  10.8G  /mnt/misal/serverbackup                             
misal/timemachine1                                        471G   976G   471G  /mnt/misal/timemachine1                             
misal/timemachine2                                        340G   976G   340G  /mnt/misal/timemachine2                             
shikran                                                  3.92T  6.62T  2.97T  /mnt/shikran                                        
shikran/.system                                           343M  6.62T   286M  legacy                                              
shikran/.system/cores                                    49.8M  6.62T  49.8M  legacy                                              
shikran/.system/rrd-f36704f2fe794cb6a75657843255655d      144K  6.62T   144K  legacy                                              
shikran/.system/samba4                                   1.02M  6.62T  1.02M  legacy                                              
shikran/.system/syslog-f36704f2fe794cb6a75657843255655d  5.39M  6.62T  5.39M  legacy                                              
shikran/.warden-template-pluginjail                       703M  6.62T  2.98M  /mnt/shikran/.warden-template-pluginjail            
shikran/jails                                            6.85G  6.62T   228K  /mnt/shikran/jails                                  
shikran/jails/.warden-template-pluginjail                 719M  6.62T   719M  /mnt/shikran/jails/.warden-template-pluginjail      
shikran/jails/.warden-template-standard                  1.54G  6.62T  1.54G  /mnt/shikran/jails/.warden-template-standard        
shikran/jails/btsync_1                                    326M  6.62T  1.02G  /mnt/shikran/jails/btsync_1                         
shikran/jails/couchpotato_1                               182M  6.62T   896M  /mnt/shikran/jails/couchpotato_1                    
shikran/jails/firefly_1                                   123M  6.62T   837M  /mnt/shikran/jails/firefly_1                        
shikran/jails/headphones_1                                203M  6.62T   917M  /mnt/shikran/jails/headphones_1                     
shikran/jails/plexmediaserver_1                          2.18G  6.62T  2.87G  /mnt/shikran/jails/plexmediaserver_1                
shikran/jails/sabnzbd_1                                   196M  6.62T   910M  /mnt/shikran/jails/sabnzbd_1                        
shikran/jails/sonarr_1                                    399M  6.62T  1.09G  /mnt/shikran/jails/sonarr_1                         
shikran/jails/subsonic_1                                  958M  6.62T  1.63G  /mnt/shikran/jails/subsonic_1                       
shikran/jails/transmission_1                              102M  6.62T   816M  /mnt/shikran/jails/transmission_1                   
shikran/movie_watch                                      3.33G  6.62T  3.33G  /mnt/shikran/movie_watch                            
shikran/movies                                            601G  6.62T   601G  /mnt/shikran/movies                                 
shikran/software                                         84.9M  6.62T  84.9M  /mnt/shikran/software                               
shikran/tvshow_watch                                     12.5G  6.62T  12.5G  /mnt/shikran/tvshow_watch                           
shikran/tvshows                                           343G  6.62T   343G  /mnt/shikran/tvshows                                
tari                                                     11.6G  2.62T  11.6G  /mnt/tari                                           
tari/.system                                              600K  2.62T   168K  /mnt/tari/.system                                   
tari/.system/cores                                        144K  2.62T   144K  /mnt/tari/.system/cores                             
tari/.system/samba4                                       144K  2.62T   144K  /mnt/tari/.system/samba4                            
tari/.system/syslog                                       144K  2.62T   144K  /mnt/tari/.system/syslog 



Output of zfs list -o space
Code:
NAME                                                     AVAIL   USED  USEDSNAP  USEDDS  USEDREFRESERV  USEDCHILD                 
freenas-boot                                             13.5G   944M         0     31K              0       944M                 
freenas-boot/ROOT                                        13.5G   936M         0     31K              0       936M                 
freenas-boot/ROOT/Wizard-2015-01-03_22:39:50             13.5G     1K         0      1K              0          0                 
freenas-boot/ROOT/default                                13.5G   936M      794K    935M              0          0                 
freenas-boot/grub                                        13.5G  7.77M        1K   7.77M              0          0                 
misal                                                     976G   822G         0    160K              0       822G                 
misal/cloudfiles                                          976G  6.09M         0   6.09M              0          0                 
misal/serverbackup                                       89.2G  10.8G         0   10.8G              0          0                 
misal/timemachine1                                        976G   471G         0    471G              0          0                 
misal/timemachine2                                        976G   340G         0    340G              0          0                 
shikran                                                  6.62T  3.92T         0   2.97T              0       968G                 
shikran/.system                                          6.62T   343M         0    286M              0      56.3M                 
shikran/.system/cores                                    6.62T  49.8M         0   49.8M              0          0                 
shikran/.system/rrd-f36704f2fe794cb6a75657843255655d     6.62T   144K         0    144K              0          0                 
shikran/.system/samba4                                   6.62T  1.02M         0   1.02M              0          0                 
shikran/.system/syslog-f36704f2fe794cb6a75657843255655d  6.62T  5.39M         0   5.39M              0          0                 
shikran/.warden-template-pluginjail                      6.62T   703M      700M   2.98M              0          0                 
shikran/jails                                            6.62T  6.85G         0    228K              0      6.85G                 
shikran/jails/.warden-template-pluginjail                6.62T   719M       88K    719M              0          0                 
shikran/jails/.warden-template-standard                  6.62T  1.54G       88K   1.54G              0          0                 
shikran/jails/btsync_1                                   6.62T   326M         0    326M              0          0                 
shikran/jails/couchpotato_1                              6.62T   182M         0    182M              0          0                 
shikran/jails/firefly_1                                  6.62T   123M         0    123M              0          0                 
shikran/jails/headphones_1                               6.62T   203M         0    203M              0          0                 
shikran/jails/plexmediaserver_1                          6.62T  2.18G         0   2.18G              0          0                 
shikran/jails/sabnzbd_1                                  6.62T   196M         0    196M              0          0                 
shikran/jails/sonarr_1                                   6.62T   399M         0    399M              0          0                 
shikran/jails/subsonic_1                                 6.62T   958M         0    958M              0          0                 
shikran/jails/transmission_1                             6.62T   102M         0    102M              0          0                 
shikran/movie_watch                                      6.62T  3.33G         0   3.33G              0          0                 
shikran/movies                                           6.62T   601G         0    601G              0          0                 
shikran/software                                         6.62T  84.9M         0   84.9M              0          0                 
shikran/tvshow_watch                                     6.62T  12.5G         0   12.5G              0          0                 
shikran/tvshows                                          6.62T   343G         0    343G              0          0                 
tari                                                     2.62T  11.6G         0   11.6G              0      1.65M                 
tari/.system                                             2.62T   600K         0    168K              0       432K                 
tari/.system/cores                                       2.62T   144K         0    144K              0          0                 
tari/.system/samba4                                      2.62T   144K         0    144K              0          0                 
tari/.system/syslog                                      2.62T   144K         0    144K              0          0  



Output of zfs list -t snapshot
Code:
NAME                                                     AVAIL   USED  USEDSNAP  USEDDS  USEDREFRESERV  USEDCHILD                 
freenas-boot                                             13.5G   944M         0     31K              0       944M                 
freenas-boot/ROOT                                        13.5G   936M         0     31K              0       936M                 
freenas-boot/ROOT/Wizard-2015-01-03_22:39:50             13.5G     1K         0      1K              0          0                 
freenas-boot/ROOT/default                                13.5G   936M      794K    935M              0          0                 
freenas-boot/grub                                        13.5G  7.77M        1K   7.77M              0          0                 
misal                                                     976G   822G         0    160K              0       822G                 
misal/cloudfiles                                          976G  6.09M         0   6.09M              0          0                 
misal/serverbackup                                       89.2G  10.8G         0   10.8G              0          0                 
misal/timemachine1                                        976G   471G         0    471G              0          0                 
misal/timemachine2                                        976G   340G         0    340G              0          0                 
shikran                                                  6.62T  3.92T         0   2.97T              0       968G                 
shikran/.system                                          6.62T   343M         0    286M              0      56.3M                 
shikran/.system/cores                                    6.62T  49.8M         0   49.8M              0          0                 
shikran/.system/rrd-f36704f2fe794cb6a75657843255655d     6.62T   144K         0    144K              0          0                 
shikran/.system/samba4                                   6.62T  1.02M         0   1.02M              0          0                 
shikran/.system/syslog-f36704f2fe794cb6a75657843255655d  6.62T  5.39M         0   5.39M              0          0                 
shikran/.warden-template-pluginjail                      6.62T   703M      700M   2.98M              0          0                 
shikran/jails                                            6.62T  6.85G         0    228K              0      6.85G                 
shikran/jails/.warden-template-pluginjail                6.62T   719M       88K    719M              0          0                 
shikran/jails/.warden-template-standard                  6.62T  1.54G       88K   1.54G              0          0                 
shikran/jails/btsync_1                                   6.62T   326M         0    326M              0          0                 
shikran/jails/couchpotato_1                              6.62T   182M         0    182M              0          0                 
shikran/jails/firefly_1                                  6.62T   123M         0    123M              0          0                 
shikran/jails/headphones_1                               6.62T   203M         0    203M              0          0                 
shikran/jails/plexmediaserver_1                          6.62T  2.18G         0   2.18G              0          0                 
shikran/jails/sabnzbd_1                                  6.62T   196M         0    196M              0          0                 
shikran/jails/sonarr_1                                   6.62T   399M         0    399M              0          0                 
shikran/jails/subsonic_1                                 6.62T   958M         0    958M              0          0                 
shikran/jails/transmission_1                             6.62T   102M         0    102M              0          0                 
shikran/movie_watch                                      6.62T  3.33G         0   3.33G              0          0                 
shikran/movies                                           6.62T   601G         0    601G              0          0                 
shikran/software                                         6.62T  84.9M         0   84.9M              0          0                 
shikran/tvshow_watch                                     6.62T  12.5G         0   12.5G              0          0                 
shikran/tvshows                                          6.62T   343G         0    343G              0          0                 
tari                                                     2.62T  11.6G         0   11.6G              0      1.65M                 
tari/.system                                             2.62T   600K         0    168K              0       432K                 
tari/.system/cores                                       2.62T   144K         0    144K              0          0                 
tari/.system/samba4                                      2.62T   144K         0    144K              0          0                 
tari/.system/syslog                                      2.62T   144K         0    144K              0          0  
 

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
Did it looks like you have separate datasets for movies, tv, and again "watch" for each of those; all children of the shikran dataset. I presume that you're missing files from each of those? Is it possible that you created those child datasets around the time that the files went missing? It's possible that the datasets are mounted on top of other data. If this is the case, it's still there, just hidden. The listing does indicate that the shikran is taking up almost 3TB and only 1TB is represented by child datasets (movies, tv).

You can check by unmounting the dataset. "zfs unmount shikran/movies"
If the files are there, move them aside, remount the dataset, and move the files in to the dataset. Alternatively, move the files out of the dataset and destroy it.

Also, I think your snapshot output is just the "-o space" output repeated. If you have any snapshots they would have an "@" in the name. The USEDSNAP does seem to indicate that there aren't many snapshots, if any at all. The only possible snapshots seem to be an your boot volume and jails (both expected). Are you sure they're turned on?
 

frishi

Dabbler
Joined
Feb 12, 2015
Messages
12
You are correct.
I turned off plugins, stopped all jails and ran zfs unmount /mnt/shikran/movies
I found all the old movies and tvshows.

I guess I have to move them to a holding area and then copy them over?
 

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
That's probably best.

And it seems like you probably have the space to do this in place.
Unmount shikran/movies, move anything in movies to movies_old, remount shikran/movies, move everything in movies_old to movies. This can be an issue if you have snapshots turned on as even with "mv" you'll end up with two copies of the data, but I'm pretty sure you don't have snapshots. Worst case, you won't have to worry about space when moving into movies_old (it's the same dataset) and when you movie things in to the new movies dataset, you can do small batches to make sure you aren't running out of space.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
It's easy enough to rename the directory movies to movies_old (and tv to tv_old, etc.) once you have the datasets unmounted. Then mount them, mv everything over, and optionally delete *_old at your leisure. IOW, there's no need to "move them to a holding area"; just rename the place(s) where they are so that it doesn't conflict with your dataset name(s).
 

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
That's a good point. I was stuck on the idea of preserving the original movies mountpoint, but "zfs mount" should just create that if it's not there.
 

frishi

Dabbler
Joined
Feb 12, 2015
Messages
12
Yes, that is my plan.
I moved the newly found movies and tvshows into a folder called hold.

Then, upon trying to remount the dataset using:
Code:
zfs mount /mnt/shikran/movies


I get an error saying:
[CODE} Invalid dataset name [/CODE]
 

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
The dataset is named "shikran/movies".
 
Status
Not open for further replies.
Top