ZFS pool creation - preserving data?

Greetings all,

when I experimented with ZFS on FreeBSD, I created a data pool comprising one disk. As my need for space is growing, I would like to transition to a raidz1. Consequently I purchased additional two disks with the same size as the first disk. Is there a way I could create raidz1 pool from the three disks so that the data from the first disk are preserved?

Kindest regards,

M
 
You have to create the pool using 2 disks and a file. Then export the pool, delete the file, and import the pool in a degraded state. Then copy the data from the single-disk pool to the degraded pool (zfs send/recv works well for that). Finally, you destroy the old pool, and "zpool replace" the missing file with the disk, leaving you with a 3-disk raidz1 vdev.
 
phoenix,

thank you very much for the reply. The instructions are clear except the statement:

You have to create the pool using 2 disks and a file.

I understand how to create a pool with two disks. But what about the file? I will try to investigate, but if you could kindly point me to the right direction, I would appreciate it. Or write the command so that I can learn more?

Kindest regards,

M
 
When you do a zpool create you can specify the name of a regular file as a vdev (as opposed to a block device). The tricky part here though would be having a file big enough.
 
Back
Top