25/2/2017

Harde schijf informatie (commandolijn)

Filed under: — cybrarian @ 5:29 pm

Informatie over harde schijven in het systeem: lsblk, df -h, fdisk -l, parted -l, hwinfo –disk en iotop

  • # root
  • > user

Huidig harde schijf gebruik:
iotop
Hier kan je zien “wat” de harde schijf bezighoudt..

Total DISK READ: 0.00 B/s Total DISK WRITE: 0.00 B/s
TID | PRIO | USER | DISK READ | DISK WRITE | SWAPIN | IO | COMMAND

bv:
sudo nice -20 sudo iotop -tbod10 > ~/iotop.log

Overzicht harde schijven en partities
lsblk (list block devices)
> lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 232.9G 0 disk
├─sda1 8:1 0 2G 0 part [SWAP]
├─sda2 8:2 0 40G 0 part /var/opt
└─sda3 8:3 0 190.9G 0 part /home
sdb 8:16 0 232.9G 0 disk
├─sdb1 8:17 0 2G 0 part
├─sdb2 8:18 0 20G 0 part /run/media/cybr/5dd4097d-7f54-4a5d-9320-f61c1e448695
└─sdb3 8:19 0 210.9G 0 part /run/media/cybr/4aac6a22-96ea-4b05-a5ea-6b416b119120
sr0 11:0 1 1024M 0 rom

Vrije ruimte op harde schijf:
df -h (disk free – human readable)
> df -h
Filesystem Size Used Avail Use% Mounted on
...
/dev/sda2 41G 11G 29G 27% /
/dev/sda3 191G 26G 165G 14% /home
tmpfs 596M 12K 596M 1% /run/user/1000
/dev/sdb2 20G 4.3G 15G 23% /run/media/cybr/5dd4097d-7f54-4a5d-9320-f61c1e448695
/dev/sdb3 208G 73M 207G 1% /run/media/cybr/4aac6a22-96ea-4b05-a5ea-6b416b119120
...

fdisk -l

# fdisk -l
Disk /dev/sdb: 232.9 GiB, 250059350016 bytes, 488397168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0004e1ab

Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 4208639 4206592 2G 82 Linux swap / Solaris
/dev/sdb2 * 4208640 46153727 41945088 20G 83 Linux
/dev/sdb3 46153728 488396799 442243072 210.9G 83 Linux

Disk /dev/sda: 232.9 GiB, 250059350016 bytes, 488397168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x659c54c9

Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 4208639 4206592 2G 82 Linux swap / Solaris
/dev/sda2 * 4208640 88100863 83892224 40G 83 Linux
/dev/sda3 88100864 488396799 400295936 190.9G 83 Linux

parted -l (partitie-informatie)
# parted -l
Model: ATA ST3250410AS (scsi)
Disk /dev/sda: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
1 1049kB 2155MB 2154MB primary linux-swap(v1) type=82
2 2155MB 45.1GB 43.0GB primary btrfs boot, type=83
3 45.1GB 250GB 205GB primary xfs type=83

Model: ATA GB0250EAFJF (scsi)
Disk /dev/sdb: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
1 1049kB 2155MB 2154MB primary linux-swap(v1) type=82
2 2155MB 23.6GB 21.5GB primary ext4 boot, type=83
3 23.6GB 250GB 226GB primary ext4 type=83

# hwinfo –disk (hardware info; heel gedetailleerd)

# hwinfo --disk
...
36: IDE 00.0: 10600 Disk
[Created at block.245]
Unique ID: 3OOL.q3BEqUJDrf1
Parent ID: w7Y8.ct4K0QfBjh7
SysFS ID: /class/block/sda
SysFS BusID: 0:0:0:0
SysFS Device Link: /devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0
Hardware Class: disk
Model: "ST3250410AS"
Device: "ST3250410AS"
Revision: "B"
Serial ID: "6RYB4D1G"
Driver: "ahci", "sd"
Driver Modules: "ahci", "sd_mod"
Device File: /dev/sda
Device Files: /dev/sda, /dev/disk/by-id/ata-ST3250410AS_6RYB4D1G, /dev/disk/by-id/scsi-0ATA_ST3250410AS_6RYB4D1G, /dev/disk/by-id/scsi-1ATA_ST3250410AS_6RYB4D1G, /dev/disk/by-id/scsi-SATA_ST3250410AS_6RYB4D1G, /dev/disk/by-path/pci-0000:00:1f.2-ata-1, /dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0
Device Number: block 8:0-8:15
Geometry (Logical): CHS 30401/255/63
Size: 488397168 sectors a 512 bytes
Capacity: 232 GB (250059350016 bytes)
Config Status: cfg=no, avail=yes, need=no, active=unknown
Attached to: #31 (SATA controller)

37: None 00.0: 11300 Partition
[Created at block.434]
Unique ID: bdUI.SE1wIdpsiiC
Parent ID: 3OOL.q3BEqUJDrf1
SysFS ID: /class/block/sda/sda1
Hardware Class: partition
Model: "Partition"
Device File: /dev/sda1
Device Files: /dev/sda1, /dev/disk/by-id/ata-ST3250410AS_6RYB4D1G-part1, /dev/disk/by-id/scsi-0ATA_ST3250410AS_6RYB4D1G-part1, /dev/disk/by-id/scsi-1ATA_ST3250410AS_6RYB4D1G-part1, /dev/disk/by-id/scsi-SATA_ST3250410AS_6RYB4D1G-part1, /dev/disk/by-path/pci-0000:00:1f.2-ata-1-part1, /dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0-part1, /dev/disk/by-uuid/9bd8446b-6bfe-4a72-bdb6-238061b7aa1c
Config Status: cfg=no, avail=yes, need=no, active=unknown
Attached to: #36 (Disk)

38: None 00.0: 11300 Partition
[Created at block.434]
Unique ID: 2pkM.SE1wIdpsiiC
Parent ID: 3OOL.q3BEqUJDrf1
SysFS ID: /class/block/sda/sda2
Hardware Class: partition
Model: "Partition"
Device File: /dev/sda2
Device Files: /dev/sda2, /dev/disk/by-id/ata-ST3250410AS_6RYB4D1G-part2, /dev/disk/by-id/scsi-0ATA_ST3250410AS_6RYB4D1G-part2, /dev/disk/by-id/scsi-1ATA_ST3250410AS_6RYB4D1G-part2, /dev/disk/by-id/scsi-SATA_ST3250410AS_6RYB4D1G-part2, /dev/disk/by-path/pci-0000:00:1f.2-ata-1-part2, /dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0-part2, /dev/disk/by-uuid/6fd2d23c-8475-473e-a10e-7eacd42470cb
Config Status: cfg=no, avail=yes, need=no, active=unknown
Attached to: #36 (Disk)

39: None 00.0: 11300 Partition
[Created at block.434]
Unique ID: W__Q.SE1wIdpsiiC
Parent ID: 3OOL.q3BEqUJDrf1
SysFS ID: /class/block/sda/sda3
Hardware Class: partition
Model: "Partition"
Device File: /dev/sda3
Device Files: /dev/sda3, /dev/disk/by-id/ata-ST3250410AS_6RYB4D1G-part3, /dev/disk/by-id/scsi-0ATA_ST3250410AS_6RYB4D1G-part3, /dev/disk/by-id/scsi-1ATA_ST3250410AS_6RYB4D1G-part3, /dev/disk/by-id/scsi-SATA_ST3250410AS_6RYB4D1G-part3, /dev/disk/by-path/pci-0000:00:1f.2-ata-1-part3, /dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0-part3, /dev/disk/by-uuid/1c3140a2-d368-43ba-82e9-ccd48792ba2e
Config Status: cfg=no, avail=yes, need=no, active=unknown
Attached to: #36 (Disk)

40: IDE 200.0: 10600 Disk
[Created at block.245]
Unique ID: WZeP.3ZQNaCCiFvC
Parent ID: w7Y8.ct4K0QfBjh7
SysFS ID: /class/block/sdb
SysFS BusID: 2:0:0:0
SysFS Device Link: /devices/pci0000:00/0000:00:1f.2/ata3/host2/target2:0:0/2:0:0:0
Hardware Class: disk
Model: "GB0250EAFJF"
Device: "GB0250EAFJF"
Revision: "HPGA"
Serial ID: "9SF1AQMN"
Driver: "ahci", "sd"
Driver Modules: "ahci", "sd_mod"
Device File: /dev/sdb
Device Files: /dev/sdb, /dev/disk/by-id/ata-GB0250EAFJF_9SF1AQMN, /dev/disk/by-id/scsi-0ATA_GB0250EAFJF_9SF1AQMN, /dev/disk/by-id/scsi-1ATA_GB0250EAFJF_9SF1AQMN, /dev/disk/by-id/scsi-35000c50019798fff, /dev/disk/by-id/scsi-SATA_GB0250EAFJF_9SF1AQMN, /dev/disk/by-id/wwn-0x5000c50019798fff, /dev/disk/by-path/pci-0000:00:1f.2-ata-3, /dev/disk/by-path/pci-0000:00:1f.2-scsi-2:0:0:0
Device Number: block 8:16-8:31
Geometry (Logical): CHS 30401/255/63
Size: 488397168 sectors a 512 bytes
Capacity: 232 GB (250059350016 bytes)
Config Status: cfg=new, avail=yes, need=no, active=unknown
Attached to: #31 (SATA controller)

Powered by WordPress