Re: udev: same serial on different disks

2010-03-17 Thread Camaleón
On Wed, 17 Mar 2010 21:15:52 +0100, Ervin Hegedüs wrote: > A user disconnect all disks, but udev didn't remove all symlinks...: > > ls -la /dev/disk/by-id/ | grep sdb > lrwxrwxrwx 1 root root 9 2010-03-12 21:40 > usb-SAMSUNG_HD642JJ_31AF4D71B000 -> ../../sdb lrwxrwxrwx 1 root root 10 > 2010-03

Re: udev: same serial on different disks

2010-03-17 Thread Ervin Hegedüs
Hello, >> But I don't know how will it works, 'cause now all disks have one >> partition, but partitions are encrypted - can I create a label on >> existing crypted partition? > > I've never tested before, but I'd say yes. > >> And can system (or udev) identify that label? > > I see not good reaso

Re: udev: same serial on different disks

2010-03-17 Thread Camaleón
On Wed, 17 Mar 2010 16:34:47 +0100, Ervin Hegedüs wrote: >> Yes. This can be achieved with "$env{ID_FS_LABEL}" variable used by >> "udev" (I've had to search for this :-P): >> >> http://wiki.archlinux.org/index.php/Udev >> >> That way you can forget about the serial number of the disks being >> de

Re: udev: same serial on different disks

2010-03-17 Thread Ervin Hegedüs
hello, > Yes. This can be achieved with "$env{ID_FS_LABEL}" variable used by > "udev" (I've had to search for this :-P): > > http://wiki.archlinux.org/index.php/Udev > > That way you can forget about the serial number of the disks being > detected the same as the devices/partitions will be identif

Re: udev: same serial on different disks

2010-03-17 Thread Camaleón
On Wed, 17 Mar 2010 15:55:35 +0100, Ervin Hegedüs wrote: > thanks, sorry I think we don't understand each other... I know how can I > determine labels, I would like to make some elegant way for user > plug USB disk, and udev catch that event, send an email for me which > contains serial > part of

Re: udev: same serial on different disks

2010-03-17 Thread Ervin Hegedüs
Hello, >> hmm... how can I "catch" which is the label of the attached disk? > > > "ls -l /dev/disk/by-label" will tell you if there is any current label on > the filesystems. Look: > > s...@stt008:~$ ls -l /dev/disk/by-label > total 0 > lrwxrwxrwx 1 root root 10 mar 17 07:50 ALFA -> ../../sda2 > l

Re: udev: same serial on different disks

2010-03-17 Thread Camaleón
On Wed, 17 Mar 2010 13:58:03 +0100, Ervin Hegedüs wrote: >>> I would like to use two rules to identify disks when user attach one >>> of them, but system doesn't sense which disk has attached. >> >> Give filesystems a "label" and use that to manage them. As they are >> external disks for backup it

Re: udev: same serial on different disks

2010-03-17 Thread Ervin Hegedüs
Hello, > "Etch" is not longer supported. Maybe upgrading to the latest stable > should be desiderable :-? I know, but this is what we have, currently it's not option. >> System has two USB SATA-II disks for backup. Since a few weeks the >> system can't make different between disks, all disks has

Re: udev: same serial on different disks

2010-03-17 Thread Camaleón
On Tue, 16 Mar 2010 22:27:56 +0100, Ervin Hegedüs wrote: > there is a Debian Etch with kernel 2.6.24-etchnhalf.1-686, and udev > 0.105. "Etch" is not longer supported. Maybe upgrading to the latest stable should be desiderable :-? > System has two USB SATA-II disks for backup. Since a few wee