linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Unconventional reshape - a success story
@ 2011-04-11 10:09 Roman Mamedov
  2011-04-11 10:46 ` NeilBrown
  0 siblings, 1 reply; 3+ messages in thread
From: Roman Mamedov @ 2011-04-11 10:09 UTC (permalink / raw)
  To: linux-raid

[-- Attachment #1: Type: text/plain, Size: 1986 bytes --]

Hello,

Thought I'd share this 'trick' (if using the documented functionality can be
called that :).

I needed to upgrade my 3-disk RAID5 to a 5-disk RAID6. Problem is, due to a
lack of free space I needed to do that in stages, i.e. add one drive, gain
additional space in the array, move some data over, then add another drive.

The usual way of doing this perhaps would be to first reshape to a 4-disk
RAID5, and only after that to a 5-disk RAID6.

But I wanted to have this done in just one reshape. So I got the idea to
reshape from a 3-disk RAID5 right to a degraded 5-disk RAID6 (with 4 drives
active and one missing).

On my RAID5 with 3 "active" drives and 1 newly-added "spare" drive I executed:

  mdadm --grow --level=6 --raid-devices=5 /dev/md0

And indeed, this worked exactly as intended: 

/dev/md0:
        Version : 1.2
  Creation Time : Wed Jun  9 12:14:49 2010
     Raid Level : raid6
     Array Size : 3887004672 (3706.94 GiB 3980.29 GB)
  Used Dev Size : 1943502336 (1853.47 GiB 1990.15 GB)
   Raid Devices : 5
  Total Devices : 4
    Persistence : Superblock is persistent

    Update Time : Fri Apr  8 11:52:03 2011
          State : clean, degraded, recovering
 Active Devices : 3
Working Devices : 4
 Failed Devices : 0
  Spare Devices : 1

         Layout : left-symmetric-6
     Chunk Size : 64K

 Reshape Status : 0% complete
  Delta Devices : 1, (4->5)
     New Layout : left-symmetric

           Name : natsu:0  (local to host natsu)
           UUID : 7f0c87dd:bcd14e11:7624e659:a7701e85
         Events : 35389

    Number   Major   Minor   RaidDevice State
       0       8       35        0      active sync   /dev/sdc3
       1       8       67        1      active sync   /dev/sde3
       3       8       51        2      active sync   /dev/sdd3
       4       8       99        3      spare rebuilding   /dev/sdg3
       4       0        0        4      removed


-- 
With respect,
Roman

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-04-11 10:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-11 10:09 Unconventional reshape - a success story Roman Mamedov
2011-04-11 10:46 ` NeilBrown
2011-04-11 10:54   ` Roman Mamedov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).