Soluzione 1:
sudo lshw -class disk
ti dà tutto tranne il punto di montaggio
*-cdrom description: CD-R/CD-RW writer product: 52MAXX 3252AJ vendor: Memorex physical id: 0 bus info: [email protected]:0.0.0 logical name: /dev/cdrom logical name: /dev/cdrw logical name: /dev/scd0 logical name: /dev/sr0 version: QWS3 capabilities: removable audio cd-r cd-rw configuration: ansiversion=5 status=nodisc *-disk:0 description: SCSI Disk product: ZIP 100 vendor: IOMEGA physical id: 0.1.0 bus info: [email protected]:0.1.0 logical name: /dev/sda version: 12.A capabilities: removable configuration: ansiversion=5 *-medium physical id: 0 logical name: /dev/sda *-disk:1 description: ATA Disk product: WDC WD800AB-00CB vendor: Western Digital physical id: 1 bus info: [email protected]:0.0.0 logical name: /dev/sdb version: 04.0 serial: WD-WCAA52477019 size: 74GiB (80GB) capabilities: partitioned partitioned:dos configuration: ansiversion=5 signature=90909090
sudo lshw -class disk -html
Soluzione 2:
fdisk -l
Soluzione 3:
Un'alternativa a lshw:
hwinfo --disk
Ha anche l'opzione '--short', se sei interessato solo a /dev e al nome del modello e non a tutti i dettagli.
hal9k:~ # hwinfo --disk --short
disk:
/dev/sda Hitachi HDT72502
/dev/sdb Generic USB SD Reader
/dev/sdc Generic USB CF Reader
/dev/sdd Generic USB SM Reader
/dev/sde Generic USB MS Reader
La versione lunga fornisce più dettagli di lshw:
hal9k:~ # hwinfo --disk
16: IDE 200.0: 10600 Disk
[Created at block.243]
UDI: /org/freedesktop/Hal/devices/storage_serial_SATA_Hitachi_HDT7250_VFL104R62EUUTX
Unique ID: 3OOL.JSHCimqnHw6
Parent ID: CvwD.epf1vnVqQVC
SysFS ID: /class/block/sda
SysFS BusID: 2:0:0:0
SysFS Device Link: /devices/pci0000:00/0000:00:05.0/host2/target2:0:0/2:0:0:0
Hardware Class: disk
Model: "Hitachi HDT72502"
Vendor: "Hitachi"
Device: "HDT72502"
Revision: "V5DO"
Serial ID: "VFL104R62EUUTX"
Driver: "sata_sis", "sd"
Driver Modules: "sata_sis"
Device File: /dev/sda
Device Files: /dev/sda, /dev/disk/by-id/scsi-SATA_Hitachi_HDT7250_VFL104R62EUUTX, /dev/disk/by-id/ata-Hitachi_HDT725025VLA380_VFL104R62EUUTX, /dev/disk/by-path/pci-0000:00:05.0-scsi-0:0:0:0, /dev/disk/by-id/edd-int13_dev80
Device Number: block 8:0-8:15
BIOS id: 0x80
Geometry (Logical): CHS 30401/255/63
Size: 488397168 sectors a 512 bytes
Geometry (BIOS EDD): CHS 484521/16/63
Size (BIOS EDD): 488397168 sectors
Geometry (BIOS Legacy): CHS 1023/255/63
Config Status: cfg=no, avail=yes, need=no, active=unknown
Attached to: #9 (IDE interface)
[...]
MODIFICA:
Per quanto riguarda la disponibilità dei pacchetti. Sto usando OpenSUSE 11.1. hwinfo si trova nel repository standard, mentre lshw è disponibile solo da quello non ufficiale.
Soluzione 4:
Quando corro:
# lsblk
restituisce l'albero della partizione del disco con i punti di montaggio (per quelle partizioni che hanno):
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 278.9G 0 disk
+-sda1 8:1 0 500M 0 part /boot
+-sda2 8:2 0 278.4G 0 part
+-vg_devlinux02-lv_root (dm-0) 252:0 0 50G 0 lvm /
+-vg_devlinux02-lv_swap (dm-1) 252:1 0 32G 0 lvm [SWAP]
sdb 8:16 0 14.6T 0 disk
+-sdb1 8:17 0 14.6T 0 part
+-vg_devlinux02-lv_home (dm-2) 252:2 0 12.8T 0 lvm /home
sr0 11:0 1 1024M 0 rom
sdc 8:32 0 2.7T 0 disk
+-sdc1 8:33 0 128M 0 part
+-sdc2 8:34 0 2.7T 0 part
sdd 8:48 0 2.7T 0 disk
+-sdd1 8:49 0 2.7T 0 part
sde 8:64 0 2.7T 0 disk
+-sde1 8:65 0 2.7T 0 part
sdf 8:80 0 2.7T 0 disk
+-sdf1 8:81 0 128M 0 part
+-sdf2 8:82 0 2.7T 0 part
Soluzione 5:
/proc/diskstats avrà statistiche su tutte le tue unità esistenti, indipendentemente dal fatto che abbiano o meno partizioni.