Announcement

Collapse
No announcement yet.

"Ghost" hard drives?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] "Ghost" hard drives?

    I noticed this awhile back but saw it again this morning and thought it odd. Really just wondering if anyone else sees this:

    When I do "lsblk" which is aliased as "lsblk -fl --sort name" I get this:

    Code:
    stuart@office:~/Downloads$ lsblk
    NAME      FSTYPE FSVER LABEL       UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
    nvme0n1                                                                                
    nvme0n1p1                                                                              
    nvme0n1p2 swap   1                 1ae06117-4c44-450c-b3e5-ceefa4de0d86                [SWAP]
    nvme0n1p3 btrfs        BLADE1      5964f1aa-2e8e-48e1-a3e3-f2069bd6217c  215.8G    55% /subvol
                                                                                           /home
                                                                                           /
    nvme0n1p4 ext4   1.0   vm_drive    dd295020-bb4d-4061-9b5f-76333183ab9b  122.1G    65% /mnt/vm_drive
    nvme1n1                                                                                
    nvme1n1p1                                                                              
    nvme1n1p2 btrfs                    247e6a5b-351d-4704-b852-c50964d02ee6                
    nvme2n1                                                                                
    nvme2n1p1                                                                              
    nvme2n1p2 btrfs                    79f961eb-b2b4-4ab6-a0ca-798e0229bf70                
    sda                                                                                    
    sda1                                                                                    
    sda2      btrfs        storage     34f7d49b-ebf1-4d06-a899-2de14ee92b5d                
    sdb                                                                                    
    sdb1                                                                                    
    sdb2      btrfs        root_backup 77de9ade-e3ad-42fb-a400-84493de9827f  380.5G    59% /mnt/root_backup
    sdb3      ext4   1.0   vm_backup   38c1cdd4-7ca3-4e34-81e1-4a04f6b6ae78                
    sdc                                                                                    
    sdd                                                                                    
    sde                                                                                    
    sde1      exfat  1.0   tss_files   F7BC-F6B2                              49.9G    14% /media/stuart/tss_files
    sdf                                                                                    
    sdf1      exfat  1.0   travel_docs 7461-F49D                                            
    sdg                                                                                    
    sdg1      ntfs         ineo        0E92D1D079B1C8D8                                    
    sr0
    ​
    The odd thing is two of these "drives" don't exist! There is no sdc or sdd installed on my system. No other tools report them that I've noticed so it must be related to lsblk itself. Also there are two other unused SATA ports which would be sde and sdf but those went to removable devices as one would expect.

    It's not really worrisome, but I found it odd.
    Last edited by oshunluvr; Apr 27, 2023, 08:08 AM.

    Please Read Me

    #2
    I think I have seen this, somewhat, after removing USB sticks. But I can't reproduce this.

    I can only see devices that are plugged in, mounted or not.

    /dev/sdX can be purely arbitrary, unrelated to the number of ports iirc. I have 3 unused SATA ports, and though my internal SATA SSD always is at sdaX no matter that is is plugged into SATA port #2, and any newly plugged USB drives start at sdbX and so on. If that SATA drive failed to mount or was unmounted, a USB stick can become sdaX






    Last edited by claydoh; Apr 27, 2023, 09:25 AM.

    Comment


      #3
      Do you have any other hardware connected to your mainboard that could cause this?
      Can you find out something about this in /dev?

      I "think" I remember to have seen something like this years ago with an old motherboard and - I think it was - a card reader connected to it…
      Last edited by Schwarzer Kater; Apr 27, 2023, 09:00 AM.
      Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
      Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

      get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
      install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

      Comment


        #4
        Originally posted by oshunluvr View Post
        The odd thing is two of these "drives" don't exist! There is no sdc or sdd installed on my system.
        I think they are displayed simply because they are sequential and 'inside' of the first and last drives you do have. Just a guess.
        Windows no longer obstructs my view.
        Using Kubuntu Linux since March 23, 2007.
        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

        Comment


          #5
          All the drives after D are removable. C and D have nothing connected. So I popped out all the removable drives and C, D still remain.

          There are actually 8 sata ports, but several of them are disabled when the some of the NVME slots are occupied. I checked the manual and 5-8 are currently disabled by BIOS due to the NVME drives. So C and D are available but unoccupied.

          This makes me think maybe Schwarzer might be onto something. I wonder if the BIOS reports those ports as "live" just because they are available?

          Reviewing the major/minor numbers in /dev shows this:

          brw-rw---- 1 root disk 8, 0 Apr 20 14:18 sda
          brw-rw---- 1 root disk 8, 16 Apr 20 14:18 sdb
          brw-rw---- 1 root disk 8, 32 Apr 20 14:18 sdc
          brw-rw---- 1 root disk 8, 48 Apr 20 14:18 sdd

          so this makes me thing maybe Snowhog is on to something also. It looks like UDEV is reserving the number sequence for potentially occupying those two ports.

          Finally, this mobo supports hot swapping of sata ports. So I am fairly convinced the answer is - hot swapped but unoccupied sata ports need reserved space in the device sequence.

          Please Read Me

          Comment


            #6
            Do you need the "hot swapping" (I never have for my private usecases)?
            Otherwise just disable it for the ports and see what happens.
            Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
            Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

            get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
            install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

            Comment


              #7
              Originally posted by Schwarzer Kater View Post
              Do you need the "hot swapping" (I never have for my private usecases)?
              Otherwise just disable it for the ports and see what happens.
              Yes my thoughts exactly. I do have hot-swap usage on my server (only done it 3-4 times) but not on this pc.

              Please Read Me

              Comment


                #8
                Hot swap IS disabled so that's not the direct cause.

                Please Read Me

                Comment


                  #9
                  FWIW, I just checked my work laptop and lsblk shows two "ghosts", sdb and sdc. (It has an NVMe main storage and a SATA drive on sda.) If, as happens often, I connect a device, such as a backup drive, by USB, it appears on sdd, regardless of which USB port is used. There's also what I presume is an SD card reader slot, but I've never used it.

                  The next time I've got the laptop opened up, if ever, I'll check for other slots that storage could use, but I think I would have noticed if there were any, and I did look for another M.2 slot.
                  Regards, John Little

                  Comment


                    #10
                    It may also be board or chipset-dependent as well, I imagine?

                    I just swapped out my 9th gen mobo and CPU for 13th gen stuff (wheeeee!!-ish), and the old one has 2 hot swap SATA ports, and I was not using either. I left that feature enabled, though. It does not exhibit this behavior.

                    The new board has the same drive output as the old board, which does not have hot swap, or it doesn't have any info, advertising, or settings related to it. The output is identical for me.
                    I use lsblk etc a LOT, building and writing OS images to usb sticks for my Chromebook, often multiple times daily, so I always check the device name before running dd, as often enough the drive is not 'sdBx', though it usually is.


                    I could be remembering wrong, but the hardware swap only happened last Sunday.
                    I think I would have noticed this, even if I quickly adjusted, and at least looked for information, as you are doing.
                    And ended up down yet another rabbit hole, of course, lol!

                    Comment


                      #11
                      There must be something that triggers the dev registration at boot that is behaving weird.

                      This morning I rebooted and left one of the removable drives plugged in. It is now at /dev/sdc/ and sdd and sde are listed but empty and and the next thumb drive (plugged in after boot) is sdf.

                      Please Read Me

                      Comment


                        #12
                        Do you have any custom rules in /etc/udev/rules.d ?
                        Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
                        Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

                        get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
                        install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

                        Comment


                        • oshunluvr
                          oshunluvr commented
                          Editing a comment
                          Nope (and my comment has to be at least 10 characters - dumb)

                        #13
                        OK, I just remembered something and looked at the lsblk of my openSUSE Leap KDE on an old Shuttle DS61 mini PC:
                        Code:
                        NAME   FSTYPE FSVER LABEL          UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
                        sda                                                                                    
                        ├─sda1 vfat   FAT32                34ED-03AD                                            
                        ├─sda2 ext4   1.0                  09264fdd-40f8-4c6f-887f-b74b273ec20e                
                        ├─sda3                                                                                  
                        ├─sda4 btrfs        openSUSELeap15 898da0a7-e9a1-44e6-815a-be55dd16fc1c   42,6G    16% /var
                        │                                                                                      /tmp
                        │                                                                                      /usr/local
                        │                                                                                      /root
                        │                                                                                      /srv
                        │                                                                                      /home
                        │                                                                                      /boot/grub2/x86_64-efi
                        │                                                                                      /opt
                        │                                                                                      /boot/grub2/i386-pc
                        │                                                                                      /.snapshots
                        │                                                                                      /
                        └─sda5 swap   1                    1a475111-1c85-43d0-962e-a6fe24786fe0                [SWAP]
                        sdb
                        ​
                        sdb ?!? There only is a single 120GB SSD inside this computer… Nothing else attached externally.
                        One of the internal SATA ports and the internal ePCI port are not attached to anything either…

                        But wait, ll /dev/disk/by-id | grep sdb && ll /dev/disk/by-path | grep sdb shows:
                        Code:
                        lrwxrwxrwx     9 root root  28 Apr 23:01  usb-Generic_STORAGE_DEVICE-0:0 -> ../../sdb
                        lrwxrwxrwx     9 root root  28 Apr 23:01  pci-0000:00:1a.0-usb-0:1.2:1.0-scsi-0:0:0:0 -> ../../sdb
                        ​
                        It must be the built-in ID 05e3:0723 Genesys Logic, Inc. GL827L SD/MMC/MS Flash Card Reader !

                        In contrary the built-in ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller in my ThinkCentre is not shown anywhere with lsblk.
                        Last edited by Schwarzer Kater; Apr 29, 2023, 12:26 PM.
                        Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
                        Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

                        get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
                        install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

                        Comment


                          #14
                          Nice sleuthing!

                          @here:
                          Code:
                          stuart@office:~$ ll /dev/disk/by-id | grep sdd && ll /dev/disk/by-path | grep sdd
                          lrwxrwxrwx 1 root root 9 Apr 27 19:24 usb-NORELSYS_1081CS0_0123456789ABCDE-0:0 -> ../../sdd
                          lrwxrwxrwx 1 root root 9 Apr 27 19:24 pci-0000:2a:00.3-usb-0:4:1.0-scsi-0:0:0:0 -> ../../sdd
                          stuart@office:~$ ll /dev/disk/by-id | grep sde && ll /dev/disk/by-path | grep sde
                          lrwxrwxrwx 1 root root 9 Apr 27 19:24 usb-NORELSYS_1081CS1_0123456789ABCDE-0:1 -> ../../sde
                          lrwxrwxrwx 1 root root 9 Apr 27 19:24 pci-0000:2a:00.3-usb-0:4:1.0-scsi-0:0:0:1 -> ../../sde
                          stuart@office:~$ lsusb
                          ~
                          Bus 004 Device 003: ID 2537:1081 Norelsys NS1081
                          ~
                          This is an external USB 3.2 port device AND SD card readers - Micro and regular sized (which I had basically forgotten about).

                          I tested and the Micro slot mapped to /dev/sdd and the Full sized slot mapped to /dev/sde.

                          MYSTERY SOLVED!

                          Thanks everyone for you comments and assistance. I will be able to sleep again, LOL

                          Interesting that the SD card readers "hold" a dev slot where the USB ports don't. I suppose due to some difference in how the kernel handles these devices.

                          Please Read Me

                          Comment

                          Working...
                          X