Hard drive sometimes fails to mount on boot, leads to emergency mode

Hi. I have my system running on a SSD, and I have a HDD where I store my documents. I mount the HDD on startup. See part of my /etc/fstab

/dev/sdb1 /mnt/storage ntfs defaults 0 0

When I start my PC this drive fails to mount very often (around 30% of the times), I get into the emergency mode and I have to reboot my system.

Here is the screenshot of journalctl -xb when it failed:

I have Windows 10 installed on a separate partition of my SSD, but I hardly ever use it.Should I use it, I perform the full shutdown, as it is known causing troubles.

How do I end this hassle with the HDD?

While I have no idea why your system sometimes thinks it is not a proper NTFS file system, you could at least add

nofail

to the mount options. Then your system will complete the boot and you can then do the mount by CLI instead of all the hassle you have now. Just as by-pass help until the root cause is found.
After all this file system is not crucial for the system to function, it only becomes important when needed by a user.

Just an idea.

You do not connect another mass-storage device sometimes during boot, so that that becomes sdb and this one sdc?

Some questions for your fstab:

  • why are you still using sdb instead of UUID? Is this an ancient system? As Henk mentioned, using disk names is an ancient method an can cause problems. Using UUID is the way to prevent such problems since ages…
  • why do you use ntfs instead of ntfs-3g?
  • no proper rights management on your side…uid/gid/umask…

First of all you could try a different file system driver for NTFS. There are three I know of:

ntfs - part of the linux kernel (the one you are using )
ntfs3 - part of the kernel (but probably not available in the kernel you are using)
ntfs-3g - a user space filesystem driver

However as far as I know none of these drivers will be able to repair a faulty NTFS-filesystem.

So if your MS Windows leaves the filesystem in a “dirty” state (which MS Windows can repair easily) you might be lost with all of those drivers.

No, I do not do that.

I had a similar problem at one time. It turned out to be a failing drive. Initially, it was slow to start up. But, after a while, it became increasingly unreliable. Replacing the drive fixed the problem.

Please tell me, how should the /etc/fstab entry look like then?

Show

ls -l /dev/disk/by-uuid | grep sdb

BTW, does this mean that you indeed have connected other mass-storage devices from time to time during boot?

ls -l /dev/disk/by-uuid | grep sdb
lrwxrwxrwx 1 root root 10 Feb 10 18:53 FAF229FBF229BCAF -> ../../sdb1

I didn’t connect any other devices.

I would try ntfs-3g first

/dev/sdb1 /mnt/storage ntfs-3g nofail,uid=nnnn,gid=nnnn,windows_names  0  0

You have to adjust the values for “uid” and “gid” to your needs.

1 Like

Then change into

UUID=FAF229FBF229BCAF /mnt/storage ntfs nofail 0 0

But again, this might only be a side trail. Important when you do have sometimes other mass-storage devices connected during boot. When that is not the case, this might be something to improve your configuration, but will not help with your problem.

1 Like

Thank both of you very much.
I’ll change it now, test it for a couple of days, and get back to you here if the problem still persists.

Please keep in mind:

NTFS is a MS Windows filesystem. No matter which linux filesystem driver you use none might be able to repair all “pollutions” introduced by MS Windows.

As long as you use the drive with both operating systems such problems may occur …

My advice is always: only use non-Linux file systems for direct exchange of data between Linux and other operating systems. Further avoid as much as possible.

You did not tell much about your usage of this file system, but it looks as if it is used on Linux by user(s) as just a data space to have files on like one has and uses them on other space like a home directory. That should be avoided. Storing, editing, etc, should be on Linux file systems. Only copy to/from the non-Linux file system for exchange with your double-boot MS-Windows (or to removable mass-storage for exchange with another non-Linux computer).

After all you probably do not use Linux to throw away the security and protection of e.g. ownership and permissions by using non Linux file systems in day to day usage.

Ever considered the possibility the HDD may never mount again? I strongly recommend that you move your documents to a reliable drive.