Link to home
Start Free TrialLog in
Avatar of yjh123
yjh123

asked on

RH7.1 raidhotadd doesn't work...

I am having difficulty resynchronizing disks after booting the system without one disk(sdb)... Looks like the mirror broke when I booted.

I set up RAID 1 with two SCSI disks(sda & sdb) and this is the strucutre:
-----------------------------------------------------
df

Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/md0               4032000    933016   2894164  25% /
/dev/md1              60475924    107636  57296268   1% /home
/dev/md3               3510208       368   3331528   1% /tmp
/dev/md2               2015952     20584   1892960   2% /var

But when I do "raidhotadd", I get an error message:

raidhotadd /dev/md0 /dev/sdb1
/dev/md0: can not hot-add disk: invalid argument.

After this, if I do not specify the second drive, it doesn't get any error, but it doesn't do the job either.

raidhotadd /dev/md0 /dev/sdb
---------------------------------------------------------
cat /proc/mdstat
Personalities : [raid1]
read_ahead 1024 sectors
md0 : active raid1 sdb[2] sda1[1]
      4096448 blocks [2/1] [_U]
      [=>...................]  recovery =  6.5% (267620/4096448) finish=5.7min speed=11150K/sec
md1 : active raid1 sda5[1]
      61440448 blocks [2/1] [_U]

md3 : active raid1 sda6[1]
      3566272 blocks [2/1] [_U]

md2 : active raid1 sda7[1]
      2048192 blocks [2/1] [_U]

unused devices: <none>
--------------------------------------------------

After this, if I do this I get error message:

raidhotadd /dev/md1 /dev/sdb
/dev/md1: can not hot-add disk: invalid argument.

Can anyone help? Thanks.


Some important information:
-----------------------------------------------------
dmesg -c

trying to hot-add sdb1 to md0 ...
md: could not lock sdb1, zero-size? Marking faulty.
md: error, md_import_device() returned -22
trying to hot-add sdb5 to md1 ...
md: could not lock sdb5, zero-size? Marking faulty.
md: error, md_import_device() returned -22
trying to hot-add sdb5 to md2 ...
md: could not lock sdb5, zero-size? Marking faulty.
md: error, md_import_device() returned -22
trying to hot-add sdb6 to md3 ...
md: could not lock sdb6, zero-size? Marking faulty.
md: error, md_import_device() returned -22
trying to hot-add sdb1 to md0 ...
md: could not lock sdb1, zero-size? Marking faulty.
md: error, md_import_device() returned -22
-------------------------------------------------------
cat /proc/mdstat

Personalities : [raid1]
read_ahead 1024 sectors
md0 : active raid1 sda1[1]
      4096448 blocks [2/1] [_U]

md1 : active raid1 sda5[1]
      61440448 blocks [2/1] [_U]

md3 : active raid1 sda6[1]
      3566272 blocks [2/1] [_U]

md2 : active raid1 sda7[1]
      2048192 blocks [2/1] [_U]

unused devices: <none>
-------------------------------------------------------
df

Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/md0               4032000    933016   2894164  25% /
/dev/md1              60475924    107636  57296268   1% /home
/dev/md3               3510208       368   3331528   1% /tmp
/dev/md2               2015952     20552   1892992   2% /var

-----------------------------------------------------
cat /etc/raidtab

raiddev             /dev/md0
raid-level                  1
nr-raid-disks               2
chunk-size                  64k
persistent-superblock       1
#nr-spare-disks     0
    device          /dev/sda1
    raid-disk     0
    device          /dev/sdb1
    raid-disk     1
raiddev             /dev/md1
raid-level                  1
nr-raid-disks               2
chunk-size                  64k
persistent-superblock       1
#nr-spare-disks     0
    device          /dev/sda5
    raid-disk     0
    device          /dev/sdb5
    raid-disk     1
raiddev             /dev/md2
raid-level                  1
nr-raid-disks               2
chunk-size                  64k
persistent-superblock       1
#nr-spare-disks     0
    device          /dev/sda7
    raid-disk     0
    device          /dev/sdb7
    raid-disk     1
raiddev             /dev/md3
raid-level                  1
nr-raid-disks               2
chunk-size                  64k
persistent-superblock       1
#nr-spare-disks     0
    device          /dev/sda6
    raid-disk     0
    device          /dev/sdb6
    raid-disk     1
Avatar of iharding
iharding
Flag of United States of America image

post "fdisk -l /dev/????" for all disks
As far as I know, you must have either raid5 or raid10 setup in order to use hot swapping. raid 1 is normal mirroring...
Avatar of Moondancer
Moondancer

yjh123--->  You have TEN open questions, I will update them all with these comments.  Please check the Guidelines and Member Agreement available from the HELP DESK link on the left about the rules for this site.  I will monitor them all for updates and closures.

If you need help from Community Support, let us know.  If no response by the end of next week, I will handle them all and advise Administration.

Your cooperation and understanding is not only appreciated, but necessary.

Moondancer
Community Support Moderator @ Experts Exchange
yjh123 logged in after this request was posted but chose not to update or finalize it, so I ask for your input as to the fair way to conclude and close this (award/PAQ or Delete).

Thanks,

Moondancer
Community Support Moderator @ Experts Exchange
ASKER CERTIFIED SOLUTION
Avatar of Moondancer
Moondancer

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial