f



Back up and restore ZFS file systems

I wrote two scripts zfsdumpd.sh and zfsrestored.sh to back up and
restore ZFS.  They are handy especially when a system has many ZFSs.
The script can back up and restore all of ZFSs at one time.

http://www.sun.com/bigadmin/content/submitted/zfsdumpd_zfsrestored.jsp

Victor

0
11/1/2007 1:11:30 PM
comp.unix.solaris 25997 articles. 1 followers. Post Follow

2 Replies
870 Views

Similar Articles

[PageSpeed] 3

Those scripts look useful.

FYI:  Might also be interested in Tim Foster's automatic ZFS snapshot
scripts:
http://blogs.sun.com/timf/entry/zfs_automatic_snapshots_0_8

One problem I encountered when taking snapshots of large filesystems
(>100G) is described in this bug report:
http://bugs.opensolaris.org/view_bug.do?bug_id=6509628

The above bug is listed as fixed in a Nevada build but I am running
Solaris 10 update 3 (11/06) and experienced it.
I don't know if it is corrected in s10u4 (8/07) release.

The problem was destroying a snapshot, which is supposed to be fast,
was taking hours as well as using 100% of a CPU.
There is a workaround described in the above bug report which is to
make my current working directory to be inside the filesystem which
was snapshotted, then trying to unmount it  The umount will fail
(because the filesystem is in use due to it being my working
directory, if not for other reasons.)  But, the side effect is that it
will somehow let the snapshot be destroyed in a reasonable amount of
time (a few seconds) and without the CPU looping.

But, a bad side effect of the workaround I have noticed and which is
not reported in the above bug is that if the filesystem which was
snapshotted is shared by NFS, it becomes unshared as a result of the
attempted umount.  That is, even though the umount fails, it causes
the filesystem to be unshared (as if "zfs unshare ..." was run on the
filesystem.)  So, it is necessary to run "zfs share ..." after the
umount in order for NFS to continue working.

0
Doug
11/1/2007 8:23:00 PM
On Nov 1, 3:23 pm, Doug <dy2...@gmail.com> wrote:
> Those scripts look useful.
>
> FYI:  Might also be interested in Tim Foster's automatic ZFS snapshot
> scripts:http://blogs.sun.com/timf/entry/zfs_automatic_snapshots_0_8
>
> One problem I encountered when taking snapshots of large filesystems
> (>100G) is described in this bug report:http://bugs.opensolaris.org/view_bug.do?bug_id=6509628
>
> The above bug is listed as fixed in a Nevada build but I am running
> Solaris 10 update 3 (11/06) and experienced it.
> I don't know if it is corrected in s10u4 (8/07) release.
>
> The problem was destroying a snapshot, which is supposed to be fast,
> was taking hours as well as using 100% of a CPU.
> There is a workaround described in the above bug report which is to
> make my current working directory to be inside the filesystem which
> was snapshotted, then trying to unmount it  The umount will fail
> (because the filesystem is in use due to it being my working
> directory, if not for other reasons.)  But, the side effect is that it
> will somehow let the snapshot be destroyed in a reasonable amount of
> time (a few seconds) and without the CPU looping.
>
> But, a bad side effect of the workaround I have noticed and which is
> not reported in the above bug is that if the filesystem which was
> snapshotted is shared by NFS, it becomes unshared as a result of the
> attempted umount.  That is, even though the umount fails, it causes
> the filesystem to be unshared (as if "zfs unshare ..." was run on the
> filesystem.)  So, it is necessary to run "zfs share ..." after the
> umount in order for NFS to continue working.


Good to know! I'll try it out too.

Victor

0
victorfeng1973
11/1/2007 9:04:28 PM
Reply:

Similar Artilces:

Can ufsrestore restore files to a ZFS file system?
I have a Sun Blade 2000 running Solaris 10 update 5 which is fitted with a pair of 137 GB FC-AL disks. One of the disks is used as /export/home and has only one UFS file system on it. I have created a level 0 dump of this file system using ufsdump and saved it to a file which I've stored in a ZFS pool created with a pair of 1 TB USB disks. Can I destroy the data on the UFS file system, create a ZFS pool on that disk, then restore the data from a file created with ufsdump? (The file is stored on a mirrored pair of 1 TB USB disks). The fact the command has *ufs* in the name rather s...

Live Upgrade to Migrate a UFS Root File System to a ZFS Root File System
I'm trying to update a machine running Solaris 10 update 4 with a UFS root file system to one running Solaris 10 update 7 with a ZFS boot file system. I've looked at http://docs.sun.com/app/docs/doc/819-5461/ggrkz?a=view The example uses the syntax: # lucreate -c ufs509BE -n zfs509BE -p mpool done what it said and created a ZFS storage pool with a a slice. But any attempt to use the above example fails, as lucreate does not appear to support the -p option on Solaris 10 update 4. root@t2 # zpool list NAME SIZE USED AVAIL CAP HEALTH ALTROOT root...

Ownership of a file in unix file system
I need to create a file on a web server (running unix) and set its permission so that no-one, except with correct ftp username & password can download or view it. On my wwww server I've created test.pl. When I go to www.notareal.com/cgi-bin/test.pl Firefox shows "Hello world" as expected. When I use a FTP program the check if newtext.tx has been created it's there OK. The problem is that I cannot download the newtext.txt or view it. I can delete it but that's just about it. Here is a simple test.pl: #!/usr/bin/perl print "Content-Type: text/html; charset=iso-...

How to update system with ZFS file systems.
I've got a Sun Blade 2000, with Solaris 10 update 4 on it. Some time back I tried to do a live update, and it failed for some reason - cant recall which. Anyway, I am just downloading Solaris 10 update 6 and will do an update (but not live update). My slight concern is with the disks which have ZFS file systems on them. I assume the update process will detect these, but I'd like to be sure and have the least hassle in recovering if things got wrong. The system is set up like this: bash-3.00$ df -h Filesystem size used avail capacity Mounted on /dev/dsk/c1t1d0s0 ...

HD file system corrupted after delete file on a share file on Solaris 8
Hi , I installed Samba 2.2.8a on a sparc system Solaris 8 and all works except when I delete a file or a folder into the share file with a windows 2000 pro, the HD ufs file system fall into a corrupt state and if I pass fsck on the disk it report some UNREF DIR on pass 3 and LINK COUNT problem on pass 4. What could be the problem ? I changed the HD and I have the same problem. Please help and thanks for your help Dano ...

SN#18307 Solaris[TM] ZFS Goes Up Against Microsoft and Veritas File Systems
SYSTEM NEWS FOR SUN USERS Vol 113 Issue 1 2007-07-02 Article 18307 from section "SysAdmin's Section" Benchmark Testing Compares Performance Characteristics, Differences Solaris[TM] ZFS is the topic of two white papers, each of which offers a comparative analysis between Sun's zettabyte file system and either the Microsoft Windows Server 2003 NTFS or the Veritas File System. Details at http://sun.systemnews.com/g?A=18307 Have a custom version of 'System News for Sun Users' delivered to you via email each week in PDF, text ...

SN#21893 "Managing ZFS File Systems in Solaris Containers"
SYSTEM NEWS FOR SUN USERS Vol 137 Issue 1 2009-07-02 Article 21893 from section "SysAdmin's Section" Solaris OS How-to Guide for New Users "How to Manage Systems with ZFS in Solaris Containers," one of the Solaris 10 How To Guide series, is intended to show a new user the capabilities of ZFS when coupled with Solaris Containers. It describes the assignment of a ZFS file system to a zone, and some of the ZFS administrative tasks possible in such a configuration. Details at http://sun.systemnews.com/g?A=21893 Have a cus...

SN#20146 Mac OS X v10.6 to Support Solaris ZFS File System
SYSTEM NEWS FOR SUN USERS Vol 124 Issue 3 2008-06-16 Article 20146 from section "Software" Looks Like a Win-Win for Both Sides The news is that "Snow Leopard," also known as the Mac OS X v10.6, will support the Solaris ZFS file system when it is released in about a year's time. Apple's Web site is hosting the announcement: "For business-critical server deployments, Snow Leopard Server adds read and write support for the high-performance, 128-bit ZFS file system, which includes advanced features such as stora...

SN#20829 Deploying Hybrid Storage Pools With Flash Technology and the Solaris ZFS File System
SYSTEM NEWS FOR SUN USERS Vol 129 Issue 2 2008-11-15 Article 20829 from section "OpenStorage" Balance Both System Performance and Cost Roger Bitar's Sun BluePrints Online paper, which he entitles "Deploying Hybrid Storage Pools with Sun Flash Technology and the Solaris ZFS File System," provides an overview of Flash technology and discusses its introduction into a new tier of storage infrastructure. Bitar explains how companies can utilize Flash technology and the Solaris ZFS file system to take advantage of the ...

SN#21290 SysAdmin News Bites
SYSTEM NEWS FOR SUN USERS Vol 132 Issue 1 2009-02-07 Article 21290 from section "SysAdmin's Section" Short News Items of Interest for SysAdmins - Rocks on Solaris - Understanding ZFS: Disk Space Discrepancies and Transaction Groups & Disk Performance - Auto Service Request (ASR) for Sun Systems - Sun Identity Manager & Virtual Desktop Infrastructure - Solaris 10 System Administration Essentials http://blogs.systemnews.com/ Details at http://sun.systemnews.com/g?A=21290 Have a ...

How the hell do I delete files on ZFS when file system is full?
I've got a problem on a Sun Blade 2000 running Solaris 10 update 7 with ZFS file systems. One of the file systems is full, but when I try to remove a file, I get: # rm 3.ini rm: 3.ini not removed: no space left on device This is happening in single user mode too. I've tried deleting the smallest file I could, in the hope that any disk space the deletion uses would be minimal. But I still can't remove the file. I even found a file of 0 bytes in length on the disk, but that too could not be deleted. Short of drilling a hole in one of the platters of the disk, how can I remove fil...

File Systems File Systems, eeeeekkk
I'm setting up a linux/win98 dual boot laptop. I want maximum file read/write between the two OSs but want to be able to use long file names between them and maintain linux stability. I also want to be able to use this on old hardware, so has to be a "minmalist" flavor. I've read that UMSDOS can cause instability problems and that it does not support long file names, so not sure if that's the one to go with for the linux partition. I would like to keep linux and win98 on separate partitions. Several of the minamalist distros are using UMSDOS; not sure what others they su...

File Systems File Systems, eeeeekkk
I'm setting up a linux/win98 dual boot laptop. I want maximum file read/write between the two OSs but want to be able to use long file names between them and maintain linux stability. I also want to be able to use this on old hardware, so has to be a "minmalist" flavor. I've read that UMSDOS can cause instability problems and that it does not support long file names, so not sure if that's the one to go with for the linux partition. I would like to keep linux and win98 on separate partitions. Several of the minamalist distros are using UMSDOS; not sure what others they su...

Restoring file systems
Some days ago I installed Windows 2000 (I use Windows occasionally for games and midi keyboard purposes, and thought I should get a version that hasn't made me want to strangle myself). While installing drivers, I got a blue screen telling me it was dumping core. After it rebooted, one of my FAT32 partitions had gone apeshit. All the files were there, but most of them[1] had been assigned a hex number instead of a normal file name, and they won't open. Actually, Nautilus crashes if I try to enter the folders. Windows calls them file fragments. I've successfully opened some pictures...

Web resources about - Back up and restore ZFS file systems - comp.unix.solaris

Rally to Restore Sanity and/or Fear - Wikipedia, the free encyclopedia
... rallies in 20 or more U.S. cities including Austin, Texas ; Los Angeles ; Chicago ; Denver ; Honolulu and Boise, Idaho The Rally to Restore ...

Facebook Restores Ad Targeting of Users 65+
Facebook appears to have restored the ability for advertisers to target users aged 65 and over. (more…) New Career Opportunities Daily: The ...

M1 - Our Engineers are working flat out to restore the... - Facebook
Our Engineers are working flat out to restore the network. This complex restoration work involves loading the configuration for each base station ...

RESTORE By Katona (@RESTOREbyKatona) on Twitter
Log in Sign up You are on Twitter Mobile because you are using an old version of Internet Explorer. Learn more here RESTORE By Katona @ RESTOREbyKatona ...

Weibo Contact-Support Sina Weibo Avatar import ,backup and restore Contacts,number attribution tracking,smart ...
Get Weibo Contact-Support Sina Weibo Avatar import ,backup and restore Contacts,number attribution tracking,smart match. It is the best addressbook ...

2013.07.04 Restore the 4th - rally & march ~ Austin Texas - a set on Flickr
Organized by Restore the 4th & Occupy Austin & others: for all citizen participation. photos by: magicjackatx ©

Restore My Vision Today Review - REAL TRUTH - YouTube
Get Restore My Vision Today Here : http://bit.ly/Restore-My-Vision-Today-Reviews Restore My Vision Today is a program designed by Dr. Sen and ...

Emaar hotel revenue to be hit after Dubai fire as developer appoints contractor to restore The Address ...
Dubai’s biggest listed property developer said there would be 'no material effect on the company' from the hotel fire.

Secret plan for psychopaths to restore order to Britain after nuclear war
In a 1982 war-games exercise, public servants suggested secret plans to cope with the aftermath of a nuclear holocaust including recruiting psychopaths ...

Chelsea looking to restore 8-point lead
Second-placed Manchester City will be without influential midfielder Yaya Toure as they try to close the gap on Premier League leaders Chelsea. ...

Resources last updated: 2/3/2016 4:07:55 AM