0

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?

3
  • 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
    – daisy
    Jan 5 '13 at 1:47
  • It looks like you are trying to find the age of your drives, is this correct? Nov 23 '18 at 20:44
1

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
5
  • lshw is not a command in centos
    – user4951
    Jan 4 '13 at 11:54
  • how do you know sda is the root?
    – user4951
    Jan 4 '13 at 11:54
  • /dev/sda1 on / Its the / in that expression that represents the root file system. Jan 4 '13 at 11:55
  • The disks are not mounted yet.
    – user4951
    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? Feb 21 '13 at 16:23
0

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

0

If you have ordered and received two new drives then the simple way to determine which is which is to first list the devices you have connected before you connect them. You can do this using (as root) fdisk -l or as non-root (if you can use sudo)...

sudo fdisk -l

Then connect one drive at a time and repeat this and you can work out which is which.

You can look to see what the the UUID and/or the label are by...

ls -l /dev/disk/by-*

If labels are set then they will point to the device and appropriate entries can be made in your /etc/fstab. If labels are not set and you wish to set them then you can do so using e2label.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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