It seems that there is a problem with that disk, which rendered my system unbootable (this thingy that tries to give me a shell during boot but fails because I haven’t given root a password). I had to boot a live medium to comment that line.
How can I make this process more robust? The /data partition isn’t actually neccessary to boot the system. Thus if there is a problem with it, I don’t want my system rendered unbootable.
Is such an entry in fstab still the way to go to add additional partitions to the system? I’m not focused on fstab and if nowadays additional partitions are ought to be added via systemd or whatever I’m eager to learn about it.
-
The second part of this question would be, how should I proceed with this harddrive? I’ve just mounted the partition manually and it seems to be working fine.
nofail: Prevents the system from halting the boot process if the mount operation fails. The system will continue to boot, but the device will not be mounted.
noauto: Prevents the filesystem from being mounted automatically when the system boots or when the mount -a command is run.
You can also use the combination of both noauto,nofail. Stuff like this is especially useful for external drives or network shares
I’ve added nofail to fstab. I take from this that I should do this always to non-essential partitions.
Afterwards I ran fsck on the partition, which found a bunch of stuff, like making some inode narrower; but I also lost some data.
How worried should I be about this? Is this a strong signal that the harddrive is failing and I should replace it immediately? Or is this part of normal operation?
It looks as if your drive is currently healthy. file system corruption can have many reasons, it’s not necessarily a failing drive.
Keep an eye on those S.M.A.R.T values and make sure you always have a good backup.
You might want to run a test on your RAM memory with something like MemTest86+ (https://www.memtest.org), as bad memory can cause all kinds of problems.