ZFS: .zfs/snapshot directory vanished
Attila Bogár
attila.bogar at linguamatics.com
Tue Jul 24 11:17:46 UTC 2012
Hi,
Thanks, cache ruled out. I'm trying to isolate the problem.
I set up a second box. I wiped 12 disks with dd, created a raidz2 pool,
created the datasets and copied all data with rsync (not zfs send to
avoid corruption in the zfs stream).
All went fine until I turned on I turned on the Amanda backup system.
Amanda backs up using creating a snapshot, gtaring the content and then
destroying the snapshot.
This was issued:
# zfs allow -ldu amanda mount,snapshot,destroy tank/export
The default port from misc/amanda-server doesn't work bydefault with
this feature:
define script-tool amzfs_snapshot {
comment "backup of zfs snapshot"
plugin "amzfs-snapshot"
execute-on pre-dle-amcheck, post-dle-amcheck, pre-dle-estimate,
post-dle-estimate, pre-dle-backup, post-dle-backup
execute-where client
}
Therefore, I wrote a patch (which I should send to the port maintainer)
- it was working fine for a year on 8.2-RELEASE:
--- /usr/local/lib/perl5/site_perl/5.14.2/Amanda/Application/Zfs.pm.orig
2012-07-05 11:15:22.000000000 +0100
+++ /usr/local/lib/perl5/site_perl/5.14.2/Amanda/Application/Zfs.pm
2012-07-06 11:28:07.000000000 +0100
@@ -82,9 +82,9 @@
waitpid $pid, 0;
close $rdr;
close $err;
+ chomp $zmountpoint;
- if ($? == 0) {
- chomp $zmountpoint;
+ if (($? == 0) && (substr($zmountpoint, 0, 1) ne '/')) {
# zfs dataset supplied
$self->{filesystem} = $device;
@@ -377,11 +377,14 @@
my $snapshotname = "";
if ($self->{action} eq 'check') {
- $snapshotname = "amanda-" .
Amanda::Util::sanitise_filename($self->{disk}) . "-check";
+ # $snapshotname = "amanda-" .
Amanda::Util::sanitise_filename($self->{disk}) . "-check";
+ $snapshotname = "amanda-check";
} elsif (!defined $level) {
- $snapshotname = "amanda-" .
Amanda::Util::sanitise_filename($self->{disk}) . "-current";
+ # $snapshotname = "amanda-" .
Amanda::Util::sanitise_filename($self->{disk}) . "-current";
+ $snapshotname = "amanda-current";
} else {
- $snapshotname = "amanda-" .
Amanda::Util::sanitise_filename($self->{disk}) . "-" . $level;
+ # $snapshotname = "amanda-" .
Amanda::Util::sanitise_filename($self->{disk}) . "-" . $level;
+ $snapshotname = "amanda-" . $level;
}
return $snapshotname;
I kicked off the backup and the snapshots have gone. I also had a kernel
panic that it couldn't unmount a snapshot.
This is the second box. I have the same problems with 9.1-PRERELEASE.
Any help would be greatly appreciated,
Thanks,
Attila
More information about the freebsd-fs
mailing list