LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Maxtor Onetouch II: symlink points to wrong target (http://www.linuxquestions.org/questions/linux-hardware-18/maxtor-onetouch-ii-symlink-points-to-wrong-target-608612/)

Robert S 12-22-2007 04:58 PM

Maxtor Onetouch II: symlink points to wrong target
 
I have just upgraded my kernel from 2.6.22-gentoo-r8 to 2.6.23-gentoo-r3 (gentoo on amd64). I can no longer access my OneTouch II through /dev/. I have the following udev rule:
Quote:

BUS=="scsi", ATTRS{model}=="OneTouch II ", ATTRS{vendor}=="Maxtor ", NAME="%k", SYMLINK="onetouch"
This used to point to /dev/sda1, but now it points to /dev/sg0 thus:
Quote:

# ls -l /dev/onetouch
lrwxrwxrwx 1 root root 3 2007-12-23 08:49 /dev/onetouch -> sg0
Trying to mount this produces this error:
Quote:

# mount /dev/onetouch /mnt/onetouch
mount: /dev/onetouch is not a block device
A bit of further info:
Quote:

# udevinfo -a -p /block/sda/sda1|less

Udevinfo starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

looking at device '/block/sda/sda1':
KERNEL=="sda1"
SUBSYSTEM=="block"
DRIVER==""
and the attributes from one single parent device.

looking at device '/block/sda/sda1':
KERNEL=="sda1"
SUBSYSTEM=="block"
DRIVER==""
ATTR{stat}==" 3507 12891 0 0"
ATTR{size}=="586099332"
ATTR{start}=="63"
ATTR{dev}=="8:1"

looking at parent device '/block/sda':
KERNELS=="sda"
SUBSYSTEMS=="block"
DRIVERS==""
ATTRS{capability}=="12"
ATTRS{stat}==" 613 2903 12963 11156 0 0 0 0 0 10112 11156"
ATTRS{size}=="586114704"
ATTRS{removable}=="0"
ATTRS{range}=="16"
ATTRS{dev}=="8:0"

looking at parent device '/devices/pci0000:00/0000:00:0a.0/0000:01:09.3/fw-host0/0010b9210021905a/0010b9210021905a-1/host0/target0:0:1/0:0:1:0':
KERNELS=="0:0:1:0"
SUBSYSTEMS=="scsi"
DRIVERS=="sd"
ATTRS{modalias}=="scsi:t-0x00"
ATTRS{ioerr_cnt}=="0x2"
ATTRS{iodone_cnt}=="0x26e"
ATTRS{iorequest_cnt}=="0x26e"
ATTRS{iocounterbits}=="32"
ATTRS{timeout}=="60"
ATTRS{state}=="running"
ATTRS{rev}=="023g"
ATTRS{model}=="OneTouch II "
ATTRS{vendor}=="Maxtor "
ATTRS{scsi_level}=="5"
ATTRS{type}=="0"
ATTRS{queue_type}=="none"
ATTRS{queue_depth}=="8"
ATTRS{device_blocked}=="0"
ATTRS{ieee1394_id}=="0010b9210021905a:1:0"

looking at parent device '/devices/pci0000:00/0000:00:0a.0/0000:01:09.3/fw-host0/0010b9210021905a/0010b9210021905a-1/host0/target0:0:1':
KERNELS=="target0:0:1"
SUBSYSTEMS==""
DRIVERS==""
ATTRS{uevent}==""

looking at parent device '/devices/pci0000:00/0000:00:0a.0/0000:01:09.3/fw-host0/0010b9210021905a/0010b9210021905a-1/host0':
KERNELS=="host0"
SUBSYSTEMS==""
DRIVERS==""
ATTRS{uevent}==""

looking at parent device '/devices/pci0000:00/0000:00:0a.0/0000:01:09.3/fw-host0/0010b9210021905a/0010b9210021905a-1':
KERNELS=="0010b9210021905a-1"
SUBSYSTEMS=="ieee1394"
DRIVERS=="sbp2"
ATTRS{model_name_kv}=="OneTouch II"
ATTRS{model_id}=="0x007100"
ATTRS{version}=="0x010483"
ATTRS{specifier_id}=="0x00609e"
ATTRS{ignore_driver}=="0"
ATTRS{length}=="0"
ATTRS{address}=="0x0000fffff000045c"
Can anybody tell me what has gone wrong and how to fix this?

jailbait 12-23-2007 01:36 PM

First find out what address the device is on by trying to mount the possible devices until you hit the right one. For example:

mount /dev/sda1 /mnt/onetouch

Whenever you find the correct device name then change your onetouch symbolic link to the correct device:

rm /dev/onetouch
ln -s /dev/xxxx /dev/onetouch


------------------
Steve Stites

Robert S 12-23-2007 04:26 PM

The problem with this approach is (a) if another device is plugged in the OneTouch might get another name (eg. /dev/sdb) and (b) it needs to be done on each reboot (manually).

After a lot of fiddling around and help from http://www.reactivated.net/writing_u....html#udevinfo I've come up with
Quote:

# cat /etc/udev/rules.d/99-custom.rules
KERNEL=="sd*", SUBSYSTEM=="block", ATTR{dev}=="8:1", ATTR{size}=="586099332", ATTR{start}=="63", SYMLINK="onetouch"


All times are GMT -5. The time now is 08:52 AM.