LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to check HDD info (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-check-hdd-info-4175638767/)

catiewong 09-19-2018 10:37 PM

How to check HDD info
 
I would like to know how many disk (and each of its size ) in my system , and which raid level ( eg. raid 5 ,6 etc ) is running , how to do it .

I use the command lsblk , the result as below , how do I know what HDD size it it ?

Code:


sda                                                                                            8:0    0 557.8G  0 disk
├─sda1                                                                                        8:1    0  500M  0 part /boot
└─sda2                                                                                        8:2    0 557.3G  0 part


jsbjsb001 09-19-2018 10:57 PM

Quote:

Originally Posted by catiewong (Post 5905552)
I would like to know how many disk (and each of its size ) in my system , and which raid level ( eg. raid 5 ,6 etc ) is running , how to do it .

I use the command lsblk , the result as below , how do I know what HDD size it it ?

Code:


sda                                                                                            8:0    0 557.8G  0 disk
├─sda1                                                                                        8:1    0  500M  0 part /boot
└─sda2                                                                                        8:2    0 557.3G  0 part


Is this homework?

If so, you should really do some research. I can think of at least couple of different commands that would tell you that info.

Please look at the following commands;

Code:

man parted
man fdisk


berndbausch 09-20-2018 01:19 AM

Quote:

Originally Posted by catiewong (Post 5905552)
I would like to know how many disk (and each of its size ) in my system , and which raid level ( eg. raid 5 ,6 etc ) is running , how to do it .

I use the command lsblk , the result as below , how do I know what HDD size it it ?

Code:


sda                                                                                            8:0    0 557.8G  0 disk
├─sda1                                                                                        8:1    0  500M  0 part /boot
└─sda2                                                                                        8:2    0 557.3G  0 part


When I run lsblk, it shows the size. This is Ubuntu on an Odroid:
Code:

$ lsblk
NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda          8:0    0  2.7T  0 disk
└─sda1        8:1    0  2.7T  0 part /mnt/backup
mmcblk0    179:0    0 29.7G  0 disk
├─mmcblk0p1 179:1    0  128M  0 part /media/boot
└─mmcblk0p2 179:2    0 29.6G  0 part /

Perhaps you have to specify the size explicitly. In this case, try
Code:

$ lsblk -o NAME,SIZE
NAME        SIZE
sda          2.7T
└─sda1      2.7T
mmcblk0    29.7G
├─mmcblk0p1  128M
└─mmcblk0p2 29.6G

For the RAID level, it depends. If you use LVM, the lvdisplay command should show you the RAID level of logical volumes. If you use MD RAID (the standard Linux software RAID solution), use a command like mdadm -D. If you have a real RAID device, it should have its own tool to see the RAID level.

catiewong 09-20-2018 04:13 AM

thanks,

If I want to know what raid level is using , is it possible ?

berndbausch 09-20-2018 05:48 AM

Quote:

Originally Posted by catiewong (Post 5905623)
thanks,

If I want to know what raid level is using , is it possible ?

Read the last paragraph of my answer:
Quote:

For the RAID level, it depends. If you use LVM, the lvdisplay command should show you the RAID level of logical volumes. If you use MD RAID (the standard Linux software RAID solution), use a command like mdadm -D. If you have a real RAID device, it should have its own tool to see the RAID level.
Let me give you an example for a real RAID device: If your server is an HPE Proliant, you probably have a so-called Smartarray inside, HPE's hardware RAID. The tool to manage, configure and check Smartarrays is called SSA, and the command line utility hpssacli.

JJJCR 09-20-2018 06:04 AM

Quote:

Originally Posted by catiewong (Post 5905623)
thanks,

If I want to know what raid level is using , is it possible ?

lspci -vv | grep -i raid


All times are GMT -5. The time now is 07:30 AM.