Strange problem ZFS space disappearing?!

Status
Not open for further replies.

asw2012

Contributor
Joined
Dec 17, 2012
Messages
182
As reported from CIFS through windows from a few months ago I have 15.2 TB of capacity. Now it reports 10.8TB

even in the GUI it reports 10.8TB - I've had no errors, have not done a thing to this setup.

the only thing I've changed is adding a minecraft server with the instructions outlined here: http://forums.freenas.org/index.php?threads/how-to-install-minecraft-server-in-a-jail.18246/

I've been playing on the server w/o any problems for over a month now - and I really don't believe the MC server has anything to do with this?

thanks...
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,996
You have not lost capacity, you have used up storage space and thus reduced the reported capacity of your share. Jails can and will consume your space depending on what you are doing, such as the minecraft server.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Joe, the OP is missing 5 *TERA*bytes of storage. That's certainly not because of the jail.
 

asw2012

Contributor
Joined
Dec 17, 2012
Messages
182
the MC server reports 1.1GB of data used...
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,996
I doubt 5TB of data is missing.

@asw2012 in the shell type the following and post it in code brackets or use pastebin.com and post the link.
Code:
df -g
 

asw2012

Contributor
Joined
Dec 17, 2012
Messages
182
I also created a clone from snapshots from a few months ago, it states 13.3TB size
then from one month ago, states 12.3TB size

MC server snapshots state at the beginning 1.05G
now, 1.11G

I don't know why disk space is disappearing?
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,996
I think you answered your own question... Snapshots. Those will take over if you're not careful and a lot of people have felt this pain before you. And I don't understand snapshots so I won't be able to help you out if that is the issue.
 

asw2012

Contributor
Joined
Dec 17, 2012
Messages
182
no !$!@? should I just keep them for 1-2 days max perhaps?
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Snapshots store the difference between what you have now, versus what you had at the time the snapshot was taken.

If you have a system, like mine, with largely static data, large files, a couple of which are added per week, then the snapshots are almost invisible in terms of space consumed.

But, if your system has a lot of changes made it very rapidly, then, your snapshots will quickly get out of hand.

Under almost all conditions, one snapshot per day, the snapshots held for a week, will rarely be a serious drain on your space. What is your current auto-snapshot schedule?
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,996
Only you could make that call and it will depend on why you need snapshots to be honest as most home users don't use it but there are a few. I know one thing that factors into it is how frequently you perform the snapshots and then of course how long you keep them. And lastly how much space can to dedicate to snapshots.

EDIT: Turned over to DrKK, I'll sit back and read and learn.
 

asw2012

Contributor
Joined
Dec 17, 2012
Messages
182
wowzers, well my schedule is 1 per hour kept for 4 months. I'm going to make a few changes :)
i'll report back after I've deleted 95% of what I don't need and get the proper schedule setup.

thanks.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Meh.

In a home environment, snapshots aren't that critical. Like I said, on my system, they're almost free to do. So I do them. But if my system was used in such a way that snapshots would take a lot of space constantly? Wouldn't do them.

The thing to remember about snapshots is that they are *NOT* backups. They have one purpose: they can restore the state of the storage to where it was before you did something to one or more files that you did not intend to do. So for example, I have a jail where my crucial things (ZNC, Mumble, DNS) are running. If I am going to mess with the jail (like put a new package in there), I make damn sure I have a snapshot, so that when I (inevitably) screw it up, I can just "revert".
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
wowzers, well my schedule is 1 per hour kept for 4 months. I'm going to make a few changes :)
i'll report back after I've deleted 95% of what I don't need and get the proper schedule setup.

thanks.
dude. Hourly kept for 120 days is insanity sir. You will blow away the space.

Let's go for daily, kept for 1-2 weeks. :)
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Another frequently seen paradigm (this is pretty fancy---you might do this if you have some mission-critical stuff and a bunch of users who are dumb), is this sort of layered schedule:

Hourly snapshots for the past day, kept for a day, plus:
Daily snapshots (1 per day) for the past week, kept for a week, plus:
Weekly snapshots (1 per week) for the past month (or two), kept for a month (or two), plus
Monthly snapshots (1 per month) for the past half year, kept for a half-year.

But for the average home user? Meh. A week's worth of daily snapshots. usually does the trick. Remember, it's not backups, it's an "in case I screw up" reverter.
 

asw2012

Contributor
Joined
Dec 17, 2012
Messages
182
gotta learn the hard way sometimes. I'm just glad nothing serious was screwed up.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Yeah it's very simple to go into your GUI, delete the snapshots you don't want or need, and reset the ZFS Snapshot schedule to something more sane. I imagine a bunch of people will find this post about snapshots (they'll have the same questions you did), and I think it's good to have all this detail in here for them.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,996
You know, I may setup snapshots on my critical data such as financial and photos data. It would be nice to have a small safety net for when I accidentally delete something. But then again I do maintain a DVD copy of that data created periodically.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Indeed. The snapshot is done on a given ZFS dataset (or, a dataset, and its descendant datasets---the "recursive" snapshot), so if you have a low-flux dataset that you reserve for rarely-changed files (or, you could create one now for this purpose), then, you can snapshot that thing all day long and not take up any noticeable space.
 

asw2012

Contributor
Joined
Dec 17, 2012
Messages
182
4TB of space just appeared. LoL

new snapshot schedule implemented.
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
Glad to hear you got your snapshots straightened out, without too much difficulty.

We had a user recently, who took snapshots every 15 minutes for several years and ran out of space. I think he had ~200,000 snapshots. It took him at least a week to clean up that mess.
 
Status
Not open for further replies.
Top