Noob Linux and NSA320 questions

Marvell Kirkwood based
machasm
Posts: 28
Joined: Fri Jan 18, 2013 1:11 pm

Noob Linux and NSA320 questions

Post by machasm » Sat Jan 26, 2013 8:19 pm

Hi guys,
After having a bit of a mare trying to get my NSA320 up and running I am now faced with new problems which, I believe, are stemming from a complete lack of knowledge around Linux (always have been a windows user and love my GUIs).
I have managed to install FFP onto my hard drive and even managed to create an NFS share or two.
What I am struggling with is how to map that NFS share to existing volumes and shares? I dont know if I am even using the right terminology here but could do with some pointers.
I have quickly found that the Zyxel implementation of NFS shares doesnt work very well with XBMC hance the need for FFP.
Also is there any way that the packages on FFP (specifically nfsd) are controllable through the web GUI?
Any help would be much appreciated.
Furthermore, should I even be using the Zyxel firmware or is there another flavour of software/firmware that can be installed which is open source and perhaps even better?
Something like FreeNAS perhaps or similar. Even if there is is there a tutorial for easy installation by a noob like myself :oops:
Thanks for your time guys.

Mijzelf
Posts: 6207
Joined: Mon Jun 16, 2008 10:45 am

Re: Noob Linux and NSA320 questions

Post by Mijzelf » Sat Jan 26, 2013 10:39 pm

Also is there any way that the packages on FFP (specifically nfsd) are controllable through the web GUI?
Some packages (transmission, icecast, nzbget) have a webinterface, some (like nfsd) don't. And yes, theoretically it is possible to write a webinterface for each package, but it hasn't been done, and I think it won't be done either.
For configuring nfsd, it's all about editing 1 single file, /ffp/etc/exports. Why write a webinterface if there is already a good editor.
Furthermore, should I even be using the Zyxel firmware or is there another flavour of software/firmware that can be installed which is open source and perhaps even better?
Something like FreeNAS perhaps or similar.
Yes there is another option, actually several. In this forum there are pointers about installing Debian or Arch Linux. These are better in the sense that they both give you more control over the box, and more possibilities (thousands of packages, if you like). But I think they are worse for you, because there is no GUI at all.
And Freenas is not an option. AFAIK it's x86 only, and won't run on an Arm. OpenMediaVault might be an option. It is Debian based, but the Arm port is still in alpha, so you should be thrown back on the command prompt often.
The best option is to learn how to use the command line. It beats every GUI.

machasm
Posts: 28
Joined: Fri Jan 18, 2013 1:11 pm

Re: Noob Linux and NSA320 questions

Post by machasm » Sat Jan 26, 2013 11:14 pm

Thanks Mijzelf appreciate your efforts.
One thing that I am thoroughly confused about is where are these NFS shares that I have created?
How do I point them to existing shares.
I am aware of the exports file but don't fully understand the directory hierarchy?
Any help here?
Thanks.

Mijzelf
Posts: 6207
Joined: Mon Jun 16, 2008 10:45 am

Re: Noob Linux and NSA320 questions

Post by Mijzelf » Sun Jan 27, 2013 11:54 am

The hierarchy is: All internal disks are mounted in /i-data, all external disks in /e-data. The internal disks are mounted on /i-data/<some-8-digit-hex-code>, and there is a symlink /i-data/md0 pointing to that mountpoint. A second volume would have a md1 symlink.

If you want to export you admin share, it's /i-data/<some-8-digit-hex-code>/admin. The hexcode is different for each NAS, but a constant as long as you don't re-create your volume(s).

machasm
Posts: 28
Joined: Fri Jan 18, 2013 1:11 pm

Re: Noob Linux and NSA320 questions

Post by machasm » Sun Jan 27, 2013 2:11 pm

Thanks Mijzelf,
Thats exactly what I needed to know.
I am assuming that this is referring to NFS shares?
What is the hierarchy for the SAMBA shares?
In other words how do I make the NFS shares point to the same shares as the Samba ones so that I don't have to copy all the data from one share to the other?
Appreciate it.

Mijzelf
Posts: 6207
Joined: Mon Jun 16, 2008 10:45 am

Re: Noob Linux and NSA320 questions

Post by Mijzelf » Mon Jan 28, 2013 11:47 am

All samba shares are in /i-data/<some-8-digit-hex-code>/. Have a look in /etc/samba/smb.conf

machasm
Posts: 28
Joined: Fri Jan 18, 2013 1:11 pm

Re: Noob Linux and NSA320 questions

Post by machasm » Mon Jan 28, 2013 1:58 pm

Mijzelf wrote:All samba shares are in /i-data/<some-8-digit-hex-code>/. Have a look in /etc/samba/smb.conf
Thank you.

machasm
Posts: 28
Joined: Fri Jan 18, 2013 1:11 pm

Re: Noob Linux and NSA320 questions

Post by machasm » Sat Feb 16, 2013 8:15 pm

Sorry to dig this thread up again but I am still having problems getting the 320 to share the same data from both a SAMBA share and an NFS share.
Let me try to paint a picture of what I have and what I would like to achieve.
I currently have a Samba share /i-data/md0/video with all the files I want to share in there.
I have created an NFS share called /i-data/8db0b037/nfs/video with nothing in it.
What I would like to do is have all the content within the Samba share available in the NFS share WITHOUT duplicating all the data.
I assumed that it would just be a matter of creating a symbolic link between the shares but I haven't a clue how to do this?
Any help would be appreciated.
Mac.

Mijzelf
Posts: 6207
Joined: Mon Jun 16, 2008 10:45 am

Re: Noob Linux and NSA320 questions

Post by Mijzelf » Sun Feb 17, 2013 6:39 pm

You can create a symlink from /i-data/md0/video to /i-data/md0/nfs/video but

Code: Select all

ln -s nfs/video /i-data/md0/video
(First delete the -/video directory), or the other way around:

Code: Select all

ln -s ../video /i-data/md0/nfs/video
But I don't know if either nfs or samba by default will follow symlinks on a ZyXEL.

You could also bindmount one on the other:

Code: Select all

mount --bind /i-data/md0/video /i-data/md0/nfs/video
This will mount video on nfs/video. (The contents of video is visible)

machasm
Posts: 28
Joined: Fri Jan 18, 2013 1:11 pm

Re: Noob Linux and NSA320 questions

Post by machasm » Mon Feb 18, 2013 8:38 am

Mijzelf wrote:You can create a symlink from /i-data/md0/video to /i-data/md0/nfs/video but

Code: Select all

ln -s nfs/video /i-data/md0/video
(First delete the -/video directory), or the other way around:

Code: Select all

ln -s ../video /i-data/md0/nfs/video
But I don't know if either nfs or samba by default will follow symlinks on a ZyXEL.

You could also bindmount one on the other:

Code: Select all

mount --bind /i-data/md0/video /i-data/md0/nfs/video
This will mount video on nfs/video. (The contents of video is visible)
Is that the right syntax or should it be?

Code: Select all

mount --bind /I-data/md0/video /I-data/8db0b037/nfs/video
Since the Nfs share contains that unique hex code and not md0?

Mijzelf
Posts: 6207
Joined: Mon Jun 16, 2008 10:45 am

Re: Noob Linux and NSA320 questions

Post by Mijzelf » Mon Feb 18, 2013 9:32 pm

I-data should be i-data. Filenames are case-sensitive in Linux.

And md0 vs 8db0b037, well, /i-data/md0 is a symlink which points (indirectly) to /i-data/8db0b037. But md0 is more generic, as it's the same on all ZyXEL boxes, while 8db0b037 is unique (or almost unique) for your box.

Mount doesn't care, it will simply resolve the symlink.

machasm
Posts: 28
Joined: Fri Jan 18, 2013 1:11 pm

Re: Noob Linux and NSA320 questions

Post by machasm » Tue Feb 19, 2013 12:16 am

Thanks Mijzelf.

Dannyboy
Posts: 2
Joined: Sun May 15, 2016 5:26 pm

Re: Noob Linux and NSA320 questions

Post by Dannyboy » Sun May 15, 2016 5:31 pm

Continues on a old thread.
I had the same problem as the thread starter and solved it by the bind mount command, but how do i make it to stick during reboots?
Tried to add it in fstab but for some reason it got deleted after reboot..

Mijzelf
Posts: 6207
Joined: Mon Jun 16, 2008 10:45 am

Re: Noob Linux and NSA320 questions

Post by Mijzelf » Sun May 15, 2016 7:00 pm

/etc is on a ramdrive, and so it doesn't survive a reboot. You'll have to put your mount in a script, and put that in /usr/local/zy-pkgs/etc/init.d/. It will be called on boot with a 'startup' argument.

Dannyboy
Posts: 2
Joined: Sun May 15, 2016 5:26 pm

Re: Noob Linux and NSA320 questions

Post by Dannyboy » Sun May 15, 2016 7:33 pm

Mijzelf wrote:/etc is on a ramdrive, and so it doesn't survive a reboot. You'll have to put your mount in a script, and put that in /usr/local/zy-pkgs/etc/init.d/. It will be called on boot with a 'startup' argument.
Thanks Mijzelf, worked like a charm. You are a hero. ;)

Post Reply