Koozali.org: home of the SME Server

DegradedArray on single disk

Offline Tillebeck

  • ****
  • 76
  • +0/-0
DegradedArray on single disk
« on: August 17, 2008, 10:59:11 PM »
Hi

I ran into the degradedArray mail but the server is still running with no noticable problems.

I did read this page:
http://wiki.contribs.org/Raid

there is an example with two disks and it seems it should be more or less obvious with partition there is the faulty one ;-) Unfortunately that does not count for me so I hope one of you guys will point me in the right direction.

I get this output (single disk only)
[root@hp600 ~]# cat /proc/mdstat
Personalities : [raid1]
md2 : active raid1 hdc2[0]
      245007232 blocks [2/1] [U_]

md1 : active raid1 hdc1[0] hdd1[1]
      104320 blocks [2/2] [UU]

unused devices: <none>
[root@hp600 ~]#

From the link above I guess the hdc2 is the one that should be readded. But just to do a compare with a similar healthy server I logged into and ran the same command from a test server. And there both hd1 and hd2 where listed as [U_]. So now I am wondering if that is more a difference seen between single and multible disk servers?...

BR. Anders

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: DegradedArray on single disk
« Reply #1 on: August 18, 2008, 06:30:33 AM »
Tillebeck

In your first example hdd is the broken device

The healthy server your are looking at also appears to have problems

On a IDE system you should be seeing something like this:

Personalities : [raid1]
md2 : active raid1 hda2[0] hdc2[1]
      80308864 blocks [2/2] [UU]

md1 : active raid1 hda1[0] hdc1[1]
      104320 blocks [2/2] [UU]

unused devices: <none>


On a SATA system like this:

Personalities : [raid1]
md2 : active raid1 sda2[0] sdb2[1]
      312464128 blocks [2/2] [UU]

md1 : active raid1 sda1[0] sdb1[1]
      104320 blocks [2/2] [UU]

unused devices: <none>

Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline pmstewart

  • *
  • 73
  • +0/-0
Re: DegradedArray on single disk
« Reply #2 on: August 30, 2008, 06:31:28 AM »
Tillebeck,

What Mary is trying to say is your drives are chained incorrectly on the IDE cables in your machine. The bios is probably set
incorrectly as well - forcing it to boot to hdc (hdd-2 in the bios). Once you have that straightened out -

Searching the forums can produce many different commands which will attempt to repair or reinitialize the raid.

A recent discovery may help by powering down the machine from the console. Disconnecting the power from the drive which is having
difficulty and powering the machine back up and going back into the console. After entering the "manage raid" screen simply exit and
shut the system down once again reconnecting the faulty drive. After starting the machine up go back into the console and "manage raid"
this time it will ask you if you'd like to readd the drive to the system - select ok and then wait a couple of minutes and check it's progress
by re-entering the "manage raid".

Hope this helps.........

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: DegradedArray on single disk
« Reply #3 on: August 31, 2008, 05:22:43 PM »
Unfortunately that does not count for me so I hope one of you guys will point me in the right direction.

I get this output (single disk only)
[root@hp600 ~]# cat /proc/mdstat
Personalities : [raid1]
md2 : active raid1 hdc2[0]
      245007232 blocks [2/1] [U_]

md1 : active raid1 hdc1[0] hdd1[1]
      104320 blocks [2/2] [UU]

unused devices: <none>
[root@hp600 ~]#

From the link above I guess the hdc2 is the one that should be readded.

That is incorrect. hdd2 is the partition which should be part of /dev/md2 but isn't. hdc2 is correctly functioning as part of the array. You should look through your logs and discover why hdd2 was kicked out of the array. You can re-add the partition, but perhaps what you should do is to replace the drive, which might be failing.

You also have your two hard drives on /dev/hdc and /dev/hdd, when they would perform better on /dev/hda and /dev/hdc - i.e as master on the two IDE channels.

Offline Tillebeck

  • ****
  • 76
  • +0/-0
Re: DegradedArray on single disk
« Reply #4 on: November 03, 2008, 08:51:14 AM »
Thanks for the help.
I looked at the wiki and at this thread:
http://forums.contribs.org/index.php?topic=39738.0

I ended up doing:
[root@hp600 ~]# mdadm /dev/md2 -a /dev/hdd2

Until now  it seems fine. So far so good.

But Charlie Brady pointed out that my disks are set up incorrect. Or at least connected to the wrong ide-cables. Can I just power down the maschine. Change reorder the cables and boot the server again?

BR. Anders


P.S.
I got another (not important) server that gives me the output below. It is fine with me just to reinstall it but could it be fixed in any way with two broken partitions?

[root@ronja ~]# cat /proc/mdstat
Personalities : [raid1]
md2 : active raid1 hda2[0]
      245007232 blocks [2/1] [U_]

md1 : active raid1 hda1[0]
      104320 blocks [2/1] [U_]

unused devices: <none>
[root@ronja ~]#


Offline janet

  • *****
  • 4,812
  • +0/-0
Re: DegradedArray on single disk
« Reply #5 on: November 03, 2008, 09:03:02 AM »
Tillebeck

That looks like a whole drive has failed and needs to be replaced.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline Tillebeck

  • ****
  • 76
  • +0/-0
Re: DegradedArray on single disk
« Reply #6 on: November 03, 2008, 09:08:34 AM »
Thanks.
Cannot understand the output. Probably have to google a "raid for dummies" article to get a better understanding

BR. Anders

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: DegradedArray on single disk
« Reply #7 on: November 03, 2008, 09:29:03 AM »
Tillebeck

RAID1 has two drives, in your case hda & something else, perhaps hdc (it could be hdb, hdc or hdd).
If both drives are connected as Masters on seperate channels then they will be hda & hdc, which is usually the optimal fail safe configuration

Mirror image partitions hda1 & hdc1 form the boot partition md1 of the RAID array
Mirror image partitions hda2 & hdc2 form the data partition md2 of the RAID array
For all intents and purposes the RAID array looks like one drive to the system, which has a boot partition md1 and a data partition md2

md2 : active raid1 hda2[0]
      245007232 blocks [2/1] [U_]

md1 : active raid1 hda1[0]
      104320 blocks [2/1] [U_]

In your case, only 1 out of 2 drives in each partition is active, the [2/1] part
The active drive is hda in both cases
The two partitions of the second drive have disappeared, the [U_] part
which is highly indicative of a total drive failure.

A good drive would look like

Personalities : [raid1]
md2 : active raid1 hda2[0] hdc2[1]
      80308864 blocks [2/2] [UU]

md1 : active raid1 hda1[0] hdc1[1]
      104320 blocks [2/2] [UU]

Also see
http://wiki.contribs.org/Raid
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline william_syd

  • *****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Re: DegradedArray on single disk
« Reply #8 on: November 03, 2008, 10:13:27 AM »
Do a fdisk -l to see what drives and partitions you have.



[root@tiger ~]# fdisk -l

Disk /dev/hda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1          13      104391   fd  Linux raid autodetect
/dev/hda2              14       38913   312464250   fd  Linux raid autodetect

Disk /dev/hdc: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdc1   *           1          13      104391   fd  Linux raid autodetect
/dev/hdc2              14       38913   312464250   fd  Linux raid autodetect

Disk /dev/md1: 106 MB, 106823680 bytes
2 heads, 4 sectors/track, 26080 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md1 doesn't contain a valid partition table

Disk /dev/md2: 319.9 GB, 319963267072 bytes
2 heads, 4 sectors/track, 78116032 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md2 doesn't contain a valid partition table

Disk /dev/dm-0: 317.7 GB, 317760471040 bytes
2 heads, 4 sectors/track, 77578240 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 2080 MB, 2080374784 bytes
2 heads, 4 sectors/track, 507904 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/dm-1 doesn't contain a valid partition table
[root@tiger ~]#




[root@c3 ~]# fdisk -l

Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1          13      104391   fd  Linux raid autodetect
/dev/hda2              14        9729    78043770   fd  Linux raid autodetect

Disk /dev/md1: 106 MB, 106823680 bytes
2 heads, 4 sectors/track, 26080 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md1 doesn't contain a valid partition table

Disk /dev/md2: 79.9 GB, 79916695552 bytes
2 heads, 4 sectors/track, 19510912 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md2 doesn't contain a valid partition table

Disk /dev/dm-0: 79.6 GB, 79658221568 bytes
2 heads, 4 sectors/track, 19447808 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 201 MB, 201326592 bytes
2 heads, 4 sectors/track, 49152 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/dm-1 doesn't contain a valid partition table
[root@c3 ~]#




[root@tiger ~]# cat /proc/mdstat
Personalities : [raid1]
md2 : active raid1 hda2[0] hdc2[1]
      312464128 blocks [2/2] [UU]

md1 : active raid1 hda1[0] hdc1[1]
      104320 blocks [2/2] [UU]

unused devices: <none>
[root@tiger ~]#




[root@c3 ~]# cat /proc/mdstat
Personalities : [raid1]
md2 : active raid1 hda2[0]
      78043648 blocks [2/1] [U_]

md1 : active raid1 hda1[0]
      104320 blocks [2/1] [U_]

unused devices: <none>
[root@c3 ~]#




Two different machines, one with one disk and one with two.
« Last Edit: November 03, 2008, 10:27:58 AM by william_syd »
Regards,
William

IF I give advise.. It's only if it was me....

Offline electroman00

  • *****
  • 491
  • +0/-0
Re: DegradedArray on single disk
« Reply #9 on: November 05, 2008, 01:24:27 AM »
--
« Last Edit: November 08, 2008, 03:43:39 PM by electroman00 »

Offline electroman00

  • *****
  • 491
  • +0/-0
Re: DegradedArray on single disk
« Reply #10 on: November 05, 2008, 01:41:03 AM »
--
« Last Edit: November 08, 2008, 03:44:03 PM by electroman00 »

Offline Tillebeck

  • ****
  • 76
  • +0/-0
Re: DegradedArray on single disk
« Reply #11 on: November 07, 2008, 09:55:28 AM »
Electroman, you are right. It doesn't make sense. And right now I do not know why I wrote single disk?
 - There are two disks in the server
 - They are ATA disks and they are on the same cable (I think)
 - Both disks where in when the server was installed.
 - There are both floppy and CD-Rom in both mashines

I am quite sure that it counts for both servers that they have two disks. But I am getting in doubt with the second one... But it is not important. I will pick it up some day, drive it to the office, replace the foulty disk (if there is two disks in it) and reinstall it with SME8.


Status for the first server:

After running:
Code: [Select]
[root@hp600 ~]# mdadm /dev/md2 -a /dev/hdd2
I get this:
Code: [Select]
[root@hp600 ~]# cat /proc/mdstat
Personalities : [raid1]
md2 : active raid1 hdd2[1] hdc2[0]
      245007232 blocks [2/2] [UU]

md1 : active raid1 hdc1[0] hdd1[1]
      104320 blocks [2/2] [UU]

unused devices: <none>

So it seems to be fine again. Now I just have to try to move the cables so the disk turn into hda
thanks a lot for your help :-)

BR. Anders

Offline electroman00

  • *****
  • 491
  • +0/-0
Re: DegradedArray on single disk
« Reply #12 on: November 07, 2008, 10:20:02 AM »
--
« Last Edit: November 08, 2008, 03:39:52 PM by electroman00 »

Offline Tillebeck

  • ****
  • 76
  • +0/-0
Re: DegradedArray on single disk
« Reply #13 on: November 07, 2008, 11:27:04 AM »
Agree :-)
sme8 will just be for testing on a separate server - and  a bit of local development. I using some software that need php5.2.1 and since the SME7.3 does not (out-of-the-box) work with php5 then I using a few development hotels at different webservers. It is just so much more convenient to do development on a local server so SME8 will just be for fun, for testing and maybe even bugreports if I should come across anything.

I have one old server  (old old old) that I tried the sme8 with. But it looses its internet connection when I reinstall with sme8 or upgrade to sme8 (upgrade a fresh 7.3).

So I have to find another server to try out sme8. Or maybe just a newer pci-card for ethernet will do.

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: DegradedArray on single disk
« Reply #14 on: November 07, 2008, 11:40:30 AM »
- They are ATA disks and they are on the same cable (I think)

that's EVIL
if ide channel fails, your data is gone..

when you work with SW raid1 and ide/ata disks, hd MUST be on different channels and preferably as master..

Ciao
Stefano