Perfect, thanks. Just what I was looking for.

How do I know how large to make the "fakedisk" file? Any old "enormous" size 
will do, since mkfile -n doesn't actually allocate the blocks until needed?

To be sure I understand correctly: In theory, instead of this missing disk 
approach I could create a two-disk raidz pool and later add the third disk to 
it, right? Your method looks much more efficient however so thanks.

It's too bad we can't change a 1-volume zpool to raidz before or while adding 
disks. That would make this much easier.


On 03/07/12 17:03, Fajar A. Nugraha wrote:
On Thu, Mar 8, 2012 at 4:38 AM, Bob Doolittle<>  wrote:

I had a single-disk zpool (export) and was given two new disks for expanded
storage. All three disks are identically sized, no slices/partitions. My
goal is to create a raidz1 configuration of the three disks, containing the
data in the original zpool.

However, I got off on the wrong foot by doing a "zpool add" of the first
disk. Apparently this has simply increased my storage without creating a
raidz config.
IIRC you can't convert a single-disk (or striped) pool to raidz. You
can  only convert it to mirror. So even your intended approach (you
wanted to try "zpool attach"?) was not appropriate.

Unfortunately, there appears to be no simple way to just remove that disk
now and do a proper raidz create of the other two. Nor am I clear on how
import/export works and whether that's a good way to copy content from one
zpool to another on a single host.

Can somebody guide me? What's the easiest way out of this mess, so that I
can move from what is now a simple two-disk zpool (less than 50% full) to a
three-disk raidz configuration, starting with one unused disk?
- use the one new disk to create a temporary pool
- copy the data ("zfs snapshot -r" + "zfs send -R | zfs receive")
- destroy old pool
- create a three-disk raidz pool using two disks and a fake device,
something like
- destroy the temporary pool
- replace the fake device with now-free disk
- export the new pool
- import the new pool and rename it in the process: "zpool import
temp_pool_name old_pool_name"

In the end I
want the three-disk raidz to have the same name (and mount point) as the
original zpool. There must be an easy way to do this.

zfs-discuss mailing list

Reply via email to