Results 1 to 7 of 7

Thread: 5200 & NFS: writing /etc/exports directly?

  1. #1
    Registered+
    Join Date
    Apr 2008
    Posts
    57
    Thanks
    0
    Thanked
    1 time in 1 post

    5200 & NFS: writing /etc/exports directly?

    Hi
    Since a couple of days I am using a thecus N5200 and want it exclusively in a Unix-PC environment, so only ftp or mainly NFS is requested. This sounds easy, but I failed to succeed with NFS.

    All I wanted in the beginning was just a simple test folder exported to all with “*”.
    It wouldn't work at all with “permission denied” message on the client, no matter what I tried. Finally, there has been a lot of testing and reading and I got it working with no other change than just installing "://onbeat.dk/thecus/index.php/N5200_Module:_NFSEXPORT]N5200 Module: NFSEXPORT - Thecus Wiki" after I already had installed SSHD, SYSUSER and UTILS.
    What I wanted and really would appreciate, is the chance to simply modify /etc/exports to my needs and start NFS-Server with this shares.
    To explain it a bit more detailed: I already operate some NFS-servers in my network and want to centralize this and take all data to the new N5200 and its raid. It would be fairly easy to create the appropriate file structure on the N5200 and taking all the export lines from other /etc/exports just into the /etc/exports of the new NAS. Thus, migration would be just nothing!
    But, when I run a test, after a reboot, old /etc/exports was still in use, my changes was gone.
    One step back. I could not even get a simple NFS share exported in a way to mount it, whatever I tried with the Web-Interface. It is as awful to use and a real handicap, while it would be so easy just creating an /etc/exports and starting the appropriate services to run NFS-servers. But.

    First, there still seems to be a bug in the FW 2.00.04 concerning NFS on the N5200, otherwise it should have been running with the same configuration as used after installing NFSEXPORT.

    Second, I got an overloaded /etc/exports due to this module NFSEXPORT that I don't need and don't want, but cannot do any changes of the /etc/exports that would become permanent after reboot.

    Third, its a pain to use the Web-Interface to create a simple /etc/exports. There should be an easy choice build in to just edit lines into this file and restart NFS.

    I would appreciate any comments and want believe, that there is a simple command to take a new config (like /etc/exports) in place to operate the system with it.
    Otherwise, as I read today, system boots from an CF-Card or something similar? At the next possibility, I have a look inside and if, ... then it would perhaps be easy to access and change the system directly on this card what would also include a stop of all that unneeded M$ services.

    edit: "://onbeat.dk/thecus/index.php/N5200_Module:_NFSEXPORT]N5200 Module: NFSEXPORT - Thecus Wiki" had been a link, but I am not yet allowed to use links in a post.
    Last edited by pit234a; 13-04-2008 at 09:59 PM. Reason: board rules

  2. #2
    Registered+
    Join Date
    Aug 2007
    Posts
    53
    Thanks
    0
    Thanked
    3 times in 3 posts

    Re: 5200 & NFS: writing /etc/exports directly?

    Hi,

    Thecus has done this because they see the box as a esay to use black box and not as a user modifiable Linux computer....

    Every time the box starts up the exports file gets created from scratch (by a script). Your idea to modify the script on the flash drive is good but you can't do it - the filesystem is read-only and encrypted.

    What you can do, if you have some knowledge in writing a little Shell script, install my META module and add a script which adds the export directives you want to have. This script gets called at the end of the startup procedure. My NFSEXPORT module does basically the same and in fact this module isn't needed as a module, it could/should better be a META script.

    Hope this helps...

    Andreas

  3. #3
    Registered+
    Join Date
    Apr 2008
    Posts
    57
    Thanks
    0
    Thanked
    1 time in 1 post

    Re: 5200 & NFS: writing /etc/exports directly?

    Thanks a lot for your reply.
    I took a short look to the description of your META module, but because of some trouble with my healthy, I promised to reduce my overall time on PCs and have left only about one hour a day. Maybe somewhat more at the weekend. Thats not enough to run some tests now.
    I believe to got an idea about what you mean.
    Is that as easy as something like: mv /my/exports-file /raid/sys/exports ?
    Than I would just have a place to store /my/exports-file.
    My experience on scripts is very low, as I am low level Unix-User at al. What I did up to now was just reading what others did and taking from that, I thought to need. I never read a book about that subject, so I don't know, if I have the skill to solve this problem, but I hope I can manage it in a way.

    By the way: do they really think it easier to learn how to operate a Webif instead just writing a few lines in a text file down there at thecus-home? They are using busybox on Linux and in fact, this was my reason to buy it because I thought it would easy be usable as NFS-Server.
    They might be right in aspect of all that poor M$ users out there in the world, but they don't need to know something about NFS anyway and who ever wants NFS, surely knows about /etc/exports and if not, this is still easier and useful to learn.

    Bye.

  4. #4
    Registered+
    Join Date
    Apr 2008
    Posts
    57
    Thanks
    0
    Thanked
    1 time in 1 post

    Re: 5200 & NFS: writing /etc/exports directly?

    got it done with the help of META module and a very simple script, like said, cp ...my/exports /etc/exports and restart of portmap and nfs, did it like that:
    (/app/bin/rc/portmap restart;/app/bin/rc/nfs restart)&
    and not tested wether this would have been necessary.
    Anyway, after reboot, showmount -e brought the exact list of my test exports, but I was unable to mount:
    # mount 192.168.0.100:/raid0/data /usr/home/pit/nfs
    [udp] 192.168.0.100:/raid0/data: Permission denied
    Activated NFSEXPORT and without reboot, it worked with my test export in use.

    So I still believe that there is something buggy in this FW concerning NFS.

    Will soon try to change the list in NFSEXPORT and reduce it to my needs. I found this in a script, but did not have a further look on that up to now.

    edit: just found that I previously had written mv instead of cp. Of course, it must be copied, not moved, else my export would be gone with the next restart.
    Last edited by pit234a; 24-05-2008 at 07:00 PM. Reason: failure in text

  5. #5
    Registered+
    Join Date
    Aug 2007
    Posts
    53
    Thanks
    0
    Thanked
    3 times in 3 posts

    Re: 5200 & NFS: writing /etc/exports directly?

    You just need to call

    /opt/nfs-utils/sbin/exportfs -r

    this re-reads the /etc/exports file and you're done. Your code with "/app/bin/rc/portmap restart;/app/bin/rc/nfs restart" is overkill.

    Why you get permission errors could be answered if you at least post your /etc/exports file...

    Andreas

  6. #6
    Registered+
    Join Date
    Apr 2008
    Posts
    57
    Thanks
    0
    Thanked
    1 time in 1 post

    Re: 5200 & NFS: writing /etc/exports directly?

    Thanks again. Changed that start of nfs-service.

    This is pretty sure not yet an error of my exports file.
    I am still testing and just did a few modifications on what NFSEXPORT generated.

    I found for sure, that NFS mount from my thecus will not work, as long as NFSEXPORT is not enabled as a module.
    It is working with my export file as soon as I enable it and do a reboot.
    Because of my bad English, let me try again:

    without NFSEXPORT:
    Code:
    root@syo]/usr/ports/sysutils/fusefs-ntfs # showmount -e 192.168.0.100
    Exports list on 192.168.0.100:
    /raid0/data/pit                    *.*.*.*
    /raid0/data/usbcopy                *
    /raid0/data/usbhdd                 *
    /raid0/data/nsync                  *
    /raid0/data/test                   *
    [root@syo]/usr/ports/sysutils/fusefs-ntfs # mount 192.168.0.100:/raid0/data /usr/home/pit/nfs
    [udp] 192.168.0.100:/raid0/data: Permission denied
    with NFSEXPORT:
    Code:
    [root@syo]/usr/ports/sysutils/fusefs-ntfs # mount 192.168.0.100:/raid0/data /usr/home/pit/nfs
    [root@syo]/usr/ports/sysutils/fusefs-ntfs # showmount -e 192.168.0.100
    Exports list on 192.168.0.100:
    /raid0/data/pit                    *.*.*.*
    /raid0/data/usbcopy                *
    /usr/share/zoneinfo                *
    /raid0/data/usbhdd                 *
    /raid0/data/nsync                  *
    /raid0/data/test                   *
    /lib/security                      *
    /lib/modules                       *
    /raid0/data                        *
    /raid0/sys                         *
    /cloopfs                           *
    /img/www                           *
    /img/bin                           *
    /tmpfs                             *
    /logfs                             *
    /app                               *
    /opt                               *
    /                                  *

    with NFSEXPORT, after reboot with cp my_exports...(a new one now):
    Code:
    [root@syo]/usr/ports/sysutils/fusefs-ntfs # showmount -e 192.168.0.100
    Exports list on 192.168.0.100:
    /raid0/data/pit                    *.*.*.*
    /raid0/data/usbhdd                 *
    /raid0/data/test                   *
    /raid0/data                        *
    /raid0/sys                         *
    /app                               *
    /opt                               *
    /                                  *
    [root@syo]/usr/ports/sysutils/fusefs-ntfs # umount /usr/home/pit/nfs
    [root@syo]/usr/ports/sysutils/fusefs-ntfs # mount 192.168.0.100:/raid0/data /usr/home/pit/nfs
    [root@syo]/usr/ports/sysutils/fusefs-ntfs # mount | grep 100
    192.168.0.100:/raid0/data on /usr/home/pit/nfs (nfs)

  7. #7
    Registered User
    Join Date
    Dec 2007
    Posts
    5
    Thanks
    0
    Thanked
    0 times in 0 posts

    Re: 5200 & NFS: writing /etc/exports directly?

    sqlite-check for nfs-entries (just in case someone is interested)

    the /etc/exports file is generated from the sqlite db /raid0/sys/raid.db
    to see the nfs-entries, type
    Code:
    root@127.0.0.1:/raid0/sys# /opt/bin/sqlite raid.db 'select * from nfs;'
    (_be_careful_with_sqlite_ - you can destroy everything !!!)

    wvrnn

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Problem with Nero
    By deathsith in forum Help! Quick Relief From Tech Headaches
    Replies: 2
    Last Post: 15-06-2007, 09:24 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •