Hello, in my new installation of Fedora KDE one of my internal SSDs appears as removable:

This does not happen on other distros i’ve tried.

Here is the output of lsblk:

NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda           8:0    0   5.5T  0 disk 
└─sda1        8:1    0   5.5T  0 part /mounts/ab377cf8-c32c-4599-9e52-e8dafff6ce86
sdb           8:16   0   1.8T  0 disk 
└─sdb1        8:17   0   1.8T  0 part /mounts/69b2fe34-d99a-4f0e-bbe3-f0c1acfaf0f2
nvme0n1     259:0    0 931.5G  0 disk 
├─nvme0n1p1 259:1    0   600M  0 part /boot/efi
├─nvme0n1p2 259:2    0     1G  0 part /boot
└─nvme0n1p3 259:3    0 929.9G  0 part /home
                                      /
nvme1n1     259:4    0 931.5G  0 disk 
├─nvme1n1p1 259:5    0  1000M  0 part 
└─nvme1n1p2 259:6    0 930.5G  0 part /mounts/00d6c142-ca89-4f65-93d0-dd74f14236f8

nvme1n1 is the disk in question.

/sys/class/block/nvme1n1/removable says it is not removable.

How can I make this not appear as removable?

  • Mihies@programming.dev
    link
    fedilink
    arrow-up
    7
    ·
    3 days ago

    Can it be a BIOS/UEFI setting that disk is hot swappable? I vaguely remember similar issue on Windows. If that’s the case, try setting it as not hot swappable in BIOS/UEFI.

    • rrconkle@lemmy.zipOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      3 days ago

      I looked and couldn’t find any settings for disks being hotswappable, and it hasn’t happened on any other distros i’ve tried on this system, so I don’t think this is it.

  • eah@programming.dev
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    3 days ago

    A hacky way to fix that is to make that device your user home directory. If the device contains your user home or root directory, it won’t be removable.

    I’m looking through the code now. It looks like it’s getting the device list from multiple sources and the fstab source might be losing the race to something else.[1] fstab devices aren’t removable.


    1. https://invent.kde.org/frameworks/solid/-/tree/master/src/solid/devices/backends?ref_type=heads ↩︎

  • luciole (he/him)@beehaw.org
    link
    fedilink
    arrow-up
    4
    ·
    3 days ago

    I’m having the same behavior on Mint with an NVMe M.2 drive as well. It feels like an expression of the fact that on linux any drive can be mounted and unmounted at any time as long as it doesn’t contain critical system files. It’s just that way imho

  • actionjbone@sh.itjust.works
    link
    fedilink
    arrow-up
    3
    ·
    3 days ago

    You need to create a permanent mount point for it. Then it will be seen as a non-removable drive.

    I experienced the same thing when I installed Bazzite.

    • rrconkle@lemmy.zipOP
      link
      fedilink
      English
      arrow-up
      4
      ·
      3 days ago

      It does have a permanent mount point, this is the line in /etc/fstab:

      UUID=00d6c142-ca89-4f65-93d0-dd74f14236f8 /mounts/00d6c142-ca89-4f65-93d0-dd74f14236f8 ext4  defaults,noatime 0 1
      
      • actionjbone@sh.itjust.works
        link
        fedilink
        arrow-up
        2
        arrow-down
        2
        ·
        edit-2
        3 days ago

        It needs to be pointed to a specific mount point, not just the mounts folder.

        For example, /mounts/mountname

        After creating the mount point name, setting the permissions correctly, and updating fstab, it should start to show up as a fixed drive.

          • actionjbone@sh.itjust.works
            link
            fedilink
            arrow-up
            2
            arrow-down
            1
            ·
            3 days ago

            OK, the text was wrapping weird on my screen and it didn’t look like that was part of the same path.

            Have you tried giving it a simpler path?

          • BCsven@lemmy.ca
            link
            fedilink
            arrow-up
            2
            arrow-down
            3
            ·
            edit-2
            3 days ago

            Why are you mounting to an odd folder path? This seems like how they get mounted temporarily to me. But I’m using another RPM based system they define it differently. Does the uuid names folder exist in /mounts already? Like do you want it in /mounts/certain folder. Maybe if that folder you are specifying is non existant its picking it up as removable drive?