Hi, Is it possible to convert a zfs pool from a concatenation of 2 disks to a 2 way mirror without backing up the data, re-creating the pool and restoring it. i.e diskA,diskB ----> mirror(diskA,diskB) Thanks, Jeff
Cindy.Swearingen at Sun.COM
2008-Apr-11 20:03 UTC
[zfs-discuss] zfs concatenation to mirror
Jeff, No easy way exists to convert this configuration to a mirrored configuration currently. If you had two more disks, you could use zpool attach to create a two-way, two disk mirror. See the output below. A more complicated solution is to create two files that are the size of your existing disks, attach them as mirrors, and detach the old disks. Next, use zpool replace to replace the files with the previous disks. You would need to have enough disk space outside of the existing pool to create the "simulated disks" with files. Cindy # zpool create tank c1t2d0 c1t4d0 # zpool status tank pool: tank state: ONLINE scrub: none requested config: NAME STATE READ WRITE CKSUM tank ONLINE 0 0 0 c1t2d0 ONLINE 0 0 0 c1t4d0 ONLINE 0 0 0 errors: No known data errors # zpool attach tank c1t4d0 c1t5d0 # zpool status tank pool: tank state: ONLINE scrub: resilver completed with 0 errors on Fri Apr 11 13:32:20 2008 config: NAME STATE READ WRITE CKSUM tank ONLINE 0 0 0 c1t2d0 ONLINE 0 0 0 mirror ONLINE 0 0 0 c1t4d0 ONLINE 0 0 0 c1t5d0 ONLINE 0 0 0 errors: No known data errors # zpool attach tank c1t2d0 c1t6d0 # zpool status tank pool: tank state: ONLINE scrub: resilver completed with 0 errors on Fri Apr 11 13:33:21 2008 config: NAME STATE READ WRITE CKSUM tank ONLINE 0 0 0 mirror ONLINE 0 0 0 c1t2d0 ONLINE 0 0 0 c1t6d0 ONLINE 0 0 0 mirror ONLINE 0 0 0 c1t4d0 ONLINE 0 0 0 c1t5d0 ONLINE 0 0 0 errors: No known data errors Jeff Walker wrote:> Hi, > > Is it possible to convert a zfs pool from a concatenation of 2 disks to > a 2 way mirror without backing up the data, re-creating the pool and > restoring it. i.e > > diskA,diskB ----> mirror(diskA,diskB) > > Thanks, > > Jeff > > > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss