Is it possible to make PCIe drives appear internal?

Hi!

I’m using a Lenovo ThinkCentre with the latest Fedora 41. Recently, I installed an additional internal hard drive (a PCIe NVMe M.2 SSD) to expand my local storage. However, this drive mounts automatically as if it were an external hard drive.

Is there a way to configure it to appear as a regular internal drive alongside the main one?

Thanks!

I’ve never needed to mess with it, but does the following look like it might be what you are looking for?:

https://wiki.archlinux.org/title/Udev#Some_devices,_that_should_be_treated_as_removable,_are_not

Mine show up as non-removable internal drives. For instance with a second drive at /dev/nvme1n1, running as root

udevadm info -an /dev/nvme1n1

Show lots of info and the removable attribute can be obviated

udevadm info -an /dev/nvme1n1 | grep removable

Hmm, unless I’m misunderstanding it, this is an exact opposite. The link explains how to make drives that appear internal to be removable.

Was it like that straight after installation? Im not ay my PC right now but its definitely not mounting as dev/nvme1n1 rather something very long. I formatted the driver with linux file system straight after installation and it works absolutely fine with the difference it just shows as any other USB drive that I might have plugged in and I already removed it from the file manager menu accidentally once. Plus, some programs like Cryptomator, didnt recognise that space and I wasnt able to load my vault without adding specific path via Flatseal.

This needs a bit more explanation. Usually you would want internal file systems to be automatically mounted as specified in /etc/fstab. That may or may not be the case for external disk units, which could be removable or not removable.

1 Like

Internal drives are normally added with an entry in /etc/fstab. See: https://linuxconfig.org/how-to-add-new-disk-to-existing-linux-system.

Hi,

So this is how I added the drive initially after internal installation. Perhaps I have done something wrong? I have attached some screenshots below, does anything look out of place?



Screenshot From 2025-03-04 18-17-10

As you can see “Data” (or CT1000p3SSD8) is the PCIe hard drive that I have recently installed. It behaves the same way as my USB-C hard drive when its plugged in.

I should add that I’m not an advanced user so perhaps I have messed something up during formatting/partitioning or misunderstand how Linux sees additional drives.

Thank you

There is a 3 images limit per post so additionaly here this is a screenshot from the Terminal:

That is a feature of Nautilus which is the Gnome File Manager or File Browser. Whenever it finds something that can be mounted it will do so, whether the disk is internal, external or removable.

You should be able to disable this feature according to How to disable media automount in GNOME. That also disables automounting removable devices such as a USB memory stick.

Also note the eject button next to the “Data” item. Click on that and the disk will be unmounted.

1 Like

Thanks for the reply, but I’m not fully understanding the suggestion. If I disable this feature, it just won’t mount automatically alongside any other USB drives I might plug in, and it will still behave in the same way after I do it manually. And I have to mount it manually in that case to access my data.

Also note the eject button next to the “Data” item. Click on that and the disk will be unmounted.

That’s exactly part of my problem - I would like my second disk to be visible in the same way as the main one, not as an external drive that I can just eject, especially accidentally since the eject button is there at all times.

Hi Emilian,

Try this:
As root or sudo:

  1. vi /etc/fstab
  2. add a line that looks like this:
    /dev/nvme0n1p1 /data ext4 defaults 1 2 # the white spaces are <SPACE> not <TAB>
  3. mkdir /data
  4. reboot

DONE

Your new disk will be mounted on /data

2 Likes

Need data to get away from taking shots in the dark. If willing, post the full output of

udevadm info -an <device>

and maybe something useful can be discovered.

That had done the trick. Exactly how I wanted it. Thank you kindly, sir.

1 Like