1

Today my new SSD arrived from Amazon. I installed the SSD and Fedora 31 onto it. I still have my old ssd plugged in.

When I try to mount it by the path /oldssd I get error mount: /oldssd: special device /dev/sda2/ does not exist (a path prefix is not a directory).. Everything seems to be correct in my /etc/fstab since I can mount by using the device path /dev/sda2

What gives?

[root@teckno-fedora2 ~]# tail /etc/fstab -n1
/dev/sda2/ /oldssd ext4 defaults 0 0
[root@teckno-fedora2 ~]# 
[root@teckno-fedora2 ~]# mount /oldssd/
mount: /oldssd: special device /dev/sda2/ does not exist (a path prefix is not a directory).
[root@teckno-fedora2 ~]# 
[root@teckno-fedora2 ~]# mount /dev/sda2
[root@teckno-fedora2 ~]# 
[root@teckno-fedora2 ~]# ls /oldssd/
backup  checksums_backup.md5
5

Remove that trailing slash after sda2 in fstab.

So it says /dev/sda2 instead of /dev/sda2/

sda2 isn't a directory, but a special file.

It's file type is block-device.

2
  • +1 for the extra comment "sda2 isn't a directory, but a special file": very enlightening May 31 at 20:54
  • It's actually one of the most important things to learn about Linux (any POSIX compliant OS). -->Every supported hardware device is represented by a file somewhere.
    – svin83
    Jun 6 at 19:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.