• Re: [gentoo-user] Problem with detecting ZFS HDD

    From Grant Taylor@21:1/5 to gevisz on Thu Jan 30 22:10:01 2025
    On 1/30/25 10:55 AM, gevisz wrote:
    I should have used /dev/disk/by-id/ata-WDC_WD5000* notations instead!

    Unfortunately, I have not found the way to change these notations
    other than deleting the whole zpool and re-creating it anew with
    the notations /dev/disk/by-id/ata-WDC_WD5000*, which took quite
    a lot of time.

    I got around this years ago on an Ubuntu system by doing an export
    followed by a slightly special import:

    zpool export tank
    zpool import -d /dev/disk/by-id tank

    You can find more details and specifics in an article that I wrote about installing Ubuntu 16.04 on a ZFS root.

    Link - Ubuntu 16.04 (Xenial) ZFS native root install
    - https://dotfiles.tnetconsulting.net/articles/2016/0327/ubuntu-zfs-native-root.html



    --
    Grant. . . .

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Grant Taylor@21:1/5 to gevisz on Fri Jan 31 01:20:01 2025
    On 1/30/25 16:58, gevisz wrote:
    Thank you for your reply.

    You're welcome.

    I will look into the link but, as far as I understand,

    Feel free to ask questions, either here or directly to me if you feel
    it's not germane to Gentoo.

    it does not answer the question why one of my ZFS disks does not
    appear in /dev/disk/by-id/ directory when I boot my computer with
    additional disk connected to it.

    I only commented on the part that I quoted.

    Looking back at your original message, if the missing disk doesn't
    appear in dmesg (assuming that dmesg hasn't wrapped) then the system
    isn't seeing the drive for some reason. If the system isn't seeing the
    drive at all, there won't be a sym-link in /dev/disk/by-id etc.

    I can't speculate as to why the disk doesn't show up if the USB drive is attached.



    --
    Grant. . . .

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael@21:1/5 to All on Fri Jan 31 11:24:39 2025
    On Thursday 30 January 2025 16:55:00 Greenwich Mean Time gevisz wrote:
    [snip ...]

    After setting up one of them as a ZFS mirror, I immediately
    got the problem that if I boot my system with additional HDD
    connected to my computer, one of these ZFS mirror disks
    is not detected and the corresponding zpool appears to be degraded.

    I have realized that it was my fault to use /dev/sdb and /dev/sdc
    notations when setting up the ZFS mirror because with more disks
    at the boot time these notations may change.

    I should have used /dev/disk/by-id/ata-WDC_WD5000* notations instead!

    With ZFS you should probably have used the unique device ID obtained by running:

    lsblk -o name,wwn

    My ZFS experience is cursory to know it if makes a material difference, but according to the Gentoo wiki page this is what OpenZFS prefers:

    https://wiki.gentoo.org/wiki/ZFS#Preparing_disk


    Unfortunately, I have not found the way to change these notations
    other than deleting the whole zpool and re-creating it anew with
    the notations /dev/disk/by-id/ata-WDC_WD5000*, which took quite
    a lot of time.

    Presumably, the problem with detecting my ZFS mirror HDDs
    should have disappeared after that because now the disks were
    referred to by their ids but unfortunately it was not the case.

    When I boot my computer with an additional external HDD
    attached to the computer via USB, one of my ZFS mirror HDDs
    is not detected by the system and the corresponding zpool again
    appears to be degraded until I restart my computer in the usual
    setup, that is, without any additional HDD attached to it.

    I have looked into my /dev/disk/by-id/ directory and found out
    that this happens because one of these ZFS mirror HDDs
    does not appear in this directory at all!

    When USB drives are plugged in, or the system boots with a USB drive already plugged in, they may not be detected in the same order against other connected drives and their logical device name can change e.g. from /dev/sdb to /dev/ sdc.

    However, this will not stop a HDD from being detected. Its logical name may change, but the disk by-id and wwn will not.


    The situation remained the same even after swapping the
    undetected 500GB WD HDD with the one.

    So, I wonder if it is a fault of
    1) refurbished WD HDDs

    Run smartctl tests to see what they detect. Any error reported indicates a hardware problem.


    2) my almost 20 years old Ultra-Durable Gigabyte motherboard

    Try a different SATA port and cable from what you've been using so far to connect the second hard drive. Either may be faulty.


    3) the Linux system itself.

    Highly unlikely, but booting with a liveUSB will soon confirm this.
    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCAAdFiEEXqhvaVh2ERicA8Ceseqq9sKVZxkFAmecsvcACgkQseqq9sKV Zxl3DRAAhVA7YIT86tzoQbTfAcE7j94BH1Kc8I1kmmh1tupScfcv3Gzi8BTzCvXM DIgOwDfS7F668d+OChlELPl5qRXuL3SHT6tPG2/Ab2Ck8ATbw6JNf5PK9Bo0Mpjd uDvyTpHB3cvaC4YwvDYXcHYkMp4P0f/QOKlilw673jY3yEOvA9l2UMQdLAe9gCPQ Vdh6LaFzVFJs64HmH8s2+Yt00SWh+2X6zx4ELz7hdB8T0METNo8MaJgJbiWvtnQl ExO2vbu/eq9uPy/HTFcIvfMi9CdIDHir4dEBY5GZTv6TZ156hTGO6gpwAnJD5uXQ H3NVdkbfShP2hbTO907XteAu3uVJF1IKY9JUnBJ209Ml0aFyx4DXiarKe7bnBemu vtFvovPKlvhV//4UNs/sH/kHNXOCI1GjNu8h1B+GUk4LRZ/KUY6ihGqYkSdTMd8s 0aew0LisNpnATJZnHYW/LE0BHq/TmwPXTafPLj/UhI645EHv/OEYSjGe6DTlja7z w1Yfic2H44bKqhP2+dktG1kHr4dw1v8fLCyseSwvAE3oQAnwXvOP5vT+e5oGajVm a0tJpxRr8rhmzB8HdJnNVQjYbFa+HTmlvxVCKlxUtk9nkDQsK7xDfn5BWYKD3q/U lA+/EmsTbYijU+Mr8R89TMloOgNQI/W4vgMlTA3XDIKHJq53D3U=
    =Zp8x
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wols Lists@21:1/5 to gevisz on Sun Feb 16 18:00:02 2025
    On 01/02/2025 00:13, gevisz wrote:
    The problem is that after booting with an additional HDD,
    one of these ZFS HDDs does not report any of its disk id:
    nor wwn neighter in the form ata-WDC_WD5000*.

    The situation remained the same even after swapping the
    undetected 500GB WD HDD with the one.
    And now, this makes me think that the problem is indeed with the SATA port.

    I know I'm very late to the party but ...

    As linux boots, it will allocate an sd* address to all the drives it
    sees. So if you've got three drives, but only sda and sdb, then one of
    them hasn't been detected.

    Seeing as /dev/disk/by-id is only a symlink to /dev/sda, /dev/sdb etc,
    from what you say I suspect you won't see the relevant sdx entry in /dev
    That to me seems the obvious way to do things - linux assigns a "random"
    name to the device, so it can read the device, and then symlinks the
    device name to whatever random code got assigned initially.

    As to why, do you have a manual for your mobo? It's an unfortunate fact
    (and I don't know when it started) that a lot of SATA ports nowadays
    don't work a lot of the time. When I was looking for a mobo, there was a
    lot of "if you stick an NVMe in, it will disable SATA4" or whatever.
    Likewise, if you used an external graphics card, depending on what PCIe
    it was, it might disable certain SATA ports. Given that I wanted about
    six *working* sata ports, that was a pain in the proverbial!

    Basically, a lot of things nowadays run over the PCIe bus, and it's very
    common for (a) lanes to be shared between different devices, and (b)
    there's a pecking order - if multiple devices share a lane, only the
    highest up the pecking order will work.

    So of course, sods law probably says you can't even get a SATA expansion
    board, because that will require the hijacked lane and won't work ...

    Cheers,
    Wol

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael@21:1/5 to All on Mon Mar 3 09:55:25 2025
    On Sunday, 2 March 2025 21:58:15 Greenwich Mean Time gevisz wrote:
    вс, 16 февр. 2025 г. в 18:51, Wols Lists <antlists@youngman.org.uk>:
    On 01/02/2025 00:13, gevisz wrote:
    The problem is that after booting with an additional HDD,
    one of these ZFS HDDs does not report any of its disk id:
    nor wwn neighter in the form ata-WDC_WD5000*.

    The situation remained the same even after swapping the
    undetected 500GB WD HDD with the one.

    And now, this makes me think that the problem is indeed with the SATA port.

    I know I'm very late to the party but ...

    As linux boots, it will allocate an sd* address to all the drives it
    sees. So if you've got three drives, but only sda and sdb, then one of
    them hasn't been detected.

    Seeing as /dev/disk/by-id is only a symlink to /dev/sda, /dev/sdb etc,
    from what you say I suspect you won't see the relevant sdx entry in /dev That to me seems the obvious way to do things - linux assigns a "random" name to the device, so it can read the device, and then symlinks the
    device name to whatever random code got assigned initially.

    As to why, do you have a manual for your mobo? It's an unfortunate fact (and I don't know when it started) that a lot of SATA ports nowadays
    don't work a lot of the time. When I was looking for a mobo, there was a lot of "if you stick an NVMe in, it will disable SATA4" or whatever. Likewise, if you used an external graphics card, depending on what PCIe
    it was, it might disable certain SATA ports. Given that I wanted about
    six *working* sata ports, that was a pain in the proverbial!

    Basically, a lot of things nowadays run over the PCIe bus, and it's very common for (a) lanes to be shared between different devices, and (b) there's a pecking order - if multiple devices share a lane, only the highest up the pecking order will work.

    So of course, sods law probably says you can't even get a SATA expansion board, because that will require the hijacked lane and won't work ...

    With marketing names changing faster than the seasons it is not always easy to understand from a MoBo manual what's what. It may take some digging in old reviews and diagrams of the CPU architecture to bottom out what components are driven by the CPU, the Northbridge (NB) via the Front Side Bus (FSB), or the slower Southbridge (SB). Normally the PCIe bus or AGP would be hooked off the NB to attain a higher throughput to the CPU/RAM. IDE/ATA/SATA/PCI would be driven off the SB. As CPUs became faster the FSB to the MoBo chipset became a bottleneck, so components started being incorporated into the CPU.

    Thank you for your insight.

    Probably, after using my Gigabyte GA-MA790FXT-UD5P
    motherboard for almost 20 years, I indeed should read its manual. :)

    After all, "if nothing else helps, try to read the manual." :)

    Will do it in the nearest future, but I doubt that it says something
    about this issue.

    However, I think that you are right and the problem lies in the motherboard.

    It should hopefully hint as to where SATA ports are connected to on the MoBo. PCIe driven SATA via a SATA bus controller may be faster than some SB chip, if only marginally so.

    As already mentioned the PCIe bus may be sharing lanes between components which could cause drives to disappear, or lose their expected speed.


    By the way, for years, I have had another issue with it that confirms your point of view: if I start my computer with a Logitech USB video camera plugged in, I randomly do not have a sound out. By "randomly" I mean
    that sometimes the sound out may be present and sometimes not.

    I have tried everything and even started a thread about it here, but
    nothing helped.

    Finally, I used to start my computer without my USB video camera
    plugged in, and it guarantees the presence of an audio after booting.

    Only recently, in the age of pipewire and wireplumber, I noticed something similar. If I am playing a video on a browser and at the same time try to play another video on mpv, the mpv remains silent until I stop/close the browser. :-/


    Additional information: I have AMD/ATI RV740 PRO [Radeon HD 4770]
    video card plugged into PCIEX16_1 slot and (never used) "brackets",
    one of which is connected to F_AUDIO and the other is connected to a SATA port.

    The manual also says that my motherboard has 6 SATA ports working
    via South Bridge and 4 SATA ports working via another Gigabyte SATA chip.

    OK, the SB chipset is the conventional way to hook drives, while the 4 SATA ports driven off the PCIe via a SATA controller chip were provided to fulfil a user need for MOAR disks because ... MOAR data. Theoretically, the MoBo OEMs would have matched the PCIe Vs SB generations and throughput, but when every port is occupied I expect you would notice small throughput differences in benchmarks. However, this does not explain why a whole drive decides to go AWOL, *unless* the MoBo manual provides an explicit statement to this effect. For example, this MoBo claims to lose one SATA port when an M.2 connected drive is also operated in SATA mode:

    https://www.asus.com/support/faq/1044083/


    Maybe, I have to experiment with connecting my hard drives to SATA
    ports in different order...

    I'd start with the manual, Gigabyte's support pages and reviews/benchmarks, to bottom out what are the real-world limits of your board.

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCAAdFiEEXqhvaVh2ERicA8Ceseqq9sKVZxkFAmfFfI0ACgkQseqq9sKV ZxlHcA/9EYSTGRiUIJb5ceZYuca4MONvZuQC4X7q5utxKpentwmT7sIq6KqUxXYn ZsZRb4aYyczBH7N1++JiEJSHJCJMyk416/NDIEyOgCMgGj9dpYnR6yMCNTonb0GM lmyMxUxFNoMMrVaBK/jr7BB2UB7V+1CBRizkBsjbB/ExTlRcPmkeaPmugdjVZOaV gcRil6jipFXmJ+Gecf8IK0jYS3n5il8VRw9un+MPcttwQbtxGZ1Ch/UQNJnocKlo 4Ih+bwk2M0sILSciQX7hi2klTa/8kWdQIFa9+vsBkHW6aGno+yOLwU+eicuZJgD2 5tomepfe1S0ugDRqgwm7vrL9z4N8Fav0mEUmqkLKh8Ike1Ha53ivmwx+QOCC/OjP tB7HGKZDfrgRd74RaZBaqO2nVMCURCnnQvRgdJlA9sUC3jmYSTeSj/4gr4vMpz3V 2W4d+0/TFsQ5fNoaG6wPWtVmTC1TMAtKj8vqGdu4J4duwJaLXHL36kq2knv0S58i OKcbkhWRhiBZCsEpVhgxEg1SZ9KTQyMO9JX30u3IPwDtoVuG4raKtYXMNAWXL8u5 Rp7rAdVYvdR1gYfgiQ8e2yAmYSTVZ9WxjMxru21EXJKN6WB4ED2mlwHFPMQqQzU7 RsGo7cd7ZJQqmT+22nk+UUkOKTKCPeZ68GhQwuQuk9XxLCcLVUs=
    =rzly
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)