M
M
mrbaskus2015-07-08 13:52:20
linux
mrbaskus, 2015-07-08 13:52:20

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?
7a160781a8564e3480dd2cc6133ac9c9.png

Answer the question

In order to leave comments, you need to log in

8 answer(s)
V
vadik_tmb, 2015-07-09
@mrbaskus

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

V
Vadim K, 2015-07-08
@OLQLOSH

fdisk -l

M
Mikhail Osher, 2015-07-08
@miraage

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.

V
Vladimir, 2015-07-08
@MechanID

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

O
oia, 2015-07-08
@oia

cat /proc/partitions
major minor #blocks name

V
Vasily, 2015-07-08
@DobriyJuk

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.

S
Spetros, 2015-07-08
@Spetros

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?

E
Ergil Osin, 2015-07-09
@Ernillew

LANG=C fdisk -l|grep [s,h,v]d[a-z]|grep Disk 2>/dev/null

Hm.
Well, try something like this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question