I was wondering if there is any way of converting a zpool which only have one LUN in there to a raidz zpool that was 3 or more LUNS in it? Thanks -- This message posted from opensolaris.org
Ian Garbutt wrote:> I was wondering if there is any way of converting a zpool which only have one LUN in there to a raidz zpool that was 3 or more LUNS in it? > > Thanks >No. Adding, removing, or otherwise changing disks in a RAIDZ is not possible without destroying data in the pool. You''ll have to copy the data from the single LUN pool somewhere else, destroy the pool, then recreate it as a RAIDZ with the 3 LUNs. -- Erik Trimble Java System Support Mailstop: usca22-123 Phone: x17195 Santa Clara, CA
On 12 March, 2010 - Erik Trimble sent me these 0,7K bytes:> Ian Garbutt wrote: >> I was wondering if there is any way of converting a zpool which only have one LUN in there to a raidz zpool that was 3 or more LUNS in it? >> >> Thanks >> > No. > > Adding, removing, or otherwise changing disks in a RAIDZ is not possible > without destroying data in the pool. > > > You''ll have to copy the data from the single LUN pool somewhere else, > destroy the pool, then recreate it as a RAIDZ with the 3 LUNs.What you can do is: Create a new pool with lun2,lun3 and a sparse file the same size as lun2&3. Get rid of the file. Copy data over from lun1 (old single lun thing) to the raidz (lun2,lun3,missingfile) Destroy old pool replace missingfile with lun1 With this method, the pool is lacking redundancy between step 4 and 5, but requires no extra space. /Tomas -- Tomas ?gren, stric at acc.umu.se, http://www.acc.umu.se/~stric/ |- Student at Computing Science, University of Ume? `- Sysadmin at {cs,acc}.umu.se
Thats fair enough, pity there isn''t a simpler way. Many thanks -- This message posted from opensolaris.org
Ian, You might consider converting this pool to a mirrored pool, which is currently more flexible than a raidz pool and provide good performance. Its easy too. See the example below. Cindy A non-redundant pool of one disk (33 GB). # zpool status tank pool: tank state: ONLINE scrub: none requested config: NAME STATE READ WRITE CKSUM tank ONLINE 0 0 0 c0t0d0 ONLINE 0 0 0 errors: No known data errors Attach another disk to create a mirrored pool of two disks. Total space is still 33 GB. # zpool attach tank c0t0d0 c1t8d0 # zpool status tank pool: tank state: ONLINE scrub: resilver completed after 0h0m with 0 errors on Fri Mar 12 08:20:30 2010 config: NAME STATE READ WRITE CKSUM tank ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 c0t0d0 ONLINE 0 0 0 c1t8d0 ONLINE 0 0 0 73.5K resilvered errors: No known data errors # zpool list NAME SIZE USED AVAIL CAP HEALTH ALTROOT tank 33.8G 76.5K 33.7G 0% ONLINE - Expand the pool by adding another two-disk mirror. Total space is now 67.5 GB. # zpool add tank mirror c1t9d0 c1t10d0 # zpool status tank pool: tank state: ONLINE scrub: resilver completed after 0h0m with 0 errors on Fri Mar 12 08:20:30 2010 config: NAME STATE READ WRITE CKSUM tank ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 c0t0d0 ONLINE 0 0 0 c1t8d0 ONLINE 0 0 0 73.5K resilvered mirror-1 ONLINE 0 0 0 c1t9d0 ONLINE 0 0 0 c1t10d0 ONLINE 0 0 0 errors: No known data errors # zpool list tank NAME SIZE USED AVAIL CAP HEALTH ALTROOT tank 67.5G 100K 67.5G 0% ONLINE - On 03/12/10 04:49, Ian Garbutt wrote:> Thats fair enough, pity there isn''t a simpler way. > > Many thanks