Results 1 to 10 of 10

Thread: mdadm level migration

  1. #1
    Join Date
    Jan 2008
    Location
    Santa Cruz, CA
    Beans
    147
    Distro
    Ubuntu 10.10 Maverick Meerkat

    mdadm level migration

    Hi,

    I've installed the experimental deb of mdadm 3.1.1, which I intended to use to migrate from a 4 disk raid5 to a 5 disk raid6, but mdadm won't ahve any of it. Running 9.04 64bit server.

    Any suggestions?

    Code:
    tgrimley@gutsy:~$ sudo mdadm --grow /dev/md0 --level=6 --raid-devices=5 --backup-file=/home/tgrimley/md0.backup
    Code:
    tgrimley@gutsy:~$ sudo mdadm -D /dev/md0
    /dev/md0:
            Version : 0.90
      Creation Time : Sat Aug 22 13:50:42 2009
         Raid Level : raid5
         Array Size : 5860535808 (5589.04 GiB 6001.19 GB)
      Used Dev Size : 1953511936 (1863.01 GiB 2000.40 GB)
       Raid Devices : 4
      Total Devices : 5
    Preferred Minor : 0
        Persistence : Superblock is persistent
    
        Update Time : Wed Feb 10 07:32:50 2010
              State : active
     Active Devices : 4
    Working Devices : 5
     Failed Devices : 0
      Spare Devices : 1
    
             Layout : left-symmetric
         Chunk Size : 128K
    
               UUID : 117232ce:f55876b7:9822568f:9ddc1a1a
             Events : 0.1387401
    
        Number   Major   Minor   RaidDevice State
           0       8       65        0      active sync   /dev/sde1
           1       8       97        1      active sync   /dev/sdg1
           2       8       49        2      active sync   /dev/sdd1
           3       8      161        3      active sync   /dev/sdk1
    
           4       8      145        -      spare   /dev/sdj1

  2. #2
    Join Date
    Jan 2008
    Location
    Santa Cruz, CA
    Beans
    147
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: mdadm level migration

    Upgraded to 2.6.32 kernel and now it says


    Code:
    tgrimley@gutsy:~$ sudo mdadm --grow /dev/md0 --level=6 --raid-devices=5 --backup-file=/home/tgrimley/md0.backup
    [sudo] password for tgrimley:
    mdadm level of /dev/md0 changed to raid6
    mdadm: this change will reduce the size of the array.
           use --grow --array-size first to truncate array.
           e.g. mdadm --grow /dev/md0 --array-size 1565568512
    mdadm: aborting level change
    tgrimley@gutsy:~$
    Looked online and it seems this is common if there is a bitmap, but I don't have one!

    Code:
    tgrimley@gutsy:~$ sudo mdadm -D /dev/md0
    /dev/md0:
            Version : 0.90
      Creation Time : Sat Aug 22 13:50:42 2009
         Raid Level : raid5
         Array Size : 5860535808 (5589.04 GiB 6001.19 GB)
      Used Dev Size : 1953511936 (1863.01 GiB 2000.40 GB)
       Raid Devices : 4
      Total Devices : 5
    Preferred Minor : 0
        Persistence : Superblock is persistent
    
        Update Time : Fri Feb 12 08:12:52 2010
              State : clean
     Active Devices : 4
    Working Devices : 5
     Failed Devices : 0
      Spare Devices : 1
    
             Layout : left-symmetric
         Chunk Size : 128K
    
               UUID : 117232ce:f55876b7:9822568f:9ddc1a1a
             Events : 0.1388737
    
        Number   Major   Minor   RaidDevice State
           0       8       81        0      active sync   /dev/sdf1
           1       8      129        1      active sync   /dev/sdi1
           2       8       65        2      active sync   /dev/sde1
           3       8       33        3      active sync   /dev/sdc1
    
           4       8       97        -      spare   /dev/sdg1
    tgrimley@gutsy:~$

  3. #3
    Join Date
    Aug 2005
    Beans
    53

    Re: mdadm level migration

    I dont think you can migrate levels 5 -> 6 only grow an existing level

    If you want to use the old disks to create a new raid then zero the superblock (mdadm --zero-superblock /dev/sd?) on each disk before creating the new raid. Otherwise mdadm gets its knickers in a twist about which disk belongs to which raid setup
    Last edited by drave; February 12th, 2010 at 06:01 PM.

  4. #4
    Join Date
    Jan 2008
    Location
    Santa Cruz, CA
    Beans
    147
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: mdadm level migration

    Quote Originally Posted by drave View Post
    I dont think you can migrate levels 5 -> 6 only grow an existing level
    mdadm 3.1.1 supports level migration (see: http://neil.brown.name/blog/20090817000931)

  5. #5
    Join Date
    Apr 2008
    Beans
    98

    Re: mdadm level migration

    Did you add the new disk to the array before growing it?

    Something like sudo mdadm --manage /dev/md0 --add /dev/<drive>/

  6. #6
    Join Date
    Jan 2008
    Location
    Santa Cruz, CA
    Beans
    147
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: mdadm level migration

    Yes, it's sitting there as a spare

  7. #7
    Join Date
    Jan 2008
    Location
    Santa Cruz, CA
    Beans
    147
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: mdadm level migration

    For future reference, this is a known bug which is apparently patched 7 days after 3.1.1 was released. So if one wants to upgrade from raid5 to raid6 with one disk addition, they will need to compile the current release from git repository.

  8. #8
    Join Date
    Feb 2007
    Location
    Cameron Park CA USA
    Beans
    4,571
    Distro
    Ubuntu Development Release

    Re: mdadm level migration

    Thanks, this is useful to know!
    Regards, frank, at http://yantrayoga.typepad.com/noname/
    Homebuilt Lian-Li PC-Q33WB, Intel i7-4790K 4.6GHz, SSDs,32G RAM | Dell Laptop 13.3".
    Oracle VBox w/ WinXP/Win10 running Xara Designer, PaintShopPro, and InDesign CS.

  9. #9
    Join Date
    Jan 2008
    Location
    Santa Cruz, CA
    Beans
    147
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: mdadm level migration

    If anyone is brave enough to try a raid5->raid6 migration with only a one disk addition under 9.04 with a manually installed 2.6.32 kernel, please let me know

  10. #10
    Join Date
    Oct 2009
    Beans
    2

    Re: mdadm level migration

    Quote Originally Posted by tgrimley View Post
    If anyone is brave enough to try a raid5->raid6 migration with only a one disk addition under 9.04 with a manually installed 2.6.32 kernel, please let me know
    I've done this in a VM, migrated RAID5 -> RAID6 and also back again. It worked as advertised, keeping the array online and the filesystem intact.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •