Take the 2-minute tour ×

I'd like to use an OpenSolaris EC2 instance as a DB server, using an external EBS volume connected to a ZFS pool.

If I set-up the ZFS pools then bundle-up the EC2 image, could I terminate the instance then safely re-attach the existing EBS volume (with data) to a new EC2 instance after it boots?

My main concern is if the instance terminates unexpectedly. I would ideally like to bring up a new instance and automate the re-attachment of the EBS volume but I'm not sure whether I could store the AMI with the pool structure already set, or whether I'd have to issue some commands at start-up to build the pool structure after attaching the volume.

share|improve this question

1 Answer 1

I haven’t used ZFS on EBS, so I don’t know if there are specific wrinkles related to that (there shouldn’t be).

When moving ZFS pools between “machines” (real or virtualised), you’re supposed to export the pool before importing into the other. It’s not strictly necessary, but it makes things happen more smoothly.

This article on migrating ZFS storage pools may give you the heads-up you need.

share|improve this answer
Any idea how this works with separate cache and intent-log devices? –  Phillip Oldham Apr 22 '10 at 11:03
I’m guessing your plan is to not move the cache and log devices alongside the pool itself? If so, (caveat: I have no personal experience of doing this), I’d err on the side of caution and remove them prior to export and re-add as necessary after import on the other machine. I could very well be wrong, but I suspect ZFS will discover the cache and intent log devices are absent and trip a (non-fatal) error condition. If you are going to move all of the devices together, then just an export and import should theoretically just work. If not, then you’ll have to remove and re-add them. –  Mo. Apr 22 '10 at 11:47
Unless you're running an old version Solaris 10, the pool will import just even when SSDs aren't present. L2ARC devices are safe caches, they are always empty on mount. Assuming a clean unmount (with or without export) ZFS Intent Log (ZIL) devices will also have no useful data. The ZIL is only ever read following a crash/dirty unmount so any uncommitted transactions can be replayed. –  notpeter Apr 14 '11 at 6:11

Your Answer


