RAID maintenance not showing raided drive

41 views
Skip to first unread message

Cem Basu

unread,
Dec 25, 2013, 1:14:42 PM12/25/13
to
I know various incarnations of this issue exist scattered around, but I'm getting the following after creating (used Wizard) a RAID1 with 2x4TB drives.  I tried the code fix for raid.cgi, but that did not resolve.

RAID Creation and Maintenance 

fdisk: device has more than 2^32 sectors, can't use all of them fdisk: device has more than 2^32 sectors, can't use all of them
RAID Creation
Dev.TypeComponent 1Component 2Spare
md0

RAID Maintenance
Dev.CapacityLevelComponentsArrayRAID OperationsComponent Operations

There is nothing listed under the Maintenance for my md0, however I do have output from mdadm -

# mdadm --detail /dev/md0

/dev/md0:

        Version : 1.2

  Creation Time : Tue Dec 24 07:21:24 2013

     Raid Level : raid1

     Array Size : 3906492112 (3725.52 GiB 4000.25 GB)

  Used Dev Size : 3906492112 (3725.52 GiB 4000.25 GB)

   Raid Devices : 2

  Total Devices : 2

    Persistence : Superblock is persistent


  Intent Bitmap : Internal


    Update Time : Wed Dec 25 08:18:23 2013

          State : active, degraded, recovering

 Active Devices : 1

Working Devices : 2

 Failed Devices : 0

  Spare Devices : 1


 Rebuild Status : 17% complete


           Name : dns323:0  (local to host dns323)

           UUID : 81c65205:33c1b554:84045d6b:52868c4c

         Events : 115607


    Number   Major   Minor   RaidDevice State

       0       8       18        0      active sync   /dev/sdb2

       1       8       34        1      spare rebuilding   /dev/sdc2


I can access the contents/data without issue and just recently kicked off the rebuild due to upgrading from 1TB to 4TB - had both 1x1TB (md1, degraded) and 1x4TB (md0, degraded) in the DNS323 to cp/rsync the data from 1TB to the 4TB.  

Any suggestions?

Cem Basu

unread,
Dec 25, 2013, 1:40:49 PM12/25/13
to al...@googlegroups.com
UPDATE: I tried the patch script but it would not take effect (created a backup copy of raid.cgi before applying anything.  So I decided to insert the updated code lines manually (not recommended for newb) and it worked like a charm.  Steps I took:
1. cd /usr/www/cgi-bin
2. cp -p raid.cgi raid.cgi_orig
3. vi raid.cgi, searched for 'curdev' and performed the following updates

# THIS IS RIGHT! first non-existing md device                   

#curdev=$(mdadm --examine --scan | awk '/ARRAY/{ print substr($2, match($2, "md"))}')

#for dev in $(seq 0 9); do                                                           

#       if ! echo $curdev | grep -q md$dev; then break; fi                           

#done                                                                                

# for metadata 1.2 mdadm reports /dev/md/0, /dev/md/1... which are simlinks to /dev/md0, /dev/md1...

curdev=$(for i in $(mdadm --examine --scan | awk '/ARRAY/{ print substr($2, match($2, "md"))}'); do 

if test -h /dev/$i; then                                                                            

            if a=$(readlink -f /dev/$i); then basename $a; fi                                       

                else                                                                               

                            echo $i                          

                                fi                                                                  

                                done)                                                              

                                                                                                    

                                for dev in $(seq 0 9); do                                          

                                    if ! echo $curdev | grep -q md$dev; then break; fi

                                         done                                         


4. Saved it out
5. Tested the web gui RAID page

This pulled up my RAID,

RAID Creation and Maintenance help

When done you must save settings help
fdisk: device has more than 2^32 sectors, can't use all of them fdisk: device has more than 2^32 sectors, can't use all of them
RAID Creation
Dev.TypeComponent 1Component 2Spare
md1

RAID Maintenance
Dev.CapacityLevelComponentsArrayRAID OperationsComponent Operations
md03725.5 GBraid1sdb2 sdc2recovering

All is good and just about finished syncing :-)
Reply all
Reply to author
Forward
0 new messages