SMB share showing FULL even tho it has lots of room

mudshark

Contributor
Joined
Jan 17, 2015
Messages
119
There are several SMB shares on a single FreeNAS box.
The "Backup" share (\\server\backups) says it's nearly full, with 9TB on it. Actually, it has about 16GB on it, not 9TB!
It was nearly full until I deleted 90% of what was there and it still shows as full.
I rebooted the server, no difference.
I have 2 screen shots below. One shows the shares as mapped windows drives, the other is from the FreeNAS dashboard "agreeing" with the Windows assessment.
BTW, as long as the screen shot is there, notice something else curious:
Even tho all shares are on the same server volume they all have different takes on how much free space they think there is. 450G, 957G, 368G, 9.3T, and 906G. There are (5) 3T RAID1-0 drives in the volume.
Either way, my backup will not run as it thinks there's not enough space!
Thanks, all
RG
 

Attachments

  • Full FreeNAS share 2.jpg
    Full FreeNAS share 2.jpg
    135.6 KB · Views: 304
  • Full FreeNAS share.jpg
    Full FreeNAS share.jpg
    54.9 KB · Views: 319

Apollo

Wizard
Joined
Jun 13, 2013
Messages
1,458
I think the reason you have 9TB being allocated but may have only a few GB of files visible might be the result of the snapshots holding your data.
If you are fine with the state of yur backup, you could destroy some of the snapshot holding the most data.
 

mudshark

Contributor
Joined
Jan 17, 2015
Messages
119
SNAPSHOTS! Of course! 3500+ OK, I need a new snapshot strategy. To get started I need to clean up here, is there a way to "select all" for deletion? If I was ever to need something restored from a snapshot, is that something that can be done or are they not so much like backups? I really need to read up on snapshots. Thank you. I have more work to do!
What do *your* snapshot jobs look like?
Thanks much.
 

Apollo

Wizard
Joined
Jun 13, 2013
Messages
1,458
I normally handle my snapshot strategy using CLI over SSH, and the reason is that I can generate and perform various operation related to snapshots.
First of all, it is easy to just run a command to list the snapshot for a single dataset and export it to a file to be looked at within a text editor on your Windows PC.
Snapshots allow you to create clones which you can use to access files that are no longer availbale in your file system when you deleted them. They are no longer availbale unless you clone the snapshot that have them.

There is a way to delete all the snapshot from within Freenas GUI, but unless you are sure you have backup of your data I wouldn't do that.
Within Freeans GUI, you can sort snapshots by dataset and you can filter them by name content, then select them all and press delete.

The more tedious approach is to create the list of snapshots and save them to a file. I would recommend the following:

zfs list -t snapshot -d 1 -o name -H -r pool_name/dataset_name >zfs_list.txt

What this command does is to list all the snapshots belonging to "pool_name/dataset_name". It format the output to only list the name of the snapshots and only output the snapshot of the current dataset. This is useful for not listing the children dataset as well.
The file will be create as a text file named "zfs_list.txt". You may have to change the ownership to be able to modify it.

If you want to delete one or more snapshots, you can use the followign command:

zfs destroy pool_name/dataset_name@auto-xxxxx

To automate, you can edit the text file and insert the above "zfs destroy" command in front of the snapshot name.
You can also create a script to do that as well, but make sue you do not destroy them all. Leave a few intact.

There is a user on this forum or GITHUB that had a script to do just such a thing.
For now, I would suggest the file and select the snapshot you want to delete, one at a time.

If you run the follwoing command:
zfs list -t snapshot -d 1 -r pool_name/dataset_name >zfs_list.txt
You will be able to see in the REFER column when data has been deleted. When data is being deleted, the value in the REFER column will go down. The snapshot with the large value prior could be deleted if not needed and the recovered space will slowly increase.
While you are doing that, you can use Netdata to monitor your dataset and you should be able to see the graph update as the delete takes place.
 

mudshark

Contributor
Joined
Jan 17, 2015
Messages
119
What I'd like to do is delete *ALL* snapshots (all data is securely backed up elsewhere anyway) and start over with a snapshot task that creates fewer, shorter-lived snapshots.
Let's say the path to my SMB shares is /mnt/zebra/sharename.
Let's also say a random snapshot name is "auto-20181124.200-9w"
I am familiar with the GUI but not so much with the CMS shell.
Once I open shell I have a [root@freenas ~]# prompt.
Were DOS-type wildcards are permitted, on that line I'd issue a command like "zfs destroy zebra/auto-201*"
Naturally, I will assume DOS-type wildcards are NOT permitted! What would my command be?
Thanks much.
RG
 

mudshark

Contributor
Joined
Jan 17, 2015
Messages
119
In the command window at the [root@freenas ~]# prompt I ran both those commands but they both failed.
[root@freenas ~]# zfs destroy snap1
cannot open 'snap1': dataset does not exist
[root@freenas ~]# zfs destroy snap2
cannot open 'snap2': dataset does not exist
 

Apollo

Wizard
Joined
Jun 13, 2013
Messages
1,458
Have look at the Oracle website about zfs, it will be useful:
https://docs.oracle.com/cd/E19253-01/819-5461/gbcya/index.html

If your pool is called "zebra" and the dataset under it is "sharename".
If you have snapshots of "sharename" such as "sharename@auto-20181124.200-9w" then the command you eed to run is as follow:

zfs destroy sharename@auto-20181124.200-9w"
 

mudshark

Contributor
Joined
Jan 17, 2015
Messages
119
zfs destroy sharename@auto-20181124.200-9w
Will destroy a single snapshot. How would a wildcard be used to get 'em all? Something in the DOS world like:
zfs destroy sharename@auto-2018*
 

Apollo

Wizard
Joined
Jun 13, 2013
Messages
1,458
You can't do wildcard snapshot destruction.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
You can't do wildcard snapshot destruction.
But you can do a range:
zfs destroy pool/dataset@snapshot-xxx%snapshot-yyy

Where the 2 given snapshots are separated in time, all snapshots between them will also be deleted.
 

Apollo

Wizard
Joined
Jun 13, 2013
Messages
1,458
Interesting. I didn't know it was possible.
Will need to check.
Were did you find this information?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700

mudshark

Contributor
Joined
Jan 17, 2015
Messages
119
As I go thru the snapshots, deleting, I see some are JAILS snapshots & some IOCAGE snapshots
Are these something I ought not delete or are they just snapshots, like any other?
Thanks.
 
Last edited:
Top