You are not logged in.
Pages: 1
Hi,
I'm brand new to Arch from Gentoo so please take it easy. I'm trying to set a fixed mount point for my external hard drive (with my music on it) using udev. (as it doesn't make sense to put an external drive in fstab)
I've copied across my old rule from my gentoo install on the same machine:
/etc/udev/rules.d/10-local.rules
SUBSYSTEMS=="usb", ATTRS{serial}=="2HBEQTN2 ", KERNEL=="sd?", SYMLINK+="external", GROUP="storage"
SUBSYSTEMS=="usb", ATTRS{serial}=="2HBEQTN2 ", KERNEL=="sd?1", SYMLINK+="external", GROUP="storage"
But for some reason it doesn't seem to have any effect on my new Arch system (I have rebooted so shouldn't be an issue with restarting udev).
Since udev makes me want to cry does anyone have any ideas?
Offline
Here's my output of $udevadm info -a -p $(udevadm info -q path -n /dev/sdb)
Udevadm info 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 '/devices/pci0000:00/0000:00:02.1/usb1/1-1/1-1:1.0/host6/target6:0:0/6:0:0:0/block/sdb':
KERNEL=="sdb"
SUBSYSTEM=="block"
DRIVER==""
ATTR{range}=="16"
ATTR{ext_range}=="256"
ATTR{removable}=="0"
ATTR{ro}=="0"
ATTR{size}=="976773168"
ATTR{alignment_offset}=="0"
ATTR{discard_alignment}=="0"
ATTR{capability}=="52"
ATTR{stat}==" 153 91 1362 25060 8 0 8 23 0 25030 25083"
ATTR{inflight}==" 0 0"
looking at parent device '/devices/pci0000:00/0000:00:02.1/usb1/1-1/1-1:1.0/host6/target6:0:0/6:0:0:0':
KERNELS=="6:0:0:0"
SUBSYSTEMS=="scsi"
DRIVERS=="sd"
ATTRS{device_blocked}=="0"
ATTRS{type}=="0"
ATTRS{scsi_level}=="3"
ATTRS{vendor}=="Maxtor "
ATTRS{model}=="Basics Desktop "
ATTRS{rev}=="0122"
ATTRS{state}=="running"
ATTRS{timeout}=="30"
ATTRS{iocounterbits}=="32"
ATTRS{iorequest_cnt}=="0xcd"
ATTRS{iodone_cnt}=="0xcc"
ATTRS{ioerr_cnt}=="0x1a"
ATTRS{modalias}=="scsi:t-0x00"
ATTRS{evt_media_change}=="0"
ATTRS{queue_depth}=="1"
ATTRS{queue_type}=="none"
ATTRS{max_sectors}=="240"
looking at parent device '/devices/pci0000:00/0000:00:02.1/usb1/1-1/1-1:1.0/host6/target6:0:0':
KERNELS=="target6:0:0"
SUBSYSTEMS=="scsi"
DRIVERS==""
looking at parent device '/devices/pci0000:00/0000:00:02.1/usb1/1-1/1-1:1.0/host6':
KERNELS=="host6"
SUBSYSTEMS=="scsi"
DRIVERS==""
looking at parent device '/devices/pci0000:00/0000:00:02.1/usb1/1-1/1-1:1.0':
KERNELS=="1-1:1.0"
SUBSYSTEMS=="usb"
DRIVERS=="usb-storage"
ATTRS{bInterfaceNumber}=="00"
ATTRS{bAlternateSetting}==" 0"
ATTRS{bNumEndpoints}=="02"
ATTRS{bInterfaceClass}=="08"
ATTRS{bInterfaceSubClass}=="06"
ATTRS{bInterfaceProtocol}=="50"
ATTRS{modalias}=="usb:v0D49p7410d0122dc00dsc00dp00ic08isc06ip50"
ATTRS{supports_autosuspend}=="0"
looking at parent device '/devices/pci0000:00/0000:00:02.1/usb1/1-1':
KERNELS=="1-1"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{configuration}==""
ATTRS{bNumInterfaces}==" 1"
ATTRS{bConfigurationValue}=="1"
ATTRS{bmAttributes}=="c0"
ATTRS{bMaxPower}==" 2mA"
ATTRS{urbnum}=="707"
ATTRS{idVendor}=="0d49"
ATTRS{idProduct}=="7410"
ATTRS{bcdDevice}=="0122"
ATTRS{bDeviceClass}=="00"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceProtocol}=="00"
ATTRS{bNumConfigurations}=="1"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{speed}=="480"
ATTRS{busnum}=="1"
ATTRS{devnum}=="2"
ATTRS{devpath}=="1"
ATTRS{version}==" 2.00"
ATTRS{maxchild}=="0"
ATTRS{quirks}=="0x0"
ATTRS{authorized}=="1"
ATTRS{manufacturer}=="Maxtor "
ATTRS{product}=="Basics Desktop "
ATTRS{serial}=="2HBEQTN2 "
looking at parent device '/devices/pci0000:00/0000:00:02.1/usb1':
KERNELS=="usb1"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{configuration}==""
ATTRS{bNumInterfaces}==" 1"
ATTRS{bConfigurationValue}=="1"
ATTRS{bmAttributes}=="e0"
ATTRS{bMaxPower}==" 0mA"
ATTRS{urbnum}=="46"
ATTRS{idVendor}=="1d6b"
ATTRS{idProduct}=="0002"
ATTRS{bcdDevice}=="0206"
ATTRS{bDeviceClass}=="09"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceProtocol}=="00"
ATTRS{bNumConfigurations}=="1"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{speed}=="480"
ATTRS{busnum}=="1"
ATTRS{devnum}=="1"
ATTRS{devpath}=="0"
ATTRS{version}==" 2.00"
ATTRS{maxchild}=="10"
ATTRS{quirks}=="0x0"
ATTRS{authorized}=="1"
ATTRS{manufacturer}=="Linux 2.6.33-ARCH ehci_hcd"
ATTRS{product}=="EHCI Host Controller"
ATTRS{serial}=="0000:00:02.1"
ATTRS{authorized_default}=="1"
looking at parent device '/devices/pci0000:00/0000:00:02.1':
KERNELS=="0000:00:02.1"
SUBSYSTEMS=="pci"
DRIVERS=="ehci_hcd"
ATTRS{vendor}=="0x10de"
ATTRS{device}=="0x005b"
ATTRS{subsystem_vendor}=="0x1043"
ATTRS{subsystem_device}=="0x815a"
ATTRS{class}=="0x0c0320"
ATTRS{irq}=="23"
ATTRS{local_cpus}=="ffff"
ATTRS{local_cpulist}=="0-15"
ATTRS{modalias}=="pci:v000010DEd0000005Bsv00001043sd0000815Abc0Csc03i20"
ATTRS{dma_mask_bits}=="32"
ATTRS{consistent_dma_mask_bits}=="31"
ATTRS{broken_parity_status}=="0"
ATTRS{msi_bus}==""
ATTRS{companion}==""
looking at parent device '/devices/pci0000:00':
KERNELS=="pci0000:00"
SUBSYSTEMS==""
DRIVERS==""
Offline
This might be a silly answer (I too am no expert) but does HAL not mount it automatically if you add it to your DAMEONS list ?
Offline
Yes and no.
On my Arch system by default media is mounted to /media/disk then /media/disk-1 and so on. So the position of my mount is dependent on the order my drives are mounted.
(also it's a combination of things that mount, hal, udev and in my case thunar-volman)
I'm trying to set my external drive to always mount to /media/external. On my gentoo system with the same hardware the 10-local.rules file (above) worked, but there must be something different with the Arch setup.
Offline
OK got it. I took a different approach to last time rather than setting the name through udev I used the rule for udev from the Arch wiki (http://wiki.archlinux.org/index.php/Ude … if_present) and set a label to the partition with e2label:
e2label /dev/sdb1 external
where sdb1 is my external partition.
Offline
Not an answer but after days spent searching and not finding how to automount usb disks, I've added my three external drives to fstab and mount them "manually" in rc.local (needed because usb is not ready by the time fstab is processed or something).
LABEL=Thermal80 /mnt/thermal ntfs-3g defaults,umask=007,uid=1000,gid=100,user,noauto,noatime 0 0
LABEL=LG500_Disc /mnt/lg500 ntfs-3g defaults,umask=007,uid=1000,gid=100,user,noauto,noatime 0 0
LABEL=Icy80 /mnt/icy ntfs-3g defaults,umask=007,uid=1000,gid=100,user,noauto,noatime 0 0
(I've just added the umask, uid and gid bits to make the trashcan work, so it's untested.)
[ -e /dev/disk/by-label/Icy80 ] && mount /dev/disk/by-label/Icy80
[ -e /dev/disk/by-label/Thermal80 ] && mount /dev/disk/by-label/Thermal80
[ -e /dev/disk/by-label/LG500_Disc ] && mount /dev/disk/by-label/LG500_Disc
Edit: oh well, you found your solution... everyone's happy I guess.
Last edited by stqn (2010-06-18 13:14:11)
Offline
Pages: 1