-   Linux - Hardware (
-   -   Help understanding how drives/arrays are detected (

elliot01 02-10-2013 05:36 AM

Help understanding how drives/arrays are detected
Hi all,

I've made such a hash of configuring an external RAID enclosure on a RHEL6 box, I've got to the point where I don't know how I actually got to where I am now!

Anyway, I think I have it working now, but I would like some help understanding something.

In my very limited experience of installing disks under linux before, I have just seen them as /dev/sda, /dev/sdb etc, then created partitions which appear as /dev/sda1, /dev/sda2 etc.

Dmesg shows my device as sdc:

[root@db2 backups]# grep sdc /var/log/dmesg
sd 6:0:0:0: [sdc] 3509329920 512-byte logical blocks: (1.79 TB/1.63 TiB)
sd 6:0:0:0: [sdc] Write Protect is off
sd 6:0:0:0: [sdc] Mode Sense: 77 00 10 08
sd 6:0:0:0: [sdc] Write cache: disabled, read cache: enabled, supports DPO and FUA
 sdc: sdc1
sd 6:0:0:0: [sdc] Attached SCSI disk

I created a partition but attempting to format /dev/sdc1 resulted in errors. Eventually, by looking at /proc/partitions, I noticed an entry /dev/dm-0.

Now I understand this is something to do with the drive mapper, but that's all I know! :confused:

I have been able to format and use it so I guess it's working okay, but could a kind soul please explain, or speculate, why my device has appeared as /dev/dm-0 and not /dev/sdc1?

Thank you

David the H. 02-10-2013 07:24 AM

A raid partition is a virtual device, not a physical one. /dev/sdc points to the physical drive, while /dev/dm-0 is the virtual partition that combines the space of multiple discs.

elliot01 02-13-2013 02:46 AM

Hi David the H,

Thank you for your reply, but that doesn't seem to satisfy what I am seeing. Or I am misinterpreting your answer.

My server consists of:
2 x internal HDDs (RAID1) = sda
8 x internal HDDs (RAID10) = sdb
12 x HDDs (external enclosure) (RAID10) = sdc


[root@db2 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda3            259G  150G  96G  62% /
tmpfs                  16G    0  16G  0% /dev/shm
/dev/sda1              50M  250K  50M  1% /boot/efi
/dev/sda4              16G  168M  15G  2% /tmpfs
                      1.7T  127G  1.5T  9% /live
/dev/sdb2            184G  163G  12G  94% /newver
/dev/sdb3            184G  105G  70G  61% /test
/dev/sdb4            184G  132G  43G  76% /report

So, why do I see sda1,sda3,sdb2,sdb3 etc but not sdc1? All the above are partitions on various RAIDs.
I accept that sdc is how the physical enclosure is seen by the OS, but why is the partition dm-0 and not sdc1?

Thank you.


pingu 02-15-2013 12:25 PM

Could you post the entire configuration?
Like output of "fdisk -l", "cat /etc/fstab", raid configuration I guess can be shown by mdadm in some way but it's a long time since I used it so don't really know.

All times are GMT -5. The time now is 02:42 PM.