Tomas Ögren wrote:
> On 15 January, 2009 - Jim Klimov sent me these 1,3K bytes:
> 
>> Is it possible to create a (degraded) zpool with placeholders specified 
>> instead
>> of actual disks (parity or mirrors)? This is possible in linux mdadm 
>> ("missing" 
>> keyword), so I kinda hoped this can be done in Solaris, but didn't manage to.
>>
>> Usecase scenario: 
>>
>> I have a single server (or home workstation) with 4 HDD bays, sold with 2 
>> drives.
>> Initially the system was set up with a ZFS mirror for data slices. Now we 
>> got 2 
>> more drives and want to replace the mirror with a larger RAIDZ2 set (say I 
>> don't 
>> want a RAID10 which is trivial to make). 
>>
>> Technically I think that it should be possible to force creation of a 
>> degraded
>> raidz2 array with two actual drives and two missing drives. Then I'd copy 
>> data
>> from the old mirror pool to the new degraded raidz2 pool (zfs send | zfs 
>> recv),
>> destroy the mirror pool and attach its two drives to "repair" the raidz2 
>> pool.
>>
>> While obviously not an "enterprise" approach, this is useful while expanding
>> home systems when I don't have a spare tape backup to dump my files on it 
>> and restore afterwards.
>>
>> I think it's an (intended?) limitation in zpool command itself, since the 
>> kernel
>> can very well live with degraded pools.
> 
> You can fake it..

[snip command set]

Summary, yes that actually works and I've done it, but its very slow!

I essentially did this myself when I migrated a 4x2-way mirror pool to a
2x4 disk raidzs (4x 500GB and 4x 1.5TB).  I can say from experience that
it works but since I used 2 sparsefiles to simulate 2 disks on a single
physical disk performance sucked and it took a long time to do the
migration.  IIRC it took over 2 days to transfer 2TB of data.  I used
rsync, at the time I either didn't know about or forgot about zfs
send/receive which would probably work better.  It took a couple more
days to verify that everything transferred correctly with no bit rot
(rsync -c).

I think Sun avoids making things like this too easy because from a
business standpoint it's easier just to spend the money on enough
hardware to do it properly without the chance of data loss and the
extended down time.  "Doesn't invest the time in" may be a be a better
phrase than "avoids" though.  I doubt Sun actually goes out of their way
to make things harder for people.

Hope that helps,
Jonathan
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to