Most Popular in Unix
-
phpBB Rivals 1.8.1 (Default branch)
-
aix5.3 migration locked on 7026 with 0c46 LED-screen code
-
About the security content of iOS 4.1 for iPhone and iPod touch
-
Calculate the Median, first quartile and third quartile using AWK
-
AIX upgrade
-
iWeb: Comment attachment returns 404 page
-
Boot time driver conflict
-
Script needed...
-
How to pass a parameter with double quotes around it to a command
-
How to Set UP a Server of SNMP
Bad Disk and destroying the pool, back up in less than 5 hours.
After about 6 months of being on its death bed my 36GB SCSI hard disk finally died, it had been giving me a few zpool checksum errors from time to time, a few scsi errors in dmesg but it kept working i had cleared scrubbed the pool and cleared the errors 3 or 4 times in the last months, the scsi drive was probably 4-5 years old when I bought it off eBay and I had it another 5 years or so its death was not unexpected. Not sure what I had planned when I put the disk in the raidz pool that holds 2 other 18.2GB drives. Turns out the replacement drive I purchased 6months ago was a few megabytes smaller than the other `18.2GB drives, not sure of the exact difference, it was enough to make zfs that is part of Solaris 10u8 to complain replacement disk too small, this is supposedly fixed in Opensolaris as this is a Sparc box and I?m not ready to deploy sparc opensolaris on my system yet. I needed a solution, So what to do, the pool had 190 filesystems and snapshots cross mounted all over the system and I didn?t feel like scripting some script to copy and recreate the layout. Turns out it wasn?t necessary, 6 commands is all it took to get the system back to normal, and enough disks space to hold the data
Not only did this restore the pool?s filesystems back to where they left off, it recreated all the snapshots, and mountpoints and all the zfs settings. It did it so well that all programs stored on the pool came up without any issues. I was simply amazed how easy it was to recover the system, including 190 filesystems and snapshots composing nearly 30GB of data in about 3 hours. I don?t think a standard raid5 lvm can be created and mounted in this amount of time much less restoring a complex filesystem structures and all their data.
zfs snapshot ?R pool@now # creates a snapshot called @now on every filesystem in the pool.
zfs send ?R pool@now > /largedisk/pool_backup_zfs_stream
zpool destroy pool # add in ?f if necessary
zpool create pool raidz c1t0d0 c1t1d0 c2t0d0 # recreate the pool
cat /largedisk/pool_backup_zfs_stream | zfs recv -Fd -v pool
reboot # restore all the complicated mount points and restart services that failed after the pool destruction
Not only did this restore the pool?s filesystems back to where they left off, it recreated all the snapshots, and mountpoints and all the zfs settings. It did it so well that all programs stored on the pool came up without any issues. I was simply amazed how easy it was to recover the system, including 190 filesystems and snapshots composing nearly 30GB of data in about 3 hours. I don?t think a standard raid5 lvm can be created and mounted in this amount of time much less restoring a complex filesystem structures and all their data.
More Stories in Unix Admin Corner
- Checking Dolly?s Paternity
- Steps to Clone a VMWARE guest on a ZFS NFS share
- The ZFS pipe is clogged
- DeDup will get faster on lowend machines
- Feeling Old yet?
- VMware Lab updates
- GNS3 rocks
- Top 10 things I learned about using a DL380 G3 as a ESXi LAB
- Bad Disk and destroying the pool, back up in less than 5 hours.
- Tieing a stick to a Dell 2716
Most Popular Stories
Pirate Bay Sunk At Last After Europe-Wide Raids?
Apple Confirms Game Center Compatibility: Yes on 2nd-Generation iPod Touch, No on iPhone 3G
Apple drops iOS 4.1 this afternoon as new iPods hit the streets
[$] Looking at Fedora 14 and Ubuntu 10.10
'Macworld Mobile' Coming to Mobile World Congress 2011
The Future of Ad Agencies and Social Media
Games updated for Game Center (soon)
The HyperDrive Is a 750GB Hard Drive That Connects Right To Your iPad [Storage]
Retro new iPhone dock has pricey, film noir feel
MIT app turns your Android phone into a supercomputer... of sorts