Networker

Re: [Networker] ZFS file systems

2007-05-24 22:06:38
Subject: Re: [Networker] ZFS file systems
From: Peter Viertel <Peter.Viertel AT MACQUARIE DOT COM>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Fri, 25 May 2007 12:03:30 +1000
This line in vfstab works for me with 7.3.2 client, 7.2.2 server and All
savesets....

zfs/download    zfs/download    /zfs/download   zfs     -       no
-


I wrote a little script to parse the output of 'zfs list',and update
vfstab - not quite perfect, I intend extending this process to make it
backup snapshots instead of the actual filesystems but have not got
around to that yet.


#!/bin/perl

open VFSTAB, "</etc/vfstab" or die "$!: /etc/vfstab";
while (<VFSTAB>) {
        if (/^\s*#/) {
                push @vfstab, $_;
        } else {
                ($blk,$raw,$mountpoint,$type,$fsck,$boot,$opt)=split;
                if($type ne "zfs") {
                        push @vfstab, $_;
                } else {
                        print STDERR "zfs existing: $mountpoint\n";
                        $existing{$mountpoint}=$_;
                        $name{$mountpoint}=$blk;
                }
        }
}
close VFSTAB;

open ZFSLIST, "zfs list -H -o name,mountpoint|" or die "$!: running zfs
list";
while (<ZFSLIST>) {
        chop;
        ($name,$zfsmount)=split;
        if ($existing{$zfsmount}){
                $touched{$zfsmount}=1;
                if($name{$zfsmount} eq $name) {
                        # exists already
                        push @vfstab, $existing{$zfsmount};
                        next;
                }
                push @vfstab,
"$name\t$name\t$zfsmount\tzfs\t-\tno\t-\n";
                print STDERR "zfs modified: $mountpoint\n";
                next;
        } else {
                push @vfstab,
"$name\t$name\t$zfsmount\tzfs\t-\tno\t-\n";
                print STDERR "zfs added: $zfsmount\n";
        }
}
foreach (sort keys %existing){
        print STDERR "zfs deleted: $_\n" unless ($touched{$_});
}

unlink "/etc/vfstab.zfsnew"; #just in case
if (open(NEWVFS,">/etc/vfstab.zfsnew")) {
        foreach (@vfstab) {
                print NEWVFS;
        }
        if(close(NEWVFS)) {
                unlink "/etc/vfstab.zfsold";
                link "/etc/vfstab", "/etc/vfstab.zfsold" or die "$!:
linking /etc/vfstab to /etc/vfstab.zfsold";
                unlink "/etc/vfstab" or die "$!: unlinking /etc/vfstab";
                link "/etc/vfstab.zfsnew", "/etc/vfstab" or die "$!:
linking /etc/vfstab.zfsnew to /etc/vfstab";
                unlink "/etc/vfstab.zfsnew" or die "$!: unlinking
/etc/vfstab.zfsnew";
        } else {
                die "$!: closing /etc/vfstab.zfsnew";
        }
} else {
        die "$!: opening /etc/vfstab.zfsnew for writing";
}






-----Original Message-----
From: EMC NetWorker discussion [mailto:NETWORKER AT LISTSERV.TEMPLE DOT EDU] On
Behalf Of Coty, Edward
Sent: Thursday, 24 May 2007 11:36 PM
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Subject: [Networker] ZFS file systems

Hi all,

Anyone backing up ZFS file systems on Solaris 10. I am told by EMC that
it is only supported in 7.3.2. I am able to backup and restore from a
7.2.2 server running 7.3.2 client on the server with ZFS. The only way I
can get it to work is by hardcoding the ZFS file systems in the saveset
field. I have tried multiple ways of adding psuedo entries into
/etc/vfstab to get the saveset of ALL to work. No luck. Has anyone done
this? Do ZFS file systems have to be hardcoded in the saveset field? 

Of course I am reluctant to upgrade to 7.3 server since my 7.2.2 server
is stable. 

EDWARD COTY
LEAD STORAGE ENGINEER, LCNA
WORK - 973-533-2098
CELL - 973-296-0918
EDWARD.COTY AT AIG DOT COM

To sign off this list, send email to listserv AT listserv.temple DOT edu and
type "signoff networker" in the body of the email. Please write to
networker-request AT listserv.temple DOT edu if you have any problems with this
list. You can access the archives at
http://listserv.temple.edu/archives/networker.html or via RSS at
http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER

NOTICE
This e-mail and any attachments are confidential and may contain copyright 
material of Macquarie Bank or third parties. If you are not the intended 
recipient of this email you should not read, print, re-transmit, store or act 
in reliance on this e-mail or any attachments, and should destroy all copies of 
them. Macquarie Bank does not guarantee the integrity of any emails or any 
attached files. The views or opinions expressed are the author's own and may 
not reflect the views or opinions of Macquarie Bank.

To sign off this list, send email to listserv AT listserv.temple DOT edu and 
type "signoff networker" in the body of the email. Please write to 
networker-request AT listserv.temple DOT edu if you have any problems with this 
list. You can access the archives at 
http://listserv.temple.edu/archives/networker.html or
via RSS at http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER

<Prev in Thread] Current Thread [Next in Thread>