# Maximum number of ZFS snapshots?



## Klinki (Aug 24, 2010)

Hello,

i am using sysutils/freebsd-snapshot for regular snapshot of my ZFS filesystem. It works so far very nicely but there is one warning in the logs which i do not understand:

```
snapshot: schedule /,/usr,/var:12:30:24 on filesystem / would require more than maximum number of 20 possible snapshots
```

I checked the periodic snapshot script and the 20 is a hard coded value. But as far as i know is there no such small limit of snapshots. Can anyone help me out to eliminate this warning.

Thanks in advance.


----------



## graudeejs (Aug 24, 2010)

zfs is not limited to snapshot counf (On my server I make 1 snapshot per hour and keep them for 5 days, then I have 2 snapshots per day, that I keep 2 weeks, and 1 snapshot per month, that I keep a year...... Works fine)

But UFS indeed is limited to 20 snapshots....
I think you're using UFS and not ZFS (at least for some filesystems)

i'm using sysutils/zfsnap (my own baby)


----------



## Klinki (Aug 24, 2010)

killasmurf86 said:
			
		

> zfs is not limited to snapshot counf
> 
> But UFS indeed is limited to 20 snapshots....
> I think you're using UFS and not ZFS (at least for some filesystems)



Thanks for clarification. This is indeed the problem. After hinting me in this direction i found the relevant sentence in the man page:

```
Keep in mind that a maximum total
number of 20 snapshots can be created on a UFS filesystem only.
```

Guess i have to check another snapshot program


----------



## shitson (Aug 24, 2010)

If you get a chance read the whitepapers on ZFS (from Sun now Oracle) they are very interesting - Here is some lit from Wikipedia 

* 2^64 â€” Number of snapshots of any file system[14]

ZFS was made in every regard to be so large it would never be possible to reach it's limitations.


----------



## graudeejs (Aug 24, 2010)

shitson said:
			
		

> If you get a chance read the whitepapers on ZFS (from Sun now Oracle) they are very interesting - Here is some lit from Wikipedia
> 
> * 2^64 â€” Number of snapshots of any file system[14]
> 
> ZFS was made in every regard to be so large it would never be possible to reach it's limitations.



Like I said... it's Unlimited about of snapshots... (ok it's limited, but by the time you reach that limit, there will be yfs (yottabyte file system) with yotabyte HDD's on phones. lol)

btw 2^64=18'446'744'073'709'551'616


----------



## Klinki (Aug 24, 2010)

ZFS snapshot can be 2^64 but not UFS snapshot on ZFS - there seems to be the 20 snapshot limit.
I am using now killasmuf86s port of sysutils/zfsnap and it's working like a charm.


----------

