NFSV4 Server with ext4 USB drive

Reagarding NFSv4 Server on RPI2

Hey guys.

I reaaly hope someone can help me here…

Maby this is a noob question, but really, i have been searching for a week now, i just dont understand it :frowning:

I have updated to the newest OSMC version with November secound edition.

But sometimes my harddisk need repair, and then my NFS server cant start, before i manually restart it.

Can somebody tell me what to write, so that the NFS server wil restart or something, as soon as the harddrive is done repairing ?

FSTAB :
LABEL=USB1 /mnt/USB1 ext4 defaults,nofail 0 1
LABEL=USB2 /mnt/USB2 ext4 defaults,nofail 0 1
LABEL=USB3 /mnt/USB3 ext4 defaults,nofail 0 1
LABEL=USB4 /mnt/USB4 ext4 defaults,nofail 0 1

Exports
/mnt/USB1 *(rw,sync,no_subtree_check,insecure)
/mnt/USB2 *(rw,sync,no_subtree_check,insecure)
/mnt/USB3 *(rw,sync,no_subtree_check,insecure)
/mnt/USB4 *(rw,sync,no_subtree_check,insecure)

And last question…

The NFS clients are also RPI2, how should i mount ?
Is it best through NFS browser or fstab mount, and fstab mount, how do i do this ?

I think your time would be better spent figuring out why your external drives are getting corrupted to the point that (presumably) the file system is mounting read only…

Do you always safely remove the drives or shut down before disconnecting a drive ? Do you ever pull the power out without shutting down properly ?

If you don’t pull out a drive or the power without properly unmounting or shuttting down you should not be getting corruption.

1 Like

Thank you for your reply.

Sadly the thing is, that i would like to make it user friendly for my dad, so that if the house get´s a power failure, the Pi2 can reboot, and auto repair it self.

Should i do something else then using fstab ?

mount tool or something you think?

Why don’t you get an inexpensive UPS for the Pi and the drive. You should get hours to runtime without power with one.

I live in an area where I get power outages several times a month, and have never seen my external drive (EXT4) corrupted.