• Re: [gentoo-user] auto-mounting external usb disk problem

    From Michael@21:1/5 to All on Wed Jul 31 15:48:57 2024
    On Wednesday, 31 July 2024 10:36:20 BST Jacques Montier wrote:
    Hello all,

    For a few days, my two usb external disks do not automatically mount on /run/media/<user>

    Have you changed your PC, USB port/hub, kernel or your udisks version, before you noticed this?

    If you observed this on a laptop, does it happen when mains power is on?


    Those disks are successfully detected.
    - dmesg :
    20.711135] usb 10-2: New USB device found, idVendor=1058,
    idProduct=2621, bcdDevice=10.34
    [ 20.711144] usb 10-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [ 20.711147] usb 10-2: Product: Elements 2621
    [ 20.711150] usb 10-2: Manufacturer: Western Digital
    [ 20.711152] usb 10-2: SerialNumber: 575837324139315041324831
    [ 20.712935] usb-storage 10-2:1.0: USB Mass Storage device detected
    [ 20.713081] scsi host14: usb-storage 10-2:1.0
    [ 21.740964] scsi 14:0:0:0: Direct-Access WD Elements 2621
    1034 PQ: 0 ANSI: 6
    [ 21.741163] sd 14:0:0:0: Attached scsi generic sg6 type 0
    [ 21.743671] sd 14:0:0:0: [sde] Spinning up disk...
    [ 22.764230] ....ready
    [ 25.936769] sd 14:0:0:0: [sde] 3906963456 512-byte logical blocks: (2.00 TB/1.82 TiB)
    [ 25.937331] sd 14:0:0:0: [sde] Write Protect is off
    [ 25.937337] sd 14:0:0:0: [sde] Mode Sense: 47 00 10 08
    [ 25.937831] sd 14:0:0:0: [sde] No Caching mode page found
    [ 25.937836] sd 14:0:0:0: [sde] Assuming drive cache: write through
    [ 25.939868] sde: sde1

    - Some errors by journalctl (attached file)

    juil. 31 11:21:00 GentooLinux udisksd[1178]: Error probing device: Error sending ATA command IDENTIFY DEVICE to '/dev/sde': Unexpected>
    0000: f0 00 01 00 00 00 00 0a
    00 00 00 00 00 1d 00 00 ................
    0010: 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 ................
    (g-io-error-quark, 0)

    - I can manually mount them without any issue.

    - USB sticks successfully mount.

    - No problem with Linux Mint OS 23.1

    Any idea ?

    Thanks in advance,

    Cheers,

    --
    Jacques

    It often happens external USB drives need enough power to start up fully, before their onboard controller responds to probes from udisksd. If something (from PSU, to battery power, to kernel/desktop power management options) has changed, to the point where the power on the USB port becomes marginal, then such symptoms are possible.

    Things you could try:

    1. Try a different USB port, ideally USB 3.0 or later version e.g. USB 3.2 Gen2, which can provide more power.

    2. Use a powered USB Hub between the PC and the drive, or a Y-shaped USB cable to feed the drive from two ports.

    3. If on a laptop, use mains power (esp. in the summer when the cooling fan
    may be demanding more from the battery).

    4. Remove other consumables from USB ports sharing the same bus.

    5. Do not set your desktop to auto-mount USBs when you plug in, but only when you manually click on it in your GUI.


    Anecdotal observation: I have a WD Elements drive which I connect through an external powered hub on a USB 2.0 port on the PC. Even though the hub is powered, I have to power it up first, wait a few seconds for the drive to come up to speed (the LED flashing slows down), before I boot the PC. Otherwise it's a hit or miss affair for the PC to detect it. This got worse after some months/years, although the drive itself has seen relatively little use.



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

    iQIzBAABCAAdFiEEXqhvaVh2ERicA8Ceseqq9sKVZxkFAmaqTtkACgkQseqq9sKV ZxnW6xAA50fGPamHdldz7kMK8h5toFdrsUV1brn+mmrgzqtlHEnKltljUDpsf/5j cdWh7e+hK+eWobbem7PreJCUC/gZ4F5WODkxWxavIPTEQylzNhG0M3iSD/XLaJoK qQvYgmE9DCgrwfQYmr9rHfOkrTbtMSuoft76gajTxZ+QKQhT5Q+kDyL25KEHglEV K8TJSUsvMiuEfkJw0IrGJYTMOvPMEGKZHVVtBkqE5dbwxRDDM7m/oSmyfxKm+1r+ GapZ36jp8pMGE0IbSONd9cy3BWYwihqqHUVtm19W+8vdMg2ONdfvwwbUHNqc/sNU yZkOIEUyj9bn168mfqO+26AwyDRvviMWRy/2WwZ/Np61XjwrSwnerbGbS9DxYv1h GpdZYTNob4IUArFRZMuervWdZWSPRmnpLZ3/cDdpM1HYxjG7+tG1sUCQ1aS6TAQG DcVL0UBTqEnqbMCO+vjR6Z06fZp2Je9OxuzN820Mljm5SbmskZ+pfBdus2GKBOLY 5T68zG5jhBxPKEhvgH4b6x8bwSYZtcMXiBmnNbBVslCIAcQV88WLkhNqxwdkPtMf XnXH1T44nI73mG9Eakv32jtcWU8eWYHmbgGkBVH/dR3gT3y+XfHNHXghXxRfJr8p SrpMTMMU6QoKpE76ZWhNGUMZnSNJtApuI/c0d2ifwE1WkRJ4Goo=
    =PJ9a
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael@21:1/5 to All on Wed Jul 31 17:45:45 2024
    On Wednesday, 31 July 2024 17:37:17 BST Jacques Montier wrote:
    Le mer. 31 juil. 2024 à 16:49, Michael <confabulate@kintzios.com> a écrit :
    On Wednesday, 31 July 2024 10:36:20 BST Jacques Montier wrote:
    Hello all,

    For a few days, my two usb external disks do not automatically mount on /run/media/<user>

    Have you changed your PC, USB port/hub, kernel or your udisks version, before
    you noticed this?

    If you observed this on a laptop, does it happen when mains power is on?

    Those disks are successfully detected.

    - dmesg :
    20.711135] usb 10-2: New USB device found, idVendor=1058,

    idProduct=2621, bcdDevice=10.34
    [ 20.711144] usb 10-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [ 20.711147] usb 10-2: Product: Elements 2621
    [ 20.711150] usb 10-2: Manufacturer: Western Digital
    [ 20.711152] usb 10-2: SerialNumber: 575837324139315041324831
    [ 20.712935] usb-storage 10-2:1.0: USB Mass Storage device detected
    [ 20.713081] scsi host14: usb-storage 10-2:1.0
    [ 21.740964] scsi 14:0:0:0: Direct-Access WD Elements 2621

    1034 PQ: 0 ANSI: 6

    [ 21.741163] sd 14:0:0:0: Attached scsi generic sg6 type 0
    [ 21.743671] sd 14:0:0:0: [sde] Spinning up disk...
    [ 22.764230] ....ready

    [ 25.936769] sd 14:0:0:0: [sde] 3906963456 512-byte logical blocks:
    (2.00

    TB/1.82 TiB)
    [ 25.937331] sd 14:0:0:0: [sde] Write Protect is off
    [ 25.937337] sd 14:0:0:0: [sde] Mode Sense: 47 00 10 08
    [ 25.937831] sd 14:0:0:0: [sde] No Caching mode page found
    [ 25.937836] sd 14:0:0:0: [sde] Assuming drive cache: write through
    [ 25.939868] sde: sde1

    - Some errors by journalctl (attached file)

    juil. 31 11:21:00 GentooLinux udisksd[1178]: Error probing device: Error sending ATA command IDENTIFY DEVICE to '/dev/sde': Unexpected>

    0000: f0 00 01 00 00 00 00

    0a

    00 00 00 00 00 1d 00 00 ................

    0010: 00 00 00 00 00 00 00

    00

    00 00 00 00 00 00 00 00 ................

    (g-io-error-quark, 0)

    - I can manually mount them without any issue.

    - USB sticks successfully mount.

    - No problem with Linux Mint OS 23.1

    Any idea ?

    Thanks in advance,

    Cheers,

    --
    Jacques

    It often happens external USB drives need enough power to start up fully, before their onboard controller responds to probes from udisksd. If something
    (from PSU, to battery power, to kernel/desktop power management options) has
    changed, to the point where the power on the USB port becomes marginal, then
    such symptoms are possible.

    Things you could try:

    1. Try a different USB port, ideally USB 3.0 or later version e.g. USB 3.2 Gen2, which can provide more power.

    2. Use a powered USB Hub between the PC and the drive, or a Y-shaped USB cable
    to feed the drive from two ports.

    3. If on a laptop, use mains power (esp. in the summer when the cooling
    fan
    may be demanding more from the battery).

    4. Remove other consumables from USB ports sharing the same bus.

    5. Do not set your desktop to auto-mount USBs when you plug in, but only when
    you manually click on it in your GUI.


    Anecdotal observation: I have a WD Elements drive which I connect through an
    external powered hub on a USB 2.0 port on the PC. Even though the hub is powered, I have to power it up first, wait a few seconds for the drive to come
    up to speed (the LED flashing slows down), before I boot the PC.
    Otherwise
    it's a hit or miss affair for the PC to detect it. This got worse after some
    months/years, although the drive itself has seen relatively little use.

    Thank you Michael,

    It's a desktop PC working with cinnamon 6.
    I tried KDE Plasma (wayland or X11) and it works !
    So, maybe a cinnamon-6.0.4 issue ?

    Cheers,

    Jacques

    Looks like a possibility, if this started when you ran an update of the desktop, or changed some cinnamon/gnome settings. Play around with the auto- mount USB drive options, to see if it corrects itself.
    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCAAdFiEEXqhvaVh2ERicA8Ceseqq9sKVZxkFAmaqajkACgkQseqq9sKV ZxkaWhAAjLyqtVuv6BVSdONBZ6GxX1ASOCWZIqeXFj7yv06hS6ro+KaJNCgfkJRr jeevcy3J78O3egDUbkp0EHk79aSAI/RkR85m9Zpe5IeuCr168N83Vz1tt3ENiv72 YTKGJxhQ8LDNxz2H74iWae4jjQH5UHqNxqmS/Rt6U8kzfqtfip9GW7cpaVXyQosF LiDFIlhwsHsVMEOyURMiE9wnTCDndbwFsTZ773iRsjtd9H2za4kjDkh48CNb/3WG IIswVktSAxqTs3ucGqt2XCesUnvC7Iki74XWhZ4xMrAFjN+un7aLvVVMVijDapI2 DPiJJ8EMoA+oWheHLS/1ojpnwWEV2bXyTa0oOC5+vjT8n7GLi/GLCy8JocT3ofl7 AY/uZiejBmDJ3Kt6boGSqrgcljRRNutXQ474dQr5h9m1IkbW7UeBhzPpQTr4M1Nj 2NRJ/UdNT1KdXGRreqrdSkA1YsqJq9febRi8YdSuqmSUcRmF22XvmV4DvndO8WjY va6ZkByLGw+1qaXfWiVYObXxZ2+Lodld90+py7CCqmIBxlfFdwouKItVnLtiGyh6 BCz9CVkgt5Ep1XBIcki1pdUsmxvOsZ4FhmNRiTJ4JwTSewIgenoxceHJVC3u6h1S D4KKHWHrc+54E+CA+H9gusjvMdSf5tmupoEjTysMrs7z/SGT8qM=
    =kILH
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael@21:1/5 to All on Thu Aug 1 12:38:59 2024
    On Thursday, 1 August 2024 11:24:29 BST Jacques Montier wrote:
    Le mer. 31 juil. 2024 à 18:46, Michael <confabulate@kintzios.com> a écrit :

    Looks like a possibility, if this started when you ran an update of the desktop, or changed some cinnamon/gnome settings. Play around with the auto-
    mount USB drive options, to see if it corrects itself.

    Thanks Michael,

    I did not understand why an usb stick was automounted and not WD usb drive.
    I saw the one was fat32 formatted and WD ext4.
    So, i formatted fat32 another empty WD drive and it worked !
    Last version of cinnamon could not automount ext4 drive ? That's weird.

    Well, it's not so important and in can deal with it.

    Cheers,

    Jacques

    Unlike ext4, the FAT filesystem does not support Unix file permissions so accessing the fs via userspace is more restricted than FAT. However, I would expect a different error, like "wrong filesystem type ...".

    What do you get in your logs when your run:

    ~ $ udisksctl mount -b /dev/sdXx

    where Xx are the device and partition numbers?

    Is it possible the owner/access rights of the ext4 fs has changed between the time when it worked and now?

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

    iQIzBAABCAAdFiEEXqhvaVh2ERicA8Ceseqq9sKVZxkFAmarc9MACgkQseqq9sKV Zxnk2RAA2HeJdPUzK+oau7nBngFmvubszkufNC/Rq2jESJXbpkVi6443ywGKA+0p /yEK97uGFjp0cx3DqEHRNdfT39Yj+kd6rfP9Q2m4HM8JJjDw6px0QtCX3/ni/wyt meAO74uf6WXd3coQqaC2AV52feRsG34n66LdClnp16mDxZRVj5nMYmHvh4GWeQmQ ECTAgroe8/zGtl9K/OH7stc9HDZRT3CkhaAEJBWbpIW7Gab8GgapqEnvwQejw9Jr KIm3ARixg+KBKVmg/LBKIEuaSQmHLxEf2mo/MwUvc4RaMSajueV9qCVbyXSJiN9g zIrrdBuGrvReaYSC+z3yfEpV+dGRPLgjveJ/NkEeXNtBGqbcOd+DikF+bbWFeB/9 h5JDYb3aQInsWSnuB5lnP8d6CzDqMu1GmDkKAHLz7MXCKn7z7vndDM10uAVvd4dv vKcwAJgEaNnRJa1Ub0Y0wtOPRKiBbggDELbR/4uj+gJ7nOJJZnZGE7OongYhsOqy L/qhWxGSwSjTaPDczDSUzy5RnPbbnbys0y9Oi2Yh+lOQSj6xB4w8Q8iGShIKHxO8 YjlGdheONvSupHs1GqBfyXpBJTXEoRKGpgxWU0FsJqEAVOjZ6Ie5Pr+hge+//2ix WDFzsSjG7bF7b5/NtrntlAkJNYl1XAaP8tFszoPFkrMnFowI5T4=
    =qfTf
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael@21:1/5 to All on Thu Aug 1 14:26:24 2024
    On Thursday, 1 August 2024 13:38:33 BST Jacques Montier wrote:
    Le jeu. 1 août 2024 à 13:39, Michael <confabulate@kintzios.com> a écrit :
    On Thursday, 1 August 2024 11:24:29 BST Jacques Montier wrote:
    Le mer. 31 juil. 2024 à 18:46, Michael <confabulate@kintzios.com> a

    écrit :
    Looks like a possibility, if this started when you ran an update of
    the
    desktop, or changed some cinnamon/gnome settings. Play around with
    the
    auto-
    mount USB drive options, to see if it corrects itself.

    Thanks Michael,

    I did not understand why an usb stick was automounted and not WD usb

    drive.

    I saw the one was fat32 formatted and WD ext4.
    So, i formatted fat32 another empty WD drive and it worked !
    Last version of cinnamon could not automount ext4 drive ? That's weird.

    Well, it's not so important and in can deal with it.

    Cheers,

    Jacques

    Unlike ext4, the FAT filesystem does not support Unix file permissions so accessing the fs via userspace is more restricted than FAT. However, I would
    expect a different error, like "wrong filesystem type ...".

    What do you get in your logs when your run:

    ~ $ udisksctl mount -b /dev/sdXx

    where Xx are the device and partition numbers?

    I get this :

    My external usb disk is labelled SAUVEGARDE.

    $ udisksctl mount -b /dev/sdf1
    Mounted /dev/sdf1 at /run/media/jacques/SAUVEGARDE

    $ dmesg
    [ 1003.189856] usb 10-2: new SuperSpeed USB device number 5 using xhci_hcd
    [ 1003.205671] usb 10-2: New USB device found, idVendor=1058,
    idProduct=2621, bcdDevice=10.34
    [ 1003.205682] usb 10-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [ 1003.205688] usb 10-2: Product: Elements 2621
    [ 1003.205709] usb 10-2: Manufacturer: Western Digital
    [ 1003.205714] usb 10-2: SerialNumber: 575837324139315041324831
    [ 1003.207086] usb-storage 10-2:1.0: USB Mass Storage device detected
    [ 1003.207196] scsi host15: usb-storage 10-2:1.0
    [ 1004.268434] scsi 15:0:0:0: Direct-Access WD Elements 2621
    1034 PQ: 0 ANSI: 6
    [ 1004.268645] sd 15:0:0:0: Attached scsi generic sg7 type 0
    [ 1004.271067] sd 15:0:0:0: [sdf] Spinning up disk...
    [ 1005.291638] ....ready
    [ 1008.461012] sd 15:0:0:0: [sdf] 3906963456 512-byte logical blocks: (2.00 TB/1.82 TiB)
    [ 1008.461494] sd 15:0:0:0: [sdf] Write Protect is off
    [ 1008.461502] sd 15:0:0:0: [sdf] Mode Sense: 47 00 10 08
    [ 1008.462001] sd 15:0:0:0: [sdf] No Caching mode page found
    [ 1008.462009] sd 15:0:0:0: [sdf] Assuming drive cache: write through
    [ 1008.464128] sdf: sdf1
    [ 1008.464219] sd 15:0:0:0: [sdf] Attached SCSI disk
    [ 1023.783260] EXT4-fs (sdf1): mounted filesystem e26e8fef-8c48-4ad3-8258-10cb8fb47f81 r/w with ordered data mode. Quota
    mode: none.

    The above shows user 'jacques' has no problem mounting the ext4 filesystem on WD Elements 2621, using udisksctl - this indicates there is no issue with the core userspace function.

    However, Gnome applications (e.g. Nemo) use GIO, which calls GVFS, which then calls udisksctl to do the mounting/unmounting - not sure if FUSE is also brought into this mix as if the above stack of virtual fs libraries are not enough.

    In any case, since you have proven udisks works as it should, the problem ought to lie within the Gnome related stack above that.


    Is it possible the owner/access rights of the ext4 fs has changed between
    the time when it worked and now?

    Well, i really don't know...

    --
    Jacques

    Since udisks works, this is not related to a change in a fs access rights restriction issue.

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

    iQIzBAABCAAdFiEEXqhvaVh2ERicA8Ceseqq9sKVZxkFAmarjQAACgkQseqq9sKV Zxkp0hAAjzUFGZiJRL7KmtUss6B+g4x4ocXMMcHi3oTans9bNIH9jlMhn0evaQ2V tvn1oMs6dw1SA+hynHsFo03ftkxWg5nDtV9Kfksc+NoL1AIhOn0tDVq1WeB3sTNY /vRMt8wl1+DbgNyhT8Du66KaNSsgni7W+K8hU8mtyBxSYZp1qP4gJpZ/0W7uz9if 7j5J3qjU87dQDfHg9YpiDFafXomTrrt5tTzDfA+Rcx156cSDFVZ+qeM2PBydIzMq glRENuu3xtYwX4Sf/GtMeDasCxOGIWMDqB1gz5n2k3QFXh9s8fLzxyGBYF0wC5QA 0bR1ps5TaGHU8Cd3CahhnorfqS12g939uu54W3dVSNui2h1vMi8fGLHHeXrPOhPW 9/46V9Xr74NP4r60AxR5xdS8edep1zgy1X+NAmJe8O4Q1M5TO2vgkICz+HOmgp72 BDF1kiFtQIxBWdLDbTIyJR5bKowGYJjilQVZoLriWrg/8dTUMRMgC9Oj06rtcWXk Y7ivOldP1olINe2Bjpx1At+8cEtjLqKLPh+Fwvs7JJ5gitaWJgifDNAwPOcX1jzl za/wOWXUaIvA2bB3SNRC8FUzgMtZxezmop9HdndxULM6XEU7C1nUAKkqcxNrxrTt +Z5B9vG/SO8/b7TNmiBAuhcSG5u+q3cNNOxg7ISmj3spc5TJMzs=
    =h7q4
    -----END PGP SIGNATURE-----

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