Jump to content


Photo

Losing NAS on linux


  • Please log in to reply
28 replies to this topic

#1 doglover

  • Rytec EPG Team
  • 17,005 posts

+638
Excellent

Posted 25 August 2017 - 07:51

Lately I am having problems with losing the mounted drives (via fstab) from the NAS on my linux machine.

I cannot figure out why this is happening.  (NAS is running, network is OK)  But it is very annoying, since the Ubuntu machine and the NAS are used in an automatized project.  Losing the connection makes the process fail.

 

Restarting the Ubuntu machine will restore all the connections.  Did not try (yet) to using the command: mount -a

 

The automatized process is run via a series of bash files, So maybe I can enter some statements to this to check on the mounts, and if needed run a command to restore them.

Does somebody have an idea about the statements needed to do this?

 

Tried to search the net for this, but the only advise they come to is add the mounts to fstab (which I have already done)

 

Willy

 


~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: Losing NAS on linux #2 WanWizard

  • PLi® Core member
  • 68,544 posts

+1,737
Excellent

Posted 25 August 2017 - 10:44

NFS mounts? CIFS mounts?

 

When this happens, are the mounts still listed when you type "mounts" (no -a!)? Any error messages in the logs?


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Losing NAS on linux #3 catastrofus

  • Senior Member
  • 3,443 posts

+43
Good

Posted 25 August 2017 - 12:16

"mount", not "mounts" I think.


2 x ultimo4k (dvb-c fbc + 1 dvb-s2, 8.3r/nb) + een et10k/osmini (geen tuners en dus fallbackclient, nb) met een Synology ds214+ (2 x 6 TB) op DSM 7.1.1 in ziggo oost (voormalig @Home) + A1/A2/A3/HB (TechniSat)
 


Re: Losing NAS on linux #4 WanWizard

  • PLi® Core member
  • 68,544 posts

+1,737
Excellent

Posted 25 August 2017 - 12:40

Eh, yeah, typo. But Willy would have spotted that I think. ;)


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Losing NAS on linux #5 doglover

  • Rytec EPG Team
  • 17,005 posts

+638
Excellent

Posted 25 August 2017 - 14:45

Do not know all this (yet).

Will try to obtain the info, when it happens again.

 

The are all cifs mounts.

 

Willy


~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: Losing NAS on linux #6 WanWizard

  • PLi® Core member
  • 68,544 posts

+1,737
Excellent

Posted 25 August 2017 - 14:47

You have a Syno, so the first thing I would do is switch to NFS. I only use CIFS for dynamic connections, NFS for everything else. My boxes also all connect via NFS. Very stable.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Losing NAS on linux #7 betacentauri

  • PLi® Core member
  • 7,185 posts

+323
Excellent

Posted 25 August 2017 - 15:03

And you can look into synology log and dmesg output on the Linux machine. Maybe some errors are shown.
Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04

Re: Losing NAS on linux #8 doglover

  • Rytec EPG Team
  • 17,005 posts

+638
Excellent

Posted 26 August 2017 - 07:59

This morning everything was OK.  It does not happen every morning.

So I can only obtain info about this when it goes wrong. 

 

Willy

 

Let me explain:

 

This PC is used for the collection of EPG every night. 

Around 1h30 the PC switches itself on.  The process starts, and after it finishes the PC switches itself off.

Normally the process is finished when I wake up.  So the PC should be off.  When it is still on when I wake-up something is wrong (mostly).


Edited by doglover, 26 August 2017 - 08:06.

~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: Losing NAS on linux #9 doglover

  • Rytec EPG Team
  • 17,005 posts

+638
Excellent

Posted 26 August 2017 - 08:59

I have a problem with NFS mounts :

//192.168.178.19/Root on /mnt/ET9500/Root type cifs (rw)
//192.168.178.17/EPG on /mnt/Desktop/EPG type cifs (rw)
//192.168.178.17/Users on /mnt/Desktop/Gebruikers type cifs (rw)
//192.168.178.17/Download on /mnt/Desktop/Download type cifs (rw)
//192.168.178.30/EPG on /mnt/Fritz type cifs (rw)
//192.168.178.30/Backup on /mnt/Backup type cifs (rw)
gvfsd-fuse on /root/.gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev)


Added an NFS mount in etc/fstab (different mount point as above) and:


willy@willy-AMILO-Si-2636:~$ sudo mount -a
mount: onjuiste bestandssysteemsoort, ongeldige optie, ontbrekende codepagina,
       ontbrekend hulpprogramma, slecht superblok op //192.168.178.30/EPG, of een andere fout
       (voor sommige bestandssystemen (bijvoorbeeld nfs of cifs) kan
       een /sbin/mount.<type> hulpprogramma nodig zijn)
       Soms staat er nuttige informatie in het systeemlog --
       probeer zoiets als:  dmesg | tail
willy@willy-AMILO-Si-2636:~$ dmesg | tail
[   14.019413] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[   14.019415] cfg80211:   (5250000 KHz - 5330000 KHz @ 40000 KHz), (N/A, 2000 mBm), (0 s)
[   14.019418] cfg80211:   (5490000 KHz - 5710000 KHz @ 40000 KHz), (N/A, 2700 mBm), (0 s)
[   14.019420] cfg80211:   (57240000 KHz - 65880000 KHz @ 2160000 KHz), (N/A, 4000 mBm), (N/A)
[   36.066000] systemd-hostnamed[2558]: Warning: nss-myhostname is not installed. Changing the local hostname might make it unresolveable. Please install nss-myhostname!
[  382.090342] RPC: Registered named UNIX socket transport module.
[  382.090347] RPC: Registered udp transport module.
[  382.090349] RPC: Registered tcp transport module.
[  382.090351] RPC: Registered tcp NFSv4.1 backchannel transport module.
[  382.111818] FS-Cache: Netfs 'nfs' registered for caching

~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: Losing NAS on linux #10 WanWizard

  • PLi® Core member
  • 68,544 posts

+1,737
Excellent

Posted 26 August 2017 - 11:08

My boxes have these entries:

172.16.1.31:/volume1/Albums     /media/albums        nfs        ro,soft,async,nolock    0  0
172.16.1.31:/volume1/Music      /media/music         nfs        ro,soft,async,nolock    0  0
172.16.1.31:/volume1/OpenPLi    /media/nas           nfs        rw,soft,async,nolock    0  0    

where Albums, Music and OpenPLi are Synology shared folders.

 

It looks like your install is missing some required components, so I guess you have to do what Mr. Ubuntu says:

Please install nss-myhostname!

Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Losing NAS on linux #11 doglover

  • Rytec EPG Team
  • 17,005 posts

+638
Excellent

Posted 26 August 2017 - 14:31

There is something on my Ubuntu machine not correct.

Installed libnss-myhostname, but I still got the same errors.  And cannot get an nfs link established.

 

In order to find out if it is the Synology which is not configured properly or Ubuntu, I tried on the ET6500 the following:

mount 192.168.178.30:/volume1/EPG /mnt/EPG

Mount created without any hitch.  So the Synology is working properly.

The efforts have to concentrate itself to the Ubuntu machine.  But what is missing or wrong?

 

Doing the same on Ubuntu, I get the same error as above. 

I get a bit desperate of seeing this error.

 

Willy


~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: Losing NAS on linux #12 doglover

  • Rytec EPG Team
  • 17,005 posts

+638
Excellent

Posted 26 August 2017 - 14:36

Went back to basics, and started reading on the net about nfs in Ubuntu

The first thing I came across was:

sudo apt install nfs-kernel-server

Decided, let's do this.

Result:  mount made without an itch.

 

Conclusion:  Ubuntu does not install nfs by default.

 

Willy


Edited by doglover, 26 August 2017 - 14:37.

~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: Losing NAS on linux #13 doglover

  • Rytec EPG Team
  • 17,005 posts

+638
Excellent

Posted 27 August 2017 - 08:52

I have to come back to this.

The mounts are made.  But I tried them first as SU (superuser).  No problem there, mounted and readable.

 

However when I tried this as normal user, I could not read the drive.  Access denied.  I am stuck at this.

 

Willy


Edited by doglover, 27 August 2017 - 08:57.

~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: Losing NAS on linux #14 catastrofus

  • Senior Member
  • 3,443 posts

+43
Good

Posted 27 August 2017 - 09:27

Something wrong with your share permissions? <control panel> -> <shared folder>


2 x ultimo4k (dvb-c fbc + 1 dvb-s2, 8.3r/nb) + een et10k/osmini (geen tuners en dus fallbackclient, nb) met een Synology ds214+ (2 x 6 TB) op DSM 7.1.1 in ziggo oost (voormalig @Home) + A1/A2/A3/HB (TechniSat)
 


Re: Losing NAS on linux #15 doglover

  • Rytec EPG Team
  • 17,005 posts

+638
Excellent

Posted 27 August 2017 - 10:29

It seems that I needed to alter the squash settings on the Synology NAS.

Instead of no mapping, I had to change it to administrator or all users.

Squash: This field allows you to control users' access privileges of the NFS client. Please select one of the following:
    No mapping: Allows all users of NFS client, including root users, to maintain original access privileges.
    Map root to admin: Assigns access privileges to root users of NFS client equivalent to the admin user access privileges on your system.
    Map root to guest: Assigns access privileges to root users of NFS client equivalent to the guest access privileges on your system.
    Map all users to admin: Assigns access privileges to all users of NFS client equivalent to the admin user access privileges on your system.

Hopefully this will keep on working.

Limited the NFS access to only one IP address.

 

Willy

 

PS: Found this in the Synology documnetation:

 

If AUTH_SYS security flavor is implemented: The client must have exactly the same numerical UID (user identifier) and GID (group identifier) on the NFS client and Synology NAS, or else the client will be assigned the permissions of others when accessing the shared folder. To avoid any permissions conflicts, you can select Map all users to admin from Squash or give "Everyone" permissions to the shared folder.

 


Edited by doglover, 27 August 2017 - 10:31.

~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: Losing NAS on linux #16 WanWizard

  • PLi® Core member
  • 68,544 posts

+1,737
Excellent

Posted 27 August 2017 - 11:53

I'm not at home at the moment, I'll try to make a screenshot of my syno settings when I'm back.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Losing NAS on linux #17 doglover

  • Rytec EPG Team
  • 17,005 posts

+638
Excellent

Posted 27 August 2017 - 12:55

For an enigma2 receiver setting the mapping to admin, is not needed.  It works without it.

The permissions are probably not as critical on an enigma2 receiver.  On Ubuntu the permissons should match exactly.

 

Willy


Edited by doglover, 27 August 2017 - 12:57.

~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: Losing NAS on linux #18 WanWizard

  • PLi® Core member
  • 68,544 posts

+1,737
Excellent

Posted 27 August 2017 - 13:13

On the receiver you're logged in as root, on Ubuntu you aren't (it works as root there too).


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Losing NAS on linux #19 doglover

  • Rytec EPG Team
  • 17,005 posts

+638
Excellent

Posted 28 August 2017 - 07:37

The big problem is, as a non network expert, how are you suppose to know all this?

With cifs, it is kind of logic, link as an user with username and password.  Make sure all the files gets the correct uid, gid and you are in business.

 

On nfs, username, password, gid and uid cannot be defined.  This has to provided (ui,gid) with some alternative very obscure setting (squash) for which almost no documentation can be found.  Only if you read pages of incomprehensible text (as being written by geeks) some reference can be found to this setting.

 

Sorry to say, nfs may be better, but it is for sure not user friendly.

 

Willy


Edited by doglover, 28 August 2017 - 07:38.

~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: Losing NAS on linux #20 WanWizard

  • PLi® Core member
  • 68,544 posts

+1,737
Excellent

Posted 28 August 2017 - 11:42

The big achilles heel of Linux. And most of what runs on Linux, including our Enigma. Created by geeks for geeks, no documentation, no proper UI design, no UX design.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users