linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Torbjørn Skagestad" <torbjorn@itpas.no>
To: Phil Turmel <philip@turmel.org>
Cc: John Robinson <john.robinson@anonymous.org.uk>,
	linux-raid@vger.kernel.org, Roman Mamedov <roman@rm.pp.ru>
Subject: Re: Storage device enumeration script
Date: Thu, 26 May 2011 14:05:05 +0200	[thread overview]
Message-ID: <1306411505.9437.130.camel@torbjorn> (raw)
In-Reply-To: <4DDE3E60.3010408@turmel.org>

[-- Attachment #1: Type: text/plain, Size: 2052 bytes --]

On Thu, 2011-05-26 at 07:49 -0400, Phil Turmel wrote:
> On 05/26/2011 05:59 AM, John Robinson wrote:
> > 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 ...?
> 
> Hmmm.  I'll set up another CentOS VM.  If I recall correctly, that kernel has the original block devices in folders named '.../block:sda1' instead of '.../block/sda1'.  I'll have to identify this in the initial sweep through sysfs.
> 

For CentOS 5.4 (2.6.18-128.1.14) it is /sys/block/sda/sda[1-9]


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

-- 
Torbjørn Skagestad
Idé Til Produkt AS
torborn@itpas.no

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2011-05-26 12:05 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-26  3:03 Storage device enumeration script Phil Turmel
2011-05-26  3:10 ` Mathias Burén
2011-05-26  3:21   ` Phil Turmel
2011-05-26  3:25     ` Mathias Burén
2011-05-26  5:25     ` Roman Mamedov
2011-05-26  8:24     ` CoolCold
2011-05-26 12:00       ` Phil Turmel
2011-05-31 18:51         ` Simon McNair
2011-05-31 21:21           ` CoolCold
2011-06-01  3:58             ` Phil Turmel
2011-05-26  6:14 ` Leslie Rhorer
2011-05-26  6:16   ` Mathias Burén
2011-05-26 11:41     ` Phil Turmel
2011-05-27  0:13       ` Leslie Rhorer
2011-05-27  0:16         ` Brad Campbell
2011-05-27  3:58           ` Roman Mamedov
2011-05-27 10:45             ` Gordon Henderson
2011-05-27 11:26               ` Torbjørn Skagestad
2011-05-27 11:42                 ` Gordon Henderson
2011-05-27 12:06             ` Phil Turmel
2011-05-26  8:11 ` CoolCold
2011-05-26  9:27 ` John Robinson
2011-05-26  9:45 ` Torbjørn Skagestad
2011-05-26  9:59   ` John Robinson
2011-05-26 11:49     ` Phil Turmel
2011-05-26 12:05       ` Torbjørn Skagestad [this message]
2011-05-27  9:15     ` John Robinson
2011-05-27  9:44       ` John Robinson
2011-05-27 11:23         ` Phil Turmel
2011-06-01  3:43           ` Phil Turmel
2011-05-26 11:39   ` Phil Turmel
2011-05-26 11:52     ` Torbjørn Skagestad
2011-05-26 17:46     ` Phil Turmel
2011-05-26 17:51       ` Mathias Burén
2011-05-26 17:54       ` Roman Mamedov
2011-05-26 18:02         ` Phil Turmel
2011-05-26 18:12           ` Roman Mamedov
2011-05-26 18:22             ` Phil Turmel
2011-05-26 18:42               ` Torbjørn Skagestad
2011-05-26 18:58                 ` CoolCold
2011-05-26 19:16                   ` Phil Turmel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1306411505.9437.130.camel@torbjorn \
    --to=torbjorn@itpas.no \
    --cc=john.robinson@anonymous.org.uk \
    --cc=linux-raid@vger.kernel.org \
    --cc=philip@turmel.org \
    --cc=roman@rm.pp.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).