5.5.21-1 HDD serial number replaces by ID_SERIAL_SHORT (JMicron)

  • Before i install this version i read carefully the warning for my Orico 8 bay (JMicron) and remove all my shares drive then i rebooted.


    After this, all the HDD serial number vanished and have been replaced by ID_SERIAL_SHORT.


    In the previous version 5.5.20-1 all the serial number was displayed correctly but now i lost the possibility to create a sleep plan for all my drives.



    This fix seem to replace all my references by label in /srv/ before:

    dev-disk-by-label-HDD256G...,


    and now all my drive in srv are listed:

    /dev-disk-by-uuid-335945c5-85fe-44c3-87ef-90.....


    this behavor are normal?


    Thanks !

  • votdev  KM0201 could you please pin this thread ?

    omv 6.9.6-2 (Shaitan) on RPi CM4/4GB with 64bit Kernel 6.1.21-v8+

    2x 6TB 3.5'' HDDs (CMR) formatted with ext4 via 2port PCIe SATA card with ASM1061R chipset providing hardware supported RAID1


    omv 6.9.3-1 (Shaitan) on RPi4/4GB with 32bit Kernel 5.10.63 and WittyPi 3 V2 RTC HAT

    2x 3TB 3.5'' HDDs (CMR) formatted with ext4 in Icy Box IB-RD3662-C31 / hardware supported RAID1

    For Read/Write performance of SMB shares hosted on this hardware see forum here

    • Offizieller Beitrag

    This will break the UDEV rules because they import environment variables in the latest version. IMO your initramfs is not up-to-date. So run omv-salt deploy run initramfs to apply the latest UDEV rules.

  • This will break the UDEV rules because they import environment variables in the latest version. IMO your initramfs is not up-to-date. So run omv-salt deploy run initramfs to apply the latest UDEV rules.

    Hi,


    I have similar problem. I changed serial_id and everything is working fine (or it looks like :) ). I reverted my changes and run omv-salt deploy run initramfs

    Currently I have the same problem with disks:


    udevadm info --query=all --name=/dev/sda

    P: /devices/platform/soc/soc:usb3-0/12000000.dwc3/xhci-hcd.3.auto/usb4/4-1/4-1.2/4-1.2:1.0/host0/target0:0:0/0:0:0:0/block/sda

    N: sda

    L: 0

    S: disk/by-id/usb-ODROID_ODROID_ID_SERIAL_SHORT=ZGY7AGS5-0:0

    S: disk/by-path/platform-xhci-hcd.3.auto-usb-0:1.2:1.0-scsi-0:0:0:0

    E: DEVPATH=/devices/platform/soc/soc:usb3-0/12000000.dwc3/xhci-hcd.3.auto/usb4/4-1/4-1.2/4-1.2:1.0/host0/target0:0:0/0:0:0:0/block/sda

    E: DEVNAME=/dev/sda

    E: DEVTYPE=disk

    E: MAJOR=8

    E: MINOR=0

    E: SUBSYSTEM=block

    E: USEC_INITIALIZED=11780145

    E: ID_VENDOR=ODROID

    E: ID_VENDOR_ENC=ODROID\x20\x20

    E: ID_VENDOR_ID=152d

    E: ID_MODEL=ODROID

    E: ID_MODEL_ENC=ODROID

    E: ID_MODEL_ID=0561

    E: ID_REVISION=0004

    E: ID_SERIAL=ODROID_ODROID_ID_SERIAL_SHORT=ZGY7AGS5-0:0

    E: ID_SERIAL_SHORT=ID_SERIAL_SHORT=ZGY7AGS5

    E: ID_TYPE=disk

    E: ID_INSTANCE=0:0

    E: ID_BUS=usb

    E: ID_USB_INTERFACES=:080650:080662:

    E: ID_USB_INTERFACE_NUM=00

    E: ID_USB_DRIVER=uas

    E: ID_PATH=platform-xhci-hcd.3.auto-usb-0:1.2:1.0-scsi-0:0:0:0

    E: ID_PATH_TAG=platform-xhci-hcd_3_auto-usb-0_1_2_1_0-scsi-0_0_0_0

    E: ID_FS_LABEL=nas

    E: ID_FS_LABEL_ENC=nas

    E: ID_FS_UUID=e31bc71a-aaf8-48bf-b929-ff0d05589ef6

    E: ID_FS_UUID_ENC=e31bc71a-aaf8-48bf-b929-ff0d05589ef6

    E: ID_FS_VERSION=1.0

    E: ID_FS_TYPE=ext4

    E: ID_FS_USAGE=filesystem

    E: DEVLINKS=/dev/disk/by-id/usb-ODROID_ODROID_ID_SERIAL_SHORT=ZGY7AGS5-0:0 /dev/disk/by-path/platform-xhci-hcd.3.auto-usb-0:1.2:1.0-scsi-0:0:0:0

    E: TAGS=:systemd:



    Do you know how to change udev roles to have proper ID_SERIAL and ID_SERIAL_SHORT?


    im working on odroid xu4 with cloudshell and 2x4tb disks (RAID1).

    Other problem is that I can't enable smart:

    Device '/dev/disk/by-id/usb-ODROID_ODROID_ID_SERIAL_SHORT' not found.

    • Offizieller Beitrag

    E: ID_SERIAL_SHORT=ID_SERIAL_SHORT=ZGY7AGS5

    According to this something failed seriously. To me it looks like the UDEV rule is not the correct one.


    The new one should look like

    Code
    IMPORT{program}="serial_id %N", \
    ENV{ID_SERIAL}="$env{ID_VENDOR}_$env{ID_MODEL}_$env{ID_SERIAL_SHORT}-$env{ID_INSTANCE}", \

    whereas the old one is

    Code
    PROGRAM="/usr/lib/udev/serial_id %N", \
    ENV{ID_SERIAL}="$env{ID_VENDOR}_$env{ID_MODEL}_$env{ID_SERIAL_SHORT}-$env{ID_INSTANCE}", \
    ENV{ID_SERIAL_SHORT}="%c", \

    The fine, but important difference is that ID_SERIAL_SHORT="%c" is used here in the past, whereas in the newer version the environment variable is imported as is. It seems you've a mixture of the latest and previous package installation because UDEV results for you in something like D_SERIAL_SHORT="ID_SERIAL_SHORT=foo".


    Could you please run the following commands and post the output?

    Code
    # ls -alh /etc/udev/rules.d/
    # udevadm test --action=add /sys/class/block/sda

    If there is a /etc/udev/rules.d/99-openmediavault-dev-disk-by-id.rules, have you modified that manually? Because in that case APT will not remove it regardless if the new openmediavault package has marked it to uninstall it.

  • I didn't change rules before updates.

    My rule looks like this:

    ENV{ID_VENDOR_ID}=="152d", \

    ENV{ID_MODEL_ID}=="0561", \

    PROGRAM="/usr/lib/udev/serial_id %N", \

    ENV{ID_SERIAL}="$env{ID_VENDOR}_$env{ID_MODEL}_$env{ID_SERIAL_SHORT}-$env{ID_INSTANCE}", \

    ENV{ID_SERIAL_SHORT}="%c", \

    ENV{ID_SERIAL}="$env{ID_VENDOR}_$env{ID_MODEL}_%c-$env{ID_INSTANCE}", \

    SYMLINK="disk/by-path/$env{ID_PATH}", \

    SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}"


    Currently it looks like:

    ENV{ID_VENDOR_ID}=="152d", \

    ENV{ID_MODEL_ID}=="0561", \

    IMPORT{program}="serial_id %N", \

    ENV{ID_SERIAL}="$env{ID_VENDOR}_$env{ID_MODEL}_$env{ID_SERIAL_SHORT}-$env{ID_INSTANCE}", \

    SYMLINK="disk/by-path/$env{ID_PATH}", \

    SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}"


    ls -alh /etc/udev/rules.d/

    total 68K

    drwxr-xr-x 2 root root 4.0K Jan 11 20:08 .

    drwxr-xr-x 4 root root 4.0K Jan 6 22:22 ..

    -rw-r--r-- 1 root root 70 Nov 19 13:30 10-wifi-disable-powermanagement.rules

    -rw-r--r-- 1 root root 3.4K Nov 19 13:30 50-usb-realtek-net.rules

    -rw-r--r-- 1 root root 15K Jan 6 21:56 61-openmediavault-dev-disk-by-id.rules

    -rw-r--r-- 1 root root 237 Jan 3 21:38 90-builtin-net-rps.rules

    -rw-r--r-- 1 root root 13K Jan 11 20:00 99-openmediavault-dev-disk-by-id.rules

    -rw-r--r-- 1 root root 1.4K Dec 29 20:45 99-openmediavault-md-raid.rules

    -rw-r--r-- 1 root root 1.7K Dec 29 20:45 99-openmediavault-nonrot.rules

    -rw-r--r-- 1 root root 1.4K Dec 29 20:45 99-openmediavault-scheduler.rules

    -rw-r--r-- 1 root root 70 Jan 3 21:38 hdmi.rules



    udevadm test --action=add /sys/class/block/sda


    Load module index

    Parsed configuration file /usr/lib/systemd/network/99-default.link

    Created link configuration context.

    Reading rules file: /usr/lib/udev/rules.d/01-md-raid-creating.rules

    Reading rules file: /etc/udev/rules.d/10-wifi-disable-powermanagement.rules

    Reading rules file: /usr/lib/udev/rules.d/50-firmware.rules

    Reading rules file: /usr/lib/udev/rules.d/50-udev-default.rules

    Reading rules file: /etc/udev/rules.d/50-usb-realtek-net.rules

    Reading rules file: /usr/lib/udev/rules.d/55-dm.rules

    Reading rules file: /usr/lib/udev/rules.d/56-lvm.rules

    Reading rules file: /usr/lib/udev/rules.d/60-block.rules

    Reading rules file: /usr/lib/udev/rules.d/60-bridge-network-interface.rules

    Reading rules file: /usr/lib/udev/rules.d/60-cdrom_id.rules

    Reading rules file: /usr/lib/udev/rules.d/60-crda.rules

    Reading rules file: /usr/lib/udev/rules.d/60-drm.rules

    Reading rules file: /usr/lib/udev/rules.d/60-evdev.rules

    Reading rules file: /usr/lib/udev/rules.d/60-i2c-tools.rules

    Reading rules file: /usr/lib/udev/rules.d/60-input-id.rules

    Reading rules file: /usr/lib/udev/rules.d/60-persistent-alsa.rules

    Reading rules file: /usr/lib/udev/rules.d/60-persistent-input.rules

    Reading rules file: /usr/lib/udev/rules.d/60-persistent-storage-dm.rules

    Reading rules file: /usr/lib/udev/rules.d/60-persistent-storage-tape.rules

    Reading rules file: /usr/lib/udev/rules.d/60-persistent-storage.rules

    Reading rules file: /usr/lib/udev/rules.d/60-persistent-v4l.rules

    Reading rules file: /usr/lib/udev/rules.d/60-sensor.rules

    Reading rules file: /usr/lib/udev/rules.d/60-serial.rules

    Reading rules file: /usr/lib/udev/rules.d/60-sunxi-tools.rules

    Reading rules file: /etc/udev/rules.d/61-openmediavault-dev-disk-by-id.rules

    Reading rules file: /usr/lib/udev/rules.d/63-md-raid-arrays.rules

    Reading rules file: /usr/lib/udev/rules.d/64-btrfs-dm.rules

    Reading rules file: /usr/lib/udev/rules.d/64-btrfs.rules

    Reading rules file: /usr/lib/udev/rules.d/64-md-raid-assembly.rules

    Reading rules file: /usr/lib/udev/rules.d/69-lvm-metad.rules

    Reading rules file: /usr/lib/udev/rules.d/69-md-clustered-confirm-device.rules

    Reading rules file: /usr/lib/udev/rules.d/70-joystick.rules

    Reading rules file: /usr/lib/udev/rules.d/70-mouse.rules

    Reading rules file: /usr/lib/udev/rules.d/70-pcspkr-beep.rules

    Reading rules file: /usr/lib/udev/rules.d/70-power-switch.rules

    Reading rules file: /usr/lib/udev/rules.d/70-touchpad.rules

    Reading rules file: /usr/lib/udev/rules.d/70-uaccess.rules

    Reading rules file: /usr/lib/udev/rules.d/71-axp-power-button.rules

    Reading rules file: /usr/lib/udev/rules.d/71-seat.rules

    Reading rules file: /usr/lib/udev/rules.d/73-seat-late.rules

    Reading rules file: /usr/lib/udev/rules.d/73-special-net-names.rules

    Reading rules file: /usr/lib/udev/rules.d/73-usb-net-by-mac.rules

    Reading rules file: /usr/lib/udev/rules.d/75-net-description.rules

    Reading rules file: /usr/lib/udev/rules.d/75-probe_mtd.rules

    Reading rules file: /usr/lib/udev/rules.d/78-sound-card.rules

    Reading rules file: /usr/lib/udev/rules.d/80-debian-compat.rules

    Reading rules file: /usr/lib/udev/rules.d/80-drivers.rules

    Reading rules file: /usr/lib/udev/rules.d/80-ifupdown.rules

    Reading rules file: /usr/lib/udev/rules.d/80-net-setup-link.rules

    Reading rules file: /usr/lib/udev/rules.d/85-hdparm.rules

    Reading rules file: /usr/lib/udev/rules.d/85-hwclock.rules

    Reading rules file: /usr/lib/udev/rules.d/85-regulatory.rules

    Reading rules file: /usr/lib/udev/rules.d/89-alsa-ucm.rules

    Reading rules file: /usr/lib/udev/rules.d/90-alsa-restore.rules

    Reading rules file: /etc/udev/rules.d/90-builtin-net-rps.rules

    Reading rules file: /usr/lib/udev/rules.d/90-console-setup.rules

    Reading rules file: /usr/lib/udev/rules.d/95-dm-notify.rules

    Reading rules file: /etc/udev/rules.d/99-openmediavault-dev-disk-by-id.rules

    Reading rules file: /etc/udev/rules.d/99-openmediavault-md-raid.rules

    Reading rules file: /etc/udev/rules.d/99-openmediavault-nonrot.rules

    Reading rules file: /etc/udev/rules.d/99-openmediavault-scheduler.rules

    Reading rules file: /usr/lib/udev/rules.d/99-systemd.rules

    Reading rules file: /etc/udev/rules.d/hdmi.rules

    Rules contain 49152 bytes tokens (4096 * 12 bytes), 17029 bytes strings

    2658 strings (35795 bytes), 1843 de-duplicated (19582 bytes), 816 trie nodes used

    Invalid inotify descriptor.

    Starting 'ata_id --export /dev/sda'

    Process 'ata_id --export /dev/sda' failed with exit code 2.

    Starting 'serial_id /dev/sda'

    'serial_id /dev/sda'(out) 'ID_SERIAL_SHORT=ZGY7AGS5'

    Process 'serial_id /dev/sda' succeeded.

    Starting 'serial_id /dev/sda'

    'serial_id /dev/sda'(out) 'ID_SERIAL_SHORT=ZGY7AGS5'

    Process 'serial_id /dev/sda' succeeded.

    DEVPATH=/devices/platform/soc/soc:usb3-0/12000000.dwc3/xhci-hcd.3.auto/usb4/4-1/4-1.2/4-1.2:1.0/host0/target0:0:0/0:0:0:0/block/sda

    DEVNAME=/dev/sda

    DEVTYPE=disk

    MAJOR=8

    MINOR=0

    ACTION=add

    SUBSYSTEM=block

    ID_VENDOR=ODROID

    ID_VENDOR_ENC=ODROID\x20\x20

    ID_VENDOR_ID=152d

    ID_MODEL=ODROID

    ID_MODEL_ENC=ODROID

    ID_MODEL_ID=0561

    ID_REVISION=0004

    ID_SERIAL=ODROID_ODROID_ZGY7AGS5-0:0

    ID_SERIAL_SHORT=ZGY7AGS5

    ID_TYPE=disk

    ID_INSTANCE=0:0

    ID_BUS=usb

    ID_USB_INTERFACES=:080650:080662:

    ID_USB_INTERFACE_NUM=00

    ID_USB_DRIVER=uas

    ID_PATH=platform-xhci-hcd.3.auto-usb-0:1.2:1.0-scsi-0:0:0:0

    ID_PATH_TAG=platform-xhci-hcd_3_auto-usb-0_1_2_1_0-scsi-0_0_0_0

    ID_FS_LABEL=nas

    ID_FS_LABEL_ENC=nas

    ID_FS_UUID=e31bc71a-aaf8-48bf-b929-ff0d05589ef6

    ID_FS_UUID_ENC=e31bc71a-aaf8-48bf-b929-ff0d05589ef6

    ID_FS_VERSION=1.0

    ID_FS_TYPE=ext4

    ID_FS_USAGE=filesystem

    .ID_FS_TYPE_NEW=ext4

    DEVLINKS=/dev/disk/by-path/platform-xhci-hcd.3.auto-usb-0:1.2:1.0-scsi-0:0:0:0 /dev/disk/by-id/usb-ODROID_ODROID_ZGY7AGS5-0:0

    TAGS=:systemd:

    USEC_INITIALIZED=5519277

    run: '/lib/udev/hdparm'

    Unload module index

    Unloaded link configuration context.


    Now it looks good.


    Btw. Im still have problem with smart - when I want to enable it via GUI it hangs and i can't access my disk. I need to reboot server. smartctl from command line works normally.

  • problem with smart - when I want to enable it via GUI it hangs and i can't access my disk. I need to reboot server. smartctl from command line works normally

    Please open a new thread for this unrelated issue

    omv 6.9.6-2 (Shaitan) on RPi CM4/4GB with 64bit Kernel 6.1.21-v8+

    2x 6TB 3.5'' HDDs (CMR) formatted with ext4 via 2port PCIe SATA card with ASM1061R chipset providing hardware supported RAID1


    omv 6.9.3-1 (Shaitan) on RPi4/4GB with 32bit Kernel 5.10.63 and WittyPi 3 V2 RTC HAT

    2x 3TB 3.5'' HDDs (CMR) formatted with ext4 in Icy Box IB-RD3662-C31 / hardware supported RAID1

    For Read/Write performance of SMB shares hosted on this hardware see forum here

  • I've the same problem as the OP. I've deleted the 99-openmediavault-dev-disk-by-id.rules file & executed the omv-salt command. Now I just see a generic serial number:



    Output from udevadm test --action=add /sys/class/block/sdc


    I have updated to 5.22.2-1 but does not make any difference.

    • Offizieller Beitrag

    Starting 'serial_id /dev/sdc'
    Process 'serial_id /dev/sdc' failed with exit code 1.

    The command to extract the real serial ID fails. Could you please run /usr/lib/udev/serial_id /dev/sdc and post the output? If it fails please run /sbin/hdparm -I /dev/sdc | grep 'Serial\ Number' | awk '{print $3}' | tr -d '[:blank:]'.

  • Unfortunately, a reboot does not help.

    Before version 5.5.21 I used these custom udev rules which did help to retrieve the real S/N. With the update it doesn't seem to work anymore.


    I have to add this disk is mounted under /srv/dev-disk-by-uuid-478829cb-d16a-4656-8278-40e4c2fa837c/ so not under this generic S/N.

    What is the implication for not having the real S/N? I use this disk as a backup disk, no shared folders or such are on it.


    kr

    wouter

  • Hi Everyone, i finally fix my problem of serial number.


    Like wouterve, my serial number was replace by a generic 0123456789ABCDEF for every drives and like he said in his previous post:


    Output from udevadm test --action=add /sys/class/block/sdc


    i receive the same result:


    Process 'serial_id /dev/sdc' failed with exit code 1.


    Then i search 'exit code 1' on the web, not really clear, but the problem seem related with the script not found:


    i decided to reinsert the relative path in the 61-openmediavault-dev-disk-by-id.rules (removed with the new version)


    and now my serial number show correctly :) and no more error 'failed with exit code 1'.


    Output from:

    udevadm test --action=add /sys/class/block/sda

    i dunno if my fix will be ok, but maybe votdev can look at this.


    thanks!

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!