Weblog
By popular demand, the plain FSCK You shirts are out
At the store·:· Posted 4 May 2006, 18:21 by Jason Hoffman to Server geek | Got something to say? [2]
Moving a ZFS filesystem and all of its snapshots from one zpool to another
This is how you can move all the contents of a ZFS filesystem from one zpool of block storage to another zpool of block storage. This example was done from one zpool of fiber attached LUNs to another. This can also be done from on- to off-site.
This is over in textsnippets as well.
Go into the root directory
[hostname:/] root# cd /
You can look in the filesystem and you’ll see its contents and the .zfs folder
[hostname:/] root# ls -l old-pool/filesystem
total 24
dr-xr-xr-x 3 root root 3 Mar 31 00:34 .zfs/
drwxr-xr-x 18 root root 101 Mar 11 21:45 etc/
drwx------ 4 root root 16 Feb 19 08:07 root/
drwxr-xr-x 3 root root 3 Feb 19 21:18 usr_local_etc/
drwxr-xr-x 3 root root 3 Feb 19 21:18 usr_local_var_db_mysql/
Make a final “migration” snapshot that represents the latest old-pool/filesystem
[hostname:/] root# zfs snapshot old-pool/filesystem@migration
You can see there are 3 snapshots in there
[hostname:/] root# ls -l old-pool/filesystem/.zfs/snapshot/
20060329/ 20060330/ migration/
Do a zfs backup of the oldest snapshot and pipe that into a zfs restore. This is will make the filesystem in the new-pool. You could also do this over ssh.
[hostname:/] root# zfs backup old-pool/filesystem@20060329 | zfs restore new-pool/filesystem@20060329
Now you do an incremental (-i) backup and restore using the first snapshot you used above and the one that comes after it. The key here is that incremental backups expect there to be a pre-existing new-pool/filesystem, this is how it is diffrent from the non-incremental backup above.
[hostname:/] root# zfs backup -i old-pool/filesystem@20060329 old-pool/filesystem@20060330 | zfs restore new-pool/filesystem
Do an incremental on the next pair. This happens to be with the last “migration” snapshot.
[hostname:/] root# zfs backup -i old-pool/filesystem@20060330 old-pool/filesystem@migration | zfs restore new-pool/filesystem
When you look in the new-pool/filesystem you’ll see that it has been populated from the last migration snapshot.
[hostname:/] root# ls -l new-pool/filesystem
total 24
dr-xr-xr-x 3 root root 3 Mar 31 00:34 .zfs/
drwxr-xr-x 18 root root 101 Mar 11 21:45 etc/
drwx------ 4 root root 16 Feb 19 08:07 root/
drwxr-xr-x 3 root root 3 Feb 19 21:18 usr_local_etc/
drwxr-xr-x 3 root root 3 Feb 19 21:18 usr_local_var_db_mysql/
And all three snapshots are present
[hostname:/] root# ls -l new-pool/filesystem
20060329/ 20060330/ migration/
Yes it scripts up fine as well.
·:· Posted 16 April 2006, 02:48 by Jason Hoffman to ZFS | Got something to say?
#1 in Google for ZFS snapshots
I always find things like this amusing.
What’s even funnier is that the current search for zfs snapshots also includes the screenshot from flickr.
·:· Posted 23 March 2006, 05:27 by Jason Hoffman to Server geek | Got something to say? [2]
Joyeur and the Dell Selling Machine
We have an additional and a more “general” weblog running over at joyeur.com
Guys like Dean Allen and John Gruber have been posting away over there and I’ve finally added my first one, The Sun Doesn’t Shine on Me, a brief tale about some adventures in server buying and a little commentary on how I think sales for the little guy is broken at places like Sun and HP. Dell is cranking away not because of some technical dominance but because they simply out-sell their competition. They gots the hustle.
·:· Posted 20 March 2006, 19:01 by Jason Hoffman to Server geek | Got something to say?
DragonflyBSD porting ZFS
Matthew Dillon (interview link) has in their plan to port ZFS to DragonflyBSD.This would be huge and absolutely perfect. The ZFS file system is licensed under the Common Development and Distribution License (CDDL), a derivative of the Mozilla Public License, and because of that likely won’t find it’s way into GPL’ed Linux distros (at least that’s what I think; I also think that if you are on Linux, SGI’s XFS is the way to go … 1100%).
Matt Dillon by the way is one of the reasons—by his absence—that FreeBSD 5 sucks as a stable and what I would define as a modern OS. I wish we were still using FreeBSD 4 on a whole bunch of single processor machines with little little drives.
Go man go!
·:· Posted 2 March 2006, 01:38 by Jason Hoffman to Server geek | Got something to say? [2]
Recently:
- The weblog is heading over to Joyeur.com
- The Scale with Rails workshops
- By popular demand, the plain FSCK You shirts are out
- Apache 2.2, mod_proxy_balancer and Mongrel
- Apache 2.2 worker on solaris to a remote mongrel
- I made some other web server points over at Joyeur
- Beware the trailing slash in Apache's proxy balancer
- What about Apache to Mongrel for Rails applications?
- Lighttpd versus Litespeed with Mongrel as a backend for Rails applications
- Moving a ZFS filesystem and all of its snapshots from one zpool to another
- Watch Out for Software Updates
- Two simple tips for freezing your rails
- #1 in Google for ZFS snapshots
- I'll be speaking at the Silicon Valley Ruby Conference
- Joyeur and the Dell Selling Machine
- In town for ETech?
- DragonflyBSD porting ZFS
- ZFS Snapshots
- Correction on Zeus versus Litespeed hitting a static image file
- Rails with Zeus and Mongrel or FCGI

