LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-19-2018, 09:37 PM   #1
catiewong
Member
 
Registered: Aug 2018
Posts: 190

Rep: Reputation: Disabled
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
 
Old 09-19-2018, 09:57 PM   #2
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth, unfortunately...
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881

Rep: Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063
Quote:
Originally Posted by catiewong View Post
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
 
Old 09-20-2018, 12:19 AM   #3
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by catiewong View Post
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.
 
Old 09-20-2018, 03:13 AM   #4
catiewong
Member
 
Registered: Aug 2018
Posts: 190

Original Poster
Rep: Reputation: Disabled
thanks,

If I want to know what raid level is using , is it possible ?
 
Old 09-20-2018, 04:48 AM   #5
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by catiewong View Post
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.

Last edited by berndbausch; 09-20-2018 at 04:53 AM. Reason: addition
 
Old 09-20-2018, 05:04 AM   #6
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,150

Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
Lightbulb

Quote:
Originally Posted by catiewong View Post
thanks,

If I want to know what raid level is using , is it possible ?
lspci -vv | grep -i raid
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How to check CPU info on Linux LXer Syndicated Linux News 0 12-27-2014 03:06 PM
HDD spindown info as normal user (script) benjalien Linux - Server 4 12-03-2013 04:27 AM
If you own a PS3, how do you backup the HDD info ? H_TeXMeX_H General 5 01-29-2010 04:21 AM
how to check the hardware info rehan999 Linux - Software 5 02-11-2009 06:08 AM
How to copy all User and Samba info to new HDD MichaelP Linux - Networking 2 03-06-2005 01:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration