Re: [gentoo-user] Udev rules for identical hard drives

2012-08-03 Thread Dale
Alex Schuster wrote: Dale writes: Alex Schuster wrote: Mark Knecht writes: Check out the very nice 'lsdrv' script by Phil Turmel. Run it, save a copy of the output for bad times. https://github.com/pturmel/lsdrv That doesn't work here, and I do not understand why. In line 305 it tries

Re: [gentoo-user] Udev rules for identical hard drives

2012-08-03 Thread Paul Hartman
On Fri, Aug 3, 2012 at 1:40 AM, Dale rdalek1...@gmail.com wrote: Nope. I didn't notice he was trying to use 3.2 until after I hit send. Bad thing about emails, you can't delete them after they are sent. :/ In the good old days you could compose offline, and not send them until the next time

Re: [gentoo-user] Udev rules for identical hard drives

2012-08-03 Thread Dale
Paul Hartman wrote: On Fri, Aug 3, 2012 at 1:40 AM, Dale rdalek1...@gmail.com wrote: Nope. I didn't notice he was trying to use 3.2 until after I hit send. Bad thing about emails, you can't delete them after they are sent. :/ In the good old days you could compose offline, and not send them

Re: [gentoo-user] Udev rules for identical hard drives

2012-08-02 Thread Alex Schuster
Canek Peláez Valdés writes: On Wed, Aug 1, 2012 at 7:42 PM, Alex Schuster wo...@wonkology.org wrote: Canek Peláez Valdés writes: [ snip ] Oh, and I forgot; doesn't the links in /dev/disk/by-id, /dev/disk/by-label, /dev/disk/by-uuid do what you want to? Those seem to list partitions

Re: [gentoo-user] Udev rules for identical hard drives

2012-08-02 Thread Alex Schuster
Alex Schuster writes: Canek Peláez Valdés writes: $ ll /dev/disk/by-id ... ata-SAMSUNG_HD160JJ_S08HJ10YC13279 - ../../sda ... That's a whole drive right there. Wow, now I feel really stupid :) You are so right, they are there, and I don't why I overlooked them... too many

Re: [gentoo-user] Udev rules for identical hard drives

2012-08-02 Thread Mark Knecht
On Thu, Aug 2, 2012 at 3:38 AM, Alex Schuster wo...@wonkology.org wrote: Alex Schuster writes: Canek Peláez Valdés writes: $ ll /dev/disk/by-id ... ata-SAMSUNG_HD160JJ_S08HJ10YC13279 - ../../sda ... That's a whole drive right there. Wow, now I feel really stupid :) You are so

Re: [gentoo-user] Udev rules for identical hard drives

2012-08-02 Thread Alex Schuster
Mark Knecht writes: Check out the very nice 'lsdrv' script by Phil Turmel. Run it, save a copy of the output for bad times. https://github.com/pturmel/lsdrv That doesn't work here, and I do not understand why. In line 305 it tries and fails to create /dev/block, which is already existing.

Re: [gentoo-user] Udev rules for identical hard drives

2012-08-02 Thread Dale
Alex Schuster wrote: Mark Knecht writes: Check out the very nice 'lsdrv' script by Phil Turmel. Run it, save a copy of the output for bad times. https://github.com/pturmel/lsdrv That doesn't work here, and I do not understand why. In line 305 it tries and fails to create /dev/block, which

Re: [gentoo-user] Udev rules for identical hard drives

2012-08-02 Thread Mark Knecht
On Thu, Aug 2, 2012 at 8:02 AM, Alex Schuster wo...@wonkology.org wrote: Mark Knecht writes: Check out the very nice 'lsdrv' script by Phil Turmel. Run it, save a copy of the output for bad times. https://github.com/pturmel/lsdrv That doesn't work here, and I do not understand why. In line

Re: [gentoo-user] Udev rules for identical hard drives

2012-08-02 Thread Walter Dnes
On Thu, Aug 02, 2012 at 01:34:04AM +0200, Alex Schuster wrote So I made some udev rules like this, and my drives are called /dev/hd1, hd2 and hd3: SUBSYSTEMS==scsi, KERNEL==sd?, ATTRS{model}==SAMSUNG HD154UI, SYMLINK=hd1 This works fine, and this way I can address them in scripts, smartd

Re: [gentoo-user] Udev rules for identical hard drives

2012-08-02 Thread Peter Humphrey
On Thursday 02 August 2012 16:50:36 Mark Knecht wrote: Dunno about the python-3.2 thing. Are you set to use 3.2 by default? (How aggressive of you!) ;-) I'm set to use 2.7 as default which I think is the overall recommendation of dummies like me: I thought so too, so I was surprised to find a

Re: [gentoo-user] Udev rules for identical hard drives

2012-08-02 Thread Alex Schuster
Walter Dnes writes: You can get the ATTRS{serial} (i.e. serial number). See the printer example at http://www.reactivated.net/writing_udev_rules.html and adapt to your hard drive. Serial numbers should be unique, even amongst otherwise identical drives...

Re: [gentoo-user] Udev rules for identical hard drives

2012-08-02 Thread Mark Knecht
On Thu, Aug 2, 2012 at 10:43 AM, Peter Humphrey pe...@humphrey.ukfsn.org wrote: On Thursday 02 August 2012 16:50:36 Mark Knecht wrote: Dunno about the python-3.2 thing. Are you set to use 3.2 by default? (How aggressive of you!) ;-) I'm set to use 2.7 as default which I think is the overall

Re: [gentoo-user] Udev rules for identical hard drives

2012-08-02 Thread Alex Schuster
Dale writes: Alex Schuster wrote: Mark Knecht writes: Check out the very nice 'lsdrv' script by Phil Turmel. Run it, save a copy of the output for bad times. https://github.com/pturmel/lsdrv That doesn't work here, and I do not understand why. In line 305 it tries and fails to

Re: [gentoo-user] Udev rules for identical hard drives

2012-08-02 Thread Alex Schuster
Mark Knecht writes: On Thu, Aug 2, 2012 at 8:02 AM, Alex Schuster wo...@wonkology.org wrote: Mark Knecht writes: Check out the very nice 'lsdrv' script by Phil Turmel. Run it, save a copy of the output for bad times. https://github.com/pturmel/lsdrv That doesn't work here, and I

Re: [gentoo-user] Udev rules for identical hard drives

2012-08-02 Thread Neil Bothwick
On Thu, 2 Aug 2012 12:59:19 -0400, Walter Dnes wrote: You can get the ATTRS{serial} (i.e. serial number). Not all drives supply this. I have a pair of Seagate drives and a pair of WD drives. Neither drive is distinguishable from its twin with udev attributes. -- Neil Bothwick If nothing

Re: [gentoo-user] Udev rules for identical hard drives

2012-08-02 Thread Neil Bothwick
On Thu, 2 Aug 2012 19:43:50 +0200, Alex Schuster wrote: BTW, sys-fs/udev-187 does not have the 'udevinfo' command, it seems to be 'udevadm info' now. udevinfo disappeared a long time ago. I wrote a script called udevinfo to call mdadm info so that I didn't need thchage my setup, it is dated

[gentoo-user] Udev rules for identical hard drives

2012-08-01 Thread Alex Schuster
Hi there! I do not understand the numbering of my hard drives. There may be some inherent logic, but whenever I make some changes, like replacing drives, or changing BIOS settings, the order changes. Maybe it's even more random. So I made some udev rules like this, and my drives are called

Re: [gentoo-user] Udev rules for identical hard drives

2012-08-01 Thread Canek Peláez Valdés
On Wed, Aug 1, 2012 at 6:34 PM, Alex Schuster wo...@wonkology.org wrote: Hi there! I do not understand the numbering of my hard drives. There may be some inherent logic, but whenever I make some changes, like replacing drives, or changing BIOS settings, the order changes. Maybe it's even more

Re: [gentoo-user] Udev rules for identical hard drives

2012-08-01 Thread Canek Peláez Valdés
On Wed, Aug 1, 2012 at 6:59 PM, Canek Peláez Valdés can...@gmail.com wrote: On Wed, Aug 1, 2012 at 6:34 PM, Alex Schuster wo...@wonkology.org wrote: Hi there! I do not understand the numbering of my hard drives. There may be some inherent logic, but whenever I make some changes, like

Re: [gentoo-user] Udev rules for identical hard drives

2012-08-01 Thread Alex Schuster
Canek Peláez Valdés writes: On Wed, Aug 1, 2012 at 6:59 PM, Canek Peláez Valdés can...@gmail.com wrote: On Wed, Aug 1, 2012 at 6:34 PM, Alex Schuster wo...@wonkology.org wrote: [...] Could there be another way to distinguish the drives, like looking at the partition scheme or something?

Re: [gentoo-user] Udev rules for identical hard drives

2012-08-01 Thread Canek Peláez Valdés
On Wed, Aug 1, 2012 at 7:42 PM, Alex Schuster wo...@wonkology.org wrote: Canek Peláez Valdés writes: [ snip ] Oh, and I forgot; doesn't the links in /dev/disk/by-id, /dev/disk/by-label, /dev/disk/by-uuid do what you want to? Those seem to list partitions only, not whole drives. A label for a