Snapshots not being removed

Status
Not open for further replies.

morxy49

Contributor
Joined
Jan 12, 2014
Messages
145
When i show snapshots in the WebGUI and sort by size, the biggest one is 15,6GiB.
However, when running zfs list -ro space, this is the output:
Code:
NAME                                                           AVAIL   USED  USEDSNAP  USEDDS  USEDREFRESERV  USEDCHILD
external_ssd                                                    113G  1020K         0     96K              0       924K
freenas-boot                                                   2.37G  1.23G         0     31K              0      1.23G
freenas-boot/ROOT                                              2.37G  1.20G         0     25K              0      1.20G
freenas-boot/ROOT/9.10-STABLE-201603252134                     2.37G  18.4M         0   18.4M              0          0
freenas-boot/ROOT/9.10-STABLE-201604140622                     2.37G   228M         0    228M              0          0
freenas-boot/ROOT/9.10-STABLE-201604181743                     2.37G   986M      506M    480M              0          0
freenas-boot/ROOT/Initial-Install                              2.37G     1K         0      1K              0          0
freenas-boot/ROOT/default                                      2.37G    43K         0     43K              0          0
freenas-boot/grub                                              2.37G  25.3M     18.9M   6.33M              0          0
green_vol0                                                      442G  2.20T         0     96K              0      2.20T
green_vol0/Green Backup                                         442G  2.20T      704K    112K              0      2.20T
green_vol0/Green Backup/Backup                                  442G   251G      960K    251G              0          0
green_vol0/Green Backup/Media                                   442G  1.04T         0     96K              0      1.04T
green_vol0/Green Backup/Media/Audio                             442G  1.04T     28.7M   1.04T              0          0
green_vol0/Green Backup/Simons                                  442G   936G      248G    688G              0          0
green_vol0/Green Backup/configs                                 442G   252K       64K    188K              0          0
pandora_vol0                                                    922G  14.1T      188K    392K              0      14.1T
pandora_vol0/.system                                            922G   423M      614K    185M              0       237M
pandora_vol0/.system/configs-b09120b1be654e21b6168bb59225a20d   922G  14.9M      563K   14.4M              0          0
pandora_vol0/.system/cores                                      922G  93.0M      136K   92.8M              0          0
pandora_vol0/.system/rrd-b09120b1be654e21b6168bb59225a20d       922G   307K         0    307K              0          0
pandora_vol0/.system/rrd-f36704f2fe794cb6a75657843255655d       922G   307K         0    307K              0          0
pandora_vol0/.system/samba4                                     922G  26.2M     13.4M   12.8M              0          0
pandora_vol0/.system/syslog-b09120b1be654e21b6168bb59225a20d    922G  90.0M     80.3M   9.76M              0          0
pandora_vol0/.system/syslog-f36704f2fe794cb6a75657843255655d    922G  12.7M         0   12.7M              0          0
pandora_vol0/Backup                                             922G   252G      324K    252G              0          0
pandora_vol0/Guest                                              922G  5.32M         0   5.32M              0          0
pandora_vol0/Media                                              922G  12.5T     1.05T   10.4T              0      1.05T
pandora_vol0/Media/Audio                                        922G  1.05T     30.1M   1.05T              0          0
pandora_vol0/Simons                                             922G   961G      258G    703G              0          0
pandora_vol0/Torrent                                            922G   284G     6.92G    277G              0          0
pandora_vol0/configs                                            922G   452K      136K    316K              0          0
pandora_vol0/jails                                              922G  82.0G         0    614K              0      82.0G
pandora_vol0/jails/.warden-template-pluginjail                  922G   977M         0    977M              0          0
pandora_vol0/jails/.warden-template-pluginjail-9.2-x64          922G  1.36G     17.1K   1.36G              0          0
pandora_vol0/jails/.warden-template-pluginjail-9.3-x64          922G   919M     17.1K    919M              0          0
pandora_vol0/jails/plexmediaserver_2                            922G  77.6G     1.51G   76.1G              0          0
pandora_vol0/jails/transmission_1                               922G  1.14G      569M    595M              0          0


These snapshots should only be stored for 1 day, and should have been deleted by now. Why is, for example, pandora_vol0/Media taking up ~1T of data?
 
Last edited:

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Possibly the task that generated them no longer exists.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194

morxy49

Contributor
Joined
Jan 12, 2014
Messages
145
https://www.freebsd.org/cgi/man.cgi?zfs(8)

zfs destroy [-dnpRrv] snapshot[%snapname][,...]

you'll want something along the lines of

Code:
zfs destroy datasetname@snapshotname


Use -n to do a dry run.
But how do i find the snapshot that's taking up 1T of data? When listing snapshots in WebGUI the largest one is only 15,6GiB.
And yes, I'm sure that there is only a single, or maximum two, snapshots using up that 1T space. I know that because the 1T is coming from me copying my 1T music library from pandora_vol0/Media to pandora_vol0/Media/Audio, and then deleting it from pandora_vol0/Media. The deleting process took probably a bit under an hour, and my snapshot interval is set at once per hour, so there should be no more than 2 snapshots utilizing that 1T space.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
But how do i find the snapshot that's taking up 1T of data? When listing snapshots in WebGUI the largest one is only 15,6GiB.
And yes, I'm sure that there is only a single, or maximum two, snapshots using up that 1T space. I know that because the 1T is coming from me copying my 1T music library from pandora_vol0/Media to pandora_vol0/Media/Audio, and then deleting it from pandora_vol0/Media. The deleting process took probably a bit under an hour, and my snapshot interval is set at once per hour, so there should be no more than 2 snapshots utilizing that 1T space.
Code:
zfs list -t snapshot | less


Beware, it'll be a long output. Less will make it readable, somewhat.

You can also pipe it into a file with > filename instead of | less.
 

morxy49

Contributor
Joined
Jan 12, 2014
Messages
145
Code:
zfs list -t snapshot | less


Beware, it'll be a long output. Less will make it readable, somewhat.

You can also pipe it into a file with > filename instead of | less.
Thanks, I'll try that in a couple of hours when I'm home.
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,874
But how do i find the snapshot that's taking up 1T of data?
1T is the total combined snapshot space. It doesn't mean that there is 1 snapshot using 1T.
 

morxy49

Contributor
Joined
Jan 12, 2014
Messages
145
Sorry I didn't reply, had a busy day yesterday. But i got everything to work at last.

1T is the total combined snapshot space. It doesn't mean that there is 1 snapshot using 1T.

Yes, however, as I said before, it has to be allocated by 1 or maximum 2 snapshots, since my snapshot interval is at 1 hour.
Weirdly enough, all of the snapshots of pandora_vol0/Media were at 0K, but the total size was still 1T.

I ended up just deleting every snapshot, about 1000 of them, and then i got my 1T of space back.
This could be a bug, and I'm gonna try to keep an eye on it to see if it happens again.
 

rogerh

Guru
Joined
Apr 18, 2014
Messages
1,111
Every snapshot before the 1T was moved will be storing the 1T in its old place, so the 1T will only be regained when all snapshots before the move are removed.
 
Status
Not open for further replies.
Top