Koozali.org: home of the SME Server

Confused over cat /proc/mdstat results

Offline mrrickus

  • 3
  • +0/-0
Confused over cat /proc/mdstat results
« on: January 20, 2011, 10:01:00 AM »
Hi - first post and a bit of a novice i'm affraid!
I'm trying to establish if my RAID1 is working or not.
Running 7.5.1 and these are the results from cat /proc/mdstat and fdisk -l.
I just don't know how to read them!
Can anyone please help demystify this for me? Many thanks!

Code: [Select]
[root@ppr-server-bristol ~]# cat /proc/mdstat
Personalities : [raid1]
md2 : active raid1 sdb2[0] sda2[1]
      976655488 blocks [2/2] [UU]
     
md1 : active raid1 sdb1[0] sda1[1]
      104320 blocks [2/2] [UU]
     
unused devices: <none>
[root@ppr-server-bristol ~]# fdisk -l

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104384+  fd  Linux raid autodetect
Partition 1 does not end on cylinder boundary.
/dev/sda2              13      121601   976655647   fd  Linux raid autodetect

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1          13      104391   fd  Linux raid autodetect
/dev/sdb2              14      121601   976655610   fd  Linux raid autodetect

Disk /dev/sdd: 1000.2 GB, 1000202043392 bytes
255 heads, 63 sectors/track, 121600 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1   *           1      121601   976758784    7  HPFS/NTFS

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: 1000.0 GB, 1000095219712 bytes
2 heads, 4 sectors/track, 244163872 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

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

Disk /dev/dm-0: 999.0 GB, 999049658368 bytes
2 heads, 4 sectors/track, 243908608 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

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

Disk /dev/dm-1: 1040 MB, 1040187392 bytes
2 heads, 4 sectors/track, 253952 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

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


Offline byte

  • *
  • 2,183
  • +2/-0
Re: Confused over cat /proc/mdstat results
« Reply #1 on: January 20, 2011, 01:40:55 PM »
Hi - first post and a bit of a novice i'm affraid!

Hi and welcome :)

Quote
Can anyone please help demystify this for me? Many thanks!

mdstat is the one you want to look at for any raid checks/issues, also check this link out:

http://tldp.org/FAQ/Linux-RAID-FAQ/x37.html#failrecover

fdisk is more of a partitioning tool which you really never use as the install takes care of all.

Try using google and type mdstat you will see literally hundreds of results and always remember google is your friend :) type the command or question and it 99.9% of the time you will find what your looking for.

Hope this helps.
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Offline mrrickus

  • 3
  • +0/-0
Re: Confused over cat /proc/mdstat results
« Reply #2 on: January 20, 2011, 02:22:20 PM »
Thanks Byte!

The link was very helpful - learning slowly!!
I've been googling around this, but haven't found any good info explaining the "blocks" element of the mdstsat result.
It looks to me like the raid IS working from what I've read, but I'm concerned about the massive difference in block size on md2 (976655488 blocks [2/2] [UU]) & md1 (104320 blocks [2/2] [UU]).
I hate to ask for answers - but do you know if this means I have a problem (brain function excluded!).
Back to google now.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Confused over cat /proc/mdstat results
« Reply #3 on: January 20, 2011, 02:44:57 PM »
It looks to me like the raid IS working from what I've read, but I'm concerned about the massive difference in block size on md2 (976655488 blocks [2/2] [UU]) & md1 (104320 blocks [2/2] [UU]).

All SME systems have one small RAID1 device to contain /boot and one larger one containing everything else.

Quote
I hate to ask for answers - but do you know if this means I have a problem (brain function excluded!).

If you have a problem, and email will be sent to the admin mailbox.

Offline mrrickus

  • 3
  • +0/-0
Re: Confused over cat /proc/mdstat results
« Reply #4 on: January 20, 2011, 03:15:20 PM »
Ah ha,
Good info thanks - not got any errors in mail, so I'll assume the RAID is working properly.
Thanks folks!

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Re: Confused over cat /proc/mdstat results
« Reply #5 on: January 20, 2011, 04:54:05 PM »
You can watch the result of mdstat and search for this: [UU]

Two "U" is a good thing.... just one of them a bad news if you have TWO HDDs (same apply to more than 2 HDDs I presume!).
...