Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] NFS: any advice for a Synology NAS?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
psycho
Guru
Guru


Joined: 22 Jun 2007
Posts: 534
Location: New Zealand

PostPosted: Sun Apr 18, 2021 8:00 am    Post subject: [SOLVED] NFS: any advice for a Synology NAS? Reply with quote

I've set up my (DS420j) NAS as an NFS server, and so far it's been nothing but a nuisance...so much so that I'm thinking of abandoning the idea, yanking some drives out and just using it as a media server. I'm hoping though that someone here has NFS working nicely from a Synology NAS. I won't post my /etc/fstab line for the share, nor my exports on the server (I can ssh in as root so can edit that and a few other bits and pieces) because I have nothing even to suggest as an approximation of a working setup: I've tried everything I can think of, from the Gentoo wiki defaults through to variations of most of the nfs mount options...I've messed with the read/write sizes, MTU, with a/sync at both ends, kernel stuff, with limiting it to NFSv4, or 3...aargh!

So far it's been unusable rubbish: the best I've been able to do is to get it to freeze just occasionally and just for short periods of time. Some of my settings had my system locking up completely with just
Code:
ls
though simply changing it to
Code:
/bin/ls
would work, if that means anything to anyone (and there's nothing weird in my path or aliases... 'which ls' returns /bin/ls, yet /bin/ls works and ls hangs...even when none of the files ls would return are shares...aargh).

I'd have kept experimenting except that I *thought* I finally had it working acceptably (just short 1 to 5 second delays now and then, then things would spring back to life), so used it for a backup...and there was massive data corruption and so (due to my stupidly trusting the backup without verifying it) I actually lost some data (everything since my last backup). This being the case I no longer trust it and don't want to use NFS for anything unless someone can post a safe, confirmed working configuration (both the NAS and client ends): the last thing I want when I'm entrusting my backups to the NAS is for NFS to be unreliable. Slow I can cope with, but I need to know that what I copy to the server is actually getting there intact.

If anyone has it working on a Synology NAS, can you please let me know how you did it? If you just left all the defaults in place and it worked then perhaps I've got some faulty hardware. Everything other than NFS seems fine though.

[Edit]I suppose I should post the fstab line just in case something stupid in there that I *haven't* changed has been causing the issues. Here it is:
Code:
192.168.1.254:/volume1/nas  /mnt/nas  nfs  rw,_netdev 0 0
For a long time I left the server's exports untouched...it's only after nothing else worked that I started ssh-ing in and messing with that.

Last edited by psycho on Wed Apr 21, 2021 6:32 am; edited 1 time in total
Back to top
View user's profile Send private message
petr2008
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jan 2008
Posts: 119
Location: Prague, cz

PostPosted: Sun Apr 18, 2021 4:59 pm    Post subject: Reply with quote

I have Sinology NAS working at work for few years. It was not straightforward for me to setup it, but finally I found reliable configuration which works fine and allows to save calculations output directly to NFS shared disk, see:

https://www.psi.ch/sites/default/files/import/emug/Emug2018EN/EMUG_2018_20.pdf

One important point for NAS configuration is to use only NAS web GUI and do not try to setup it from UNIX command line.

I am not sure how can I help you as I am not big expert but I may try.

Petr
email address removed by Neddyseagoon
Back to top
View user's profile Send private message
psycho
Guru
Guru


Joined: 22 Jun 2007
Posts: 534
Location: New Zealand

PostPosted: Sun Apr 18, 2021 8:28 pm    Post subject: Reply with quote

Thank you! My issues sound similar to the ones you were having with your original setup: in fact my setup's more like the one you got working (I have a switch between the NAS and clients)...but you've given me (at last) something new to try. I was getting frustrated because NFS has never given me any problems in the past, Synology boxes have a good reputation for "just working" without the kinds of headaches this one's been giving me...and I thought I'd just about systematically tried every possible configuration option with no success. I didn't consider the switch though! It's a cheap unmanaged switch with no QoS so is highly likely to be the problem here...it was literally a case of out-of-sight, out-of-mind because it's not physically visible and has done its job perfectly up until now...but I'm going to take it out of the equation now and see how things go...at least it's a new thing to try beyond abandoning NFS and doing everything via rsync/DLNA/etc.

Even the fact that it worked for you without modifying anything beyond the limited options in the GUI narrows things down a lot for me, in terms of eliminating possibilities...so again, thank you, your reply has been really helpful.
Back to top
View user's profile Send private message
psycho
Guru
Guru


Joined: 22 Jun 2007
Posts: 534
Location: New Zealand

PostPosted: Wed Apr 21, 2021 6:32 am    Post subject: Reply with quote

Well, it wasn't a problem with the cheap switch (a nice one made no difference), it was the intervention of a switch, period. Disconnecting the NAS from the switch, shifting it next to the router and plugging it into that instead finally solved the problem.

Not only was I wrong about the solution (wasting time trying every conceivable configuration of NFS), I wasn't even right about the symptoms of the problem. Having set up the NFS server as soon as the NAS was up and running I was experiencing client issues (shell lockups for simple stuff like ls of a local directory) that were clearly NFS-related so blamed NFS for them...but in fact the NFS mount was just making intermittent full lock-ups of the NAS felt on clients: in fact that NAS was disappearing from the network for a few seconds every now and then, NFS server or not. I'm sure I've seen advice to setup networks as I'd done it originally, with the switch between the NAS and everything else (and in fact your working setup, Petr, did exactly that)...but maybe this little NAS with its one ethernet port breaks that rule.

It's amazing how great it feels to see instant responses to shell commands again: another day or two of lock-ups every few seconds would have done my head in.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20054

PostPosted: Wed Apr 21, 2021 3:47 pm    Post subject: Reply with quote

psycho wrote:
Well, it wasn't a problem with the cheap switch (a nice one made no difference), it was the intervention of a switch, period. Disconnecting the NAS from the switch, shifting it next to the router and plugging it into that instead finally solved the problem.
That's interesting. I wonder if the switch issue may have been not using jumbo frames. I can't think of any large storage solution I've used that didn't go through a switch (although most if not all probably used fiber).
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum