Re: Storage device enumeration script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 26/05/2011 10:45, TorbjÃrn Skagestad wrote:
Hi,

Great tool, thanks for sharing.

I had to add some error handling to get it to work properly.
Currently it runs on Ubuntu 10.04, 10.10 and 11.04.

Added the check John Robinson asked for as well.

Attached patch for those interested.

Thanks, TorbjÃrn!

Getting there:

[root@beast lsdrv]# python2.6 lsdrv
PCI [pata_marvell] 03:00.0 IDE interface: Marvell Technology Group Ltd. 88SE6121 SATA II Controller (rev b2)
 ââscsi 0:0:0:0 HL-DT-ST DVD-RAM GH22NP20
    ââsr0: Empty/Unknown 1.00g
PCI [ahci] 00:1f.2 SATA controller: Intel Corporation 82801JI (ICH10 Family) SATA AHCI Controller
 ââscsi 2:0:0:0 ATA Hitachi HDS72101
 â  ââsda: Empty/Unknown 931.51g
Traceback (most recent call last):
  File "lsdrv", line 387, in <module>
    show_blocks(" %s " % branch[0], [phy.block])
  File "lsdrv", line 339, in show_blocks
show_blocks("%s %s " % (indent, branch[0]), [blockbyname[x] for x in subs])
KeyError: 'sda1'

Now, something's not getting picked up about sda. Looking at Mathias' "sweet" output, it's not coping with the (DOS) partition table. Another variation on my kernel's /sys or still to old a Python or ...?

Cheers,

John.
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux