Localiza IDs de dispositivos scsi no Linux?

2

Como posso listar IDs de dispositivos scsi no Linux?

    
por LanceBaynes 17.06.2011 / 12:14

3 respostas

3

cat /proc/scsi/scsi
    
por 17.06.2011 / 13:01
5

Eu não tenho / proc / scsi / scsi no meu sistema com o kernel 2.6.39.1. Eu usaria o comando 'lsscsi':

~> lsscsi -v
[0:0:0:0]    disk    ATA      ST3500418AS      CC38  /dev/sda
  dir: /sys/bus/scsi/devices/0:0:0:0  [/sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0]
[1:0:0:0]    disk    ATA      WDC WD2500KS-00M 02.0  /dev/sdb
  dir: /sys/bus/scsi/devices/1:0:0:0  [/sys/devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0]
    
por 17.06.2011 / 15:46
2

Você pode usar os links em /dev/disk/by-id :

[root@krxl02cn05 by-id]# pwd
/dev/disk/by-id

[root@krxl02cn05 by-id]# ls -rtl
total 0
lrwxrwxrwx 1 root root  9 Feb 12 01:40 scsi-3600605b005d8655019aa31faf0812bae -> ../../sda
lrwxrwxrwx 1 root root 10 Feb 12 01:40 scsi-3600605b005d8655019aa31faf0812bae-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Feb 12 01:40 scsi-3600605b005d8655019aa31faf0812bae-part1 -> ../../sda1
lrwxrwxrwx 1 root root  9 Feb 12 01:50 scsi-3600144f09a214698000054db88550008 -> ../../sdd
lrwxrwxrwx 1 root root  9 Feb 12 01:50 scsi-3600144f09a214698000054db88460007 -> ../../sdc
lrwxrwxrwx 1 root root  9 Feb 12 01:50 scsi-3600144f09a214698000054db88260006 -> ../../sdb
lrwxrwxrwx 1 root root 10 Feb 12 01:54 scsi-3600144f09a214698000054db88260006-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 15 Feb 12 04:56 scsi-3600144f09a214698000054db88460007-part1 -> ../../asm-disk1
lrwxrwxrwx 1 root root 15 Feb 12 04:59 scsi-3600144f09a214698000054db88550008-part1 -> ../../asm-disk2

Assim, o ID scsi de /dev/sdc é 3600144f09a214698000054db88460007

    
por 11.02.2015 / 21:00

Tags