You are not logged in.
Hello,
I am trying to achieve similar results as the following posts:
udev rules... and Persistent storage..
but am having trouble. Basically regardless of what udev rule values I try, the disk does not mount to the correct point on boot. I initially started at this vbox help page and have also referenced this help page as well as arch wiki pages like this one (udev) and other misc articles.
Here is the output of
udevadm info -a -p $(udevadm info -q path -n /dev/sdc)
where /dev/sdc is the device I'm hoping to remap to /dev/my_hdd%n
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:17.0/ata5/host4/target4:0:0/4:0:0:0/block/sdc':
KERNEL=="sdc"
SUBSYSTEM=="block"
DRIVER==""
ATTR{alignment_offset}=="0"
ATTR{badblocks}==""
ATTR{capability}=="50"
ATTR{discard_alignment}=="0"
ATTR{events}==""
ATTR{events_async}==""
ATTR{events_poll_msecs}=="-1"
ATTR{ext_range}=="256"
ATTR{inflight}==" 0 0"
ATTR{range}=="16"
ATTR{removable}=="0"
ATTR{ro}=="0"
ATTR{size}=="976773168"
ATTR{stat}==" 196 0 12656 726 0 0 0 0 0 666 726"
looking at parent device '/devices/pci0000:00/0000:00:17.0/ata5/host4/target4:0:0/4:0:0:0':
KERNELS=="4:0:0:0"
SUBSYSTEMS=="scsi"
DRIVERS=="sd"
ATTRS{device_blocked}=="0"
ATTRS{device_busy}=="0"
ATTRS{dh_state}=="detached"
ATTRS{eh_timeout}=="10"
ATTRS{evt_capacity_change_reported}=="0"
ATTRS{evt_inquiry_change_reported}=="0"
ATTRS{evt_lun_change_reported}=="0"
ATTRS{evt_media_change}=="0"
ATTRS{evt_mode_parameter_change_reported}=="0"
ATTRS{evt_soft_threshold_reached}=="0"
ATTRS{inquiry}==""
ATTRS{iocounterbits}=="32"
ATTRS{iodone_cnt}=="0x10e"
ATTRS{ioerr_cnt}=="0xa"
ATTRS{iorequest_cnt}=="0x10e"
ATTRS{model}=="HGST HTS725050A7"
ATTRS{ncq_prio_enable}=="0"
ATTRS{queue_depth}=="31"
ATTRS{queue_ramp_up_period}=="120000"
ATTRS{queue_type}=="simple"
ATTRS{rev}=="A3E0"
ATTRS{scsi_level}=="6"
ATTRS{state}=="running"
ATTRS{timeout}=="30"
ATTRS{type}=="0"
ATTRS{unload_heads}=="0"
ATTRS{vendor}=="ATA "
ATTRS{vpd_pg80}==""
ATTRS{vpd_pg83}==""
ATTRS{wwid}=="t10.ATA HGST HTS725050A7E630 RC250A1T0YRLLT"
looking at parent device '/devices/pci0000:00/0000:00:17.0/ata5/host4/target4:0:0':
KERNELS=="target4:0:0"
SUBSYSTEMS=="scsi"
DRIVERS==""
looking at parent device '/devices/pci0000:00/0000:00:17.0/ata5/host4':
KERNELS=="host4"
SUBSYSTEMS=="scsi"
DRIVERS==""
looking at parent device '/devices/pci0000:00/0000:00:17.0/ata5':
KERNELS=="ata5"
SUBSYSTEMS==""
DRIVERS==""
looking at parent device '/devices/pci0000:00/0000:00:17.0':
KERNELS=="0000:00:17.0"
SUBSYSTEMS=="pci"
DRIVERS=="ahci"
ATTRS{broken_parity_status}=="0"
ATTRS{class}=="0x010601"
ATTRS{consistent_dma_mask_bits}=="64"
ATTRS{d3cold_allowed}=="1"
ATTRS{device}=="0xa282"
ATTRS{dma_mask_bits}=="64"
ATTRS{driver_override}=="(null)"
ATTRS{enable}=="1"
ATTRS{irq}=="122"
ATTRS{local_cpulist}=="0-3"
ATTRS{local_cpus}=="f"
ATTRS{msi_bus}=="1"
ATTRS{numa_node}=="-1"
ATTRS{revision}=="0x00"
ATTRS{subsystem_device}=="0xb005"
ATTRS{subsystem_vendor}=="0x1458"
ATTRS{vendor}=="0x8086"
looking at parent device '/devices/pci0000:00':
KERNELS=="pci0000:00"
SUBSYSTEMS==""
DRIVERS==""
My current custom udev rule resides at
/etc/udev/rules.d/10-user-defined.rules
KERNEL=="sd*", ATTRS{model}=="HGST HTS725050A7", SYMLINK+="my_hdd%n"
I have tried to load additional kernel modules and recompile my kernel, which are
sd_mod ahci xhci_pci
My boot log can be found here. My dmesg log can be found here.
If it helps at all,
udevadm --version
gives 232.
I'd normally keep searching around but I'm pretty lost on this one as I feel like I've exhausted other pages. Any help is much appreciated. Thanks!
Last edited by gobennyb (2017-05-16 13:41:12)
Offline
Offline
Check out /dev/disk/by-*/* it's all there and in fstab and elsewhere you can just stick to shorthand LABEL= UUID=
Offline
Thanks frostschutz, I think that does it for me. For anyone viewing this post in the future, I suppose /dev/disk/by-*/* should be able to replace /dev/my_hdd%n (as long as you don't have name clashes).
Offline
as long as you don't have name clashes
If you use UUID's then there wont be any name clashes.
Offline
gobennyb wrote:as long as you don't have name clashes
If you use UUID's then there wont be any name clashes.
I'm using this scheme to create raw disks and I thought I couldn't do that, but it turns out I can. Thanks!
Offline