From owner-freebsd-fs@FreeBSD.ORG Tue Jul 24 11:17:46 2012 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B4296106566B; Tue, 24 Jul 2012 11:17:46 +0000 (UTC) (envelope-from attila.bogar@linguamatics.com) Received: from mail.linguamatics.com (mail.linguamatics.com [188.39.80.203]) by mx1.freebsd.org (Postfix) with ESMTP id 6B17F8FC14; Tue, 24 Jul 2012 11:17:46 +0000 (UTC) Received: from secure.linguamatics.com (guardian.linguamatics.com [10.252.2.1]) by mail.linguamatics.com (Postfix) with ESMTPS id 7B7E2EFB460; Tue, 24 Jul 2012 12:17:45 +0100 (BST) Received: from [10.252.2.234] (vpn.abogar.linguamatics.com [10.252.2.234]) by secure.linguamatics.com (Postfix) with ESMTP id 80D978188; Tue, 24 Jul 2012 12:25:08 +0100 (BST) Message-ID: <500E8457.8020805@linguamatics.com> Date: Tue, 24 Jul 2012 12:17:43 +0100 From: =?ISO-8859-1?Q?Attila_Bog=E1r?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 MIME-Version: 1.0 To: Matthew Seaman References: <4FF6D7EE.3000806@linguamatics.com> <4FF6DB9A.7040905@FreeBSD.org> <500DCCD0.8020701@linguamatics.com> <500E2E0C.2040606@FreeBSD.org> In-Reply-To: <500E2E0C.2040606@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-fs@FreeBSD.org Subject: Re: ZFS: .zfs/snapshot directory vanished X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jul 2012 11:17:46 -0000 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