Answer the question
In order to leave comments, you need to log in
How to see how many disks are connected in Linux?
There is a server which physically costs somewhere far away. The task is to stick 2 more disks into it, but it is not known how much it already costs. How to see on it how many hard drives are connected? In the screenshot I give the output of the lsblk command.
Now how do you know how much?
Answer the question
In order to leave comments, you need to log in
lshw -short will list all hardware
/0/100/3/0 scsi0 storage Series 6 - 6G SAS/PCIe 2
/0/100/3/0/1.0.0 disk WD1003FBYZ-010FB
/0/100/3/0/1.1 .0 disk WD1003FBYZ-010FB
/0/100/3/0/1.2.0 disk WD1003FBYZ-010FB
/0/100/3/0/1.3.0 disk WD1003FBYZ-010FB
/0/100/3/0/1.4.0 disk WD1003FBYZ-010FB
/0/100/3/0/1.5.0 disk WD1003FBYZ-
010FB
/0/100/3/0/1.6.0 -010FB
As far as I understand, one.
sd* - disks, including flash drives and the like. In your case - one sda.
Correct me if I'm wrong.
lsblk |grep disk
for an example server with lots of screws:
[email protected] / # lsblk |grep disk
sda 8:0 0 465.8G 0 disk
sdb 8:16 0 931.5G 0 disk
sdc 8:32 0 931.5G 0 disk
sdd 8: 48 0 931.5G 0 disk
sd 8:64 0 465.8G 0 disk
sdf 8:80 0 931.5G 0 disk
sdg 8:96 0 931.5G 0 disk
df -h
fdisk -l
I've never heard of this, sorry :(
cat /proc/partitions
major minor #blocks name
And you spelled it right. sd* (sda, sdb, sdc, ...) are different disks. At least , on your version of Linux, sda1, sda2, ... are logical volumes.As in Windows - drive C:\, D:\ ... But they are all on the same physical.So
if you gave a full screenshot and nothing below it doesn't matter, then you have one physical disk installed.
Judging by your screenshot - one logical volume.
Weird attempt at a problem.
And if there is no room for new disks in the case of that server?
Either there are disks, but for some reason they are physically disabled. What then?
LANG=C fdisk -l|grep [s,h,v]d[a-z]|grep Disk 2>/dev/null
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question