Show all available block devices

Sometimes you just want to know which block devices are currently known to your linux system. Well, there are multiple choices for getting this information. Try one of these one liners.

fdisk -l
Festplatte /dev/sdb: 1,4 TiB, 1500301910016 Bytes, 2930277168 Sektoren
Einheiten: Sektoren von 1 * 512 = 512 Bytes
Sektorgröße (logisch/physikalisch): 512 Bytes / 512 Bytes
E/A-Größe (minimal/optimal): 512 Bytes / 512 Bytes
Festplattenbezeichnungstyp: dos
Festplattenbezeichner: 0x00000000

Device     Boot      Start        End    Sectors   Size Id Type
/dev/sdb1               63     208844     208782   102M fd Linux raid autodetect
/dev/sdb2           208845    2184839    1975995 964,9M fd Linux raid autodetect
/dev/sdb3          2184840   21735944   19551105   9,3G fd Linux raid autodetect
/dev/sdb4         21735945 2930272064 2908536120   1,4T  5 Extended
/dev/sdb5         21736008  488408129  466672122 222,5G fd Linux raid autodetect
/dev/sdb6        488408193 2585581424 2097173232  1000G fd Linux raid autodetect
/dev/sdb7       2585583473 2930272064  344688592 164,4G fd Linux raid autodetect

Festplatte /dev/sdc: 1,4 TiB, 1500301910016 Bytes, 2930277168 Sektoren
Einheiten: Sektoren von 1 * 512 = 512 Bytes
Sektorgröße (logisch/physikalisch): 512 Bytes / 512 Bytes
E/A-Größe (minimal/optimal): 512 Bytes / 512 Bytes
Festplattenbezeichnungstyp: dos
Festplattenbezeichner: 0x830fb01e

Device     Boot      Start        End    Sectors   Size Id Type
/dev/sdc1               63     208844     208782   102M fd Linux raid autodetect
/dev/sdc2           208845    2184839    1975995 964,9M fd Linux raid autodetect
/dev/sdc3          2184840   21735944   19551105   9,3G fd Linux raid autodetect
/dev/sdc4         21735945 2930272064 2908536120   1,4T  5 Extended
/dev/sdc5         21736008  488408129  466672122 222,5G fd Linux raid autodetect
/dev/sdc6        488408193 2585581424 2097173232  1000G fd Linux raid autodetect
/dev/sdc7       2585583473 2930272064  344688592 164,4G fd Linux raid autodetect

[...]
cat /proc/partitions
major minor  #blocks  name

   8       16 1465138584 sdb
   8       17     104391 sdb1
   8       18     987997 sdb2
   8       19    9775552 sdb3
   8       20          1 sdb4
   8       21  233336061 sdb5
   8       22 1048586616 sdb6
   8       23  172344296 sdb7
   8       32 1465138584 sdc
   8       33     104391 sdc1
   8       34     987997 sdc2
   8       35    9775552 sdc3
   8       36          1 sdc4
   8       37  233336061 sdc5
   8       38 1048586616 sdc6
   8       39  172344296 sdc7

[...]
lsblk
NAME               MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
fd0                  2:0    1     4K  0 disk
sda                  8:0    0   1,4T  0 disk
├─sda1               8:1    0   102M  0 part
│ └─md126            9:126  0 101,9M  0 raid1 /boot
├─sda2               8:2    0 964,9M  0 part
│ └─md2              9:2    0   2,8G  0 raid5 [SWAP]
├─sda3               8:3    0   9,3G  0 part
│ └─md125            9:125  0    28G  0 raid5 /
├─sda4               8:4    0     1K  0 part
├─sda5               8:5    0 222,5G  0 part
│ └─md127            9:127  0 667,6G  0 raid5
│   ├─vg-usr       253:0    0     8G  0 lvm
│   ├─vg-portage   253:1    0     2G  0 lvm   /usr/portage
│   ├─vg-distfiles 253:2    0     5G  0 lvm   /usr/portage/distfiles
│   ├─vg-home      253:3    0 438,7G  0 lvm   /home
│   ├─vg-opt       253:4    0     4G  0 lvm   /opt
│   ├─vg-var       253:5    0    27G  0 lvm   /var
│   ├─vg-vartmp    253:6    0     6G  0 lvm   /var/tmp
│   ├─vg-tmp       253:7    0     3G  0 lvm   /tmp
│   ├─vg-vm        253:8    0    85G  0 lvm   /usr/vm
│   └─vg-varlib    253:14   0    50G  0 lvm   /var/lib

[...]
Tagged with: , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

*