Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I ordered 2 SSDs from my provider.

However, which drive is the main drive?

How do I know which drive is the new SSD drives?

share|improve this question
1  
The UUIDs differ. If you set a disklabel that's a way to distinguish them. The partition scheme might be different as well as the content. If this all does not help I would look at the SMART data, the new drive will show a short total operation time. –  Marco Jan 4 '13 at 11:20
    
Why close it? From what I see, The OP just want to know which drive is mounted as root device –  warl0ck Jan 5 '13 at 1:47

2 Answers 2

up vote 1 down vote accepted

You could check it by using the command

mount

It will give you all the mounted file systems. What you are interested is where the root file system is mounted (i presume thats what you mean by main drive).

This is my sample output of the mount command (just the line which contains the main disc)

/dev/sda1 on / type ext4 (rw,errors=remount-ro)

What it says is that the partition sda1 (just sda represents the disn, sda1 represents the partition) is mounted as root. So now we know that the main disc is sda. Now we have to check what disc is actually sda.

Using lshw

Chech that with

sudo lshw -class disk

My output is

*-disk                  
   description: ATA Disk
   product: TOSHIBA
   vendor: ...
   physical id: ....
   bus info: ...
   logical name: /dev/sda
   version: ...
   serial: ...
   size: 465GiB (500GB)

From which we can see that sda is the 500GB Toshiba disc.

Using fdisk

sudo fdisk -l sda

Output:

Disk sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00024cba
share|improve this answer
    
lshw is not a command in centos –  Jim Thio Jan 4 '13 at 11:54
    
how do you know sda is the root? –  Jim Thio Jan 4 '13 at 11:54
    
/dev/sda1 on / Its the / in that expression that represents the root file system. –  Alan Jan 4 '13 at 11:55
    
The disks are not mounted yet. –  Jim Thio Feb 21 '13 at 8:39
    
@JimThio Not sure a understand your comment. Do you have three discs, one old, and two new SSD-s? And now you want to check which of file in /dev represents which SSD without mounting them? –  Alan Feb 21 '13 at 16:23

With parted which is available at CentOS afaik you won't need to mount any device

parted
print devices

or

parted
print list

will give you further details

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.