Error mounting with fstab

My old external HDD ran out of space, so I got a nice shiny 4tb drive. I wiped it clean and changed the file system to ext4. I performed a copy of all the old data to the new drive.

I updated my FSTAB to look like this (yes, I know its commented out right now. Ignore that and assume that each of the UUID lines are un-commented):

====================== fstab =================== qiE9Dtax
# rootfs is not mounted in fstab as we do it via initramfs. Uncomment for remount (slower boot)#/dev/vero-nand/root  /    ext4      defaults,noatime    0   0
# 760GB WD Drive 
#UUID=D61E-3752 /mnt/hdd vfat rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0111,dmask=0000,allow_utime=0022,codepage=437,iocharset=ascii,shortname=mixed,showexec,utf8,errors=remount-ro,uhelper=udisks
# 4TB WD Drive
#UUID=d2c55b12-def9-4cb4-bb6e-eacdb8e35761 /mnt/hdd2 ext4 rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0111,dmask=0000,allow_utime=0022,codepage=437,iocharset=ascii,shortname=mixed,showexec,utf8,errors=remount-ro,uhelper=udisks

The drives mount just fine with a “mount -a” command, but on reboot it goes into failure mode (File System Failure, i think?). I have to uncomment the last line (new hard drive) to get it to boot correctly.

Any idea what could be causing the problem?

Logs: https://paste.osmc.tv/vaficijuve

Hi,

It would easier to diagnose if you provide logs with mount enabled.

Also does automount not work either?

Thanks Tom.

Happy to do so, but not sure how. I can re-enable the FSTAB links and reboot, but it fails before gaining an internet connection (so I can’t perform the grab-logs command, as far as I’m aware).

Also, I’m not sure what automount means. I thought that was what fstab does?

Everything that happens during boot will be recorded in the log files

Basically you don’t need any fstab entries, USB disk normally would automatically be mounted under /media

How did you partition (MBR/GPT/…) the disk and using which OS.

@Tom_Doyle How about this? https://paste.osmc.tv/nisibamace.xml

Alright, I’ve uploaded two sets. Hopefully those shows what errors are happening during boot.

I’m using fstab because I share out the hard drive to my rpi3 running OSMC as well. This allows me to keep the media files in the same spots for my library database.

I used fdisk to partition the drive directly from the vero and mkfs.ext4 to format it. If I remember correctly it is using GPT, but could be wrong.

If you have the partition with a label name, instead of using the UUID, you can use the label, so the fstab would look something like:

LABEL=MyPartitionLabel /mnt/hdd2 ext4 rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0111,dmask=0000,allow_utime=0022,codepage=437,iocharset=ascii,shortname=mixed,showexec,utf8,errors=remount-ro,uhelper=udisks

I think there are a few things that you don’t need, in fact you don’t need most of those options. I’d suggest trying the simplest entry you can get away with. I’d suggest starting with this:

LABEL=MyDriveLabel /mnt/hdd2 ext4 rw,user,auto 0 0

I have 4 drives mounting this way with no issues.

1 Like

Perfect! That fixed the problem.

I don’t think the LABEL part had anything to do with the fix (and I’m far too annoyed to go back and test the theory) :grin: but I bet getting rid of all of that other crud was required. I was just following a guide from a long time ago and that was the string they used to mount their drives so I copied it.

Thanks for the assist.

No problem, and I agree that the UUID probably was not the problem, but for practical reasons using the label is so much easier! If you update a drive in the future you don’t need to change the fstab at all (as long as you keep the same label). Of course there is a minor problem where you can have 2 drives with the same label…

The problem is caused by specifying udisks as a helper.

Sam

Got it. I’m guessing that works ok for NTFS drives, but not for ext4 drives?

That was what I thought, but there were so many other un-needed options I figured it best to start with the least amount of options, and since those minimal options have been working for years for me that seemed to be what to try.

Any idea why my network share is now failing to mount correctly? /etc/exports has it set up right, and on the client machine I have the following in fstab:
192.168.1.60:/mnt/hdd/Media /mnt/hdd/Media ext4 rw,user,auto,nofail

This share worked fine until I had to adjust the fstab on the server. Originally the fstab on the client looked like this:
192.168.1.60:/mnt/hdd/Media /mnt/hdd/Media ntfs rw,user,auto,nofail

Mounting manually sudo mount 192.168.1.60:/mnt/hdd/Media /mnt/hdd/Media works fine, but fails during reboot.

Logs: https://paste.osmc.tv/elijixubop

replace ext4 with nfs as you are mounting an nfs filesystem, not ext4.

It isn’t NTFS anymore. Its ext4.

clarification the old HD I replaced was NTFS, the new one (4tb) is ext4

No, if it’s network mounted it’s nfs. Regardless of how the disk is formatted.

oh man. I probably just read right over that when i was doing updates and thought I saw “ntfs”. I’ll do that shortly.

Bugger. Yup, that was me being too fast for my own good.

Thanks for the catch.

Glad to be of help :smiley: