bdrewery / zfstools

Various ZFS scripts. Most notably, zfs-auto-snapshot, a ruby clone of OpenSolaris auto snapshotting
Other
141 stars 28 forks source link

Feature request: alternative snapshot prefix #37

Open hc42 opened 6 years ago

hc42 commented 6 years ago

Hi,

I have multiple servers returning me zfs error 63 on snapshot creation. The problem is the long snapshot name and path. So my solution for now is to use a shorter prefix like "auto" or even a single "a" instead of "zfs-auto-snap" and use different labels for the interval like "f" instead of "frequent". To do so I have to change zfstools.rb source. I would like to suggest a new command flag to overwrite the default snapshot_prefix if specified. Something like "-l auto" would be great. This might also be interesting for the "snapshot_format", the time format string appended.

bdrewery commented 5 years ago

Wow ENAMETOOLONG on snapshots? Which OS is this?

llua commented 5 years ago

freebsd most likely, i have been seeing the error since i started using the tool on the os

bdrewery commented 5 years ago

I think it would only happen if the dataset property snapdir was set to visible.

llua commented 5 years ago

It happens when set to hidden too.

% zfs get snapdir lux/zvol{,/netslum0}; dmesg | awk -v pat=$_ '$0 ~ pat && !seen[$1]++'
NAME               PROPERTY  VALUE    SOURCE
lux/zvol           snapdir   hidden   default
lux/zvol/netslum0  snapdir   -        -
g_dev_taste: make_dev_p() failed (gp->name=zvol/lux/zvol/netslum0@zfs-auto-snap_frequent-2018-09-20-07h10p1, error=63)
bdrewery commented 5 years ago

Oh right zvols. I thought this was handled already too. Which release is that?

llua commented 5 years ago

11.2-RELEASE-p2 but the issue was happening as far back as 10.x from my usage.

openspork commented 5 years ago

Having this issue too in FreeBSD 11.2 -- issue is apparently resolved in FreeBSD 12 which is right around the corner.

llua commented 5 years ago

@openspork do you have a link referencing it being fix?

openspork commented 5 years ago

@openspork do you have a link referencing it being fix?

No ... somebody on the FreeBSD IRC tried in 12 and it didn't have this issue.

jeffpc commented 3 years ago

I found zfstools a few days ago and enabled it. Unfortunately, my FreeBSD 12.2 box is getting a flood of log messages like this one:

ZFS WARNING: Unable to create ZVOL                                                                       
zroot/usr/home/vm/dovecot-dev1/disk0@zfs-auto-snap_hourly-2020-11-16-03h00 (error=63).

Yes, it is a zvol. Creating the snapshot manually via zfs(8) works.