Buffalo NAS-Central Forums

Welcome to the Linkstation Wiki community
It is currently Fri Oct 24, 2014 10:27 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Mon Oct 16, 2006 7:46 am 
Offline
Total Newbie

Joined: Mon Oct 16, 2006 7:42 am
Posts: 1
the setup guide at http://homepages.enterprise.net/jnm/buffalo/nfs.html has disappeared.

Anyone who knows where it's gone, or who saved its content and can pass it on, I'd be very grateful.


Top
 Profile  
 
PostPosted: Mon Oct 16, 2006 9:13 am 
Offline
Site Admin
User avatar

Joined: Mon Jul 11, 2005 7:19 am
Posts: 7702
Location: Austria, Vienna
then you experienced why we relaunched this wiki.

we need an article about nfs on the LS2.

here is an german article at wiki.tuxbox.org:
http://wiki.tuxbox.org/NAS:Buffalo_Linkstation_II

we just would have to translate the most important parts.

_________________
LS1 (2.6 kernel, foonas svn1062, 750 GB, UBoot 1.2) & LS Pro (FreeLink/jtymod/GenLink, changes all the time)
Thx to all donators!


Top
 Profile  
 
PostPosted: Fri Oct 20, 2006 5:55 pm 
Offline
Newbie

Joined: Sun Jul 09, 2006 4:18 pm
Posts: 23
I am to lazy to do a wiki entry. It roughly works as it follows:

Install openlink 0.5x. Then log in to the LS as root.

Download the binaries and modules

Code:
cd /tmp
wget http://www.voicenet.com/~jceklosk/nfs-1.0.0-link2-jfc-1.0.2-alpha.tar.gz


Unpack the tarball:

Code:
tar xvfz <path to tarball>/nfs-1.0.0-link2-jfc-1.0.2-alpha.tar.gz


Forget about the README.1ST and do_install script that comes with the package. Instead:

Copy the kernel modules:
Code:
 
cp /tmp/nfs-1.0.0-link2-jfc-1.0.2-alpha/modules/* /lib/modules


Copy the programs:
Code:
cp /tmp/nfs-1.0.0-link2-jfc-1.0.2-alpha/nfs-utils/* /usr/sbin
cp /tmp/nfs-1.0.0-link2-jfc-1.0.2-alpha/portmap/portmap /sbin


Create a file /etc/init.d/nfs with the following contents:
Code:
 
#!/bin/sh
#
# description: Starts the nfs server \
# Script by JM, based on script from
# http://wiki.tuxbox.org/NAS:Buffalo_Linkstation_II plus
# further hacks and fixes from linkstationwiki.net
PATH=/sbin:/bin:/usr/sbin:/usr/bin
# Set the number of servers to be started.
# For industrial strength nfs use 8:
RPCNFSDCOUNT=3
 
tag=linkstation
facility=user.info
 
# Avoid using root's TMPDIR
unset TMPDIR
 
# check for modules
sunrpcok=`lsmod | grep ^sunrpc`
lockdok=`lsmod | grep ^lockd`
nfsdok=`lsmod | grep ^nfsd`
nfsok=`lsmod | grep -w ^nfs`
 
start()
{
        if [ ! -r /etc/exports ] ; then
                echo "nfs not started, nothing exported"
                logger -t ${tag} -p ${facility} -i 'nfs not started, nothing exported'
                exit 0
        fi
        # TODO: List individual services
        echo "Start services: nfs"
        cd /root
 
        #
        # nfs needs a few important status files in /var/lib/nfs. However, /var
        # is on the ram disk of the LS2, so these files are lost after a
        # reboot. We create empty substitutes for a start in case there
        # are non.
        #
        mkdir -p /var/lib/nfs
        mkdir -p /var/lib/nfs/sm
        mkdir -p /var/lib/nfs/sm.bak
        # rmtab needs to be a file, but someone sometimes creates it as a directory ...
        [ -d /var/lib/nfs/rmtab ] && rm -rf /var/lib/nfs/rmtab
        touch /var/lib/nfs/rmtab
        touch /var/lib/nfs/state
        touch /var/lib/nfs/etab
 
        # Now insert the modules if they're not running
        if [ "$sunrpcok" = "" ]; then
                /sbin/insmod /lib/modules/sunrpc.o
        else
                echo "nfs: sunrpc module already loaded"
        fi
 
        if [ "$lockdok" = "" ]; then
                /sbin/insmod /lib/modules/lockd.o
        else
                echo "nfs: lockd module already loaded"
        fi
 
        if [ "nfsok" = "" ]; then
                /sbin/insmod /lib/modules/nfs.o
        else
                echo "nfs: nfs module already loaded"
        fi
 
        if [ "$nfsdok" = "" ]; then
                /sbin/insmod /lib/modules/nfsd.o
        else
                echo "nfs: nfsd module is already loaded"
        fi
 
        #
        # Now run the daemons
        # rpc.statd creates its own pidfile
        #
        /sbin/portmap
        exportfs -r
        start-stop-daemon --start --quiet  --exec /usr/sbin/rpc.mountd
        start-stop-daemon --start --quiet  --exec /usr/sbin/rpc.statd
        start-stop-daemon --start --quiet  --exec /usr/sbin/rpc.nfsd $RPCNFSDCOUNT
 
        touch /var/lock/subsys/nfs
        showmount -e
        logger -t ${tag} -p ${facility} -i 'Started nfs'
}
 
stop()
{
        # TODO: List individual services
        echo "Stopping services: nfs"
 
        exportfs -au
        start-stop-daemon --stop --quiet  --exec /usr/sbin/rpc.mountd
        start-stop-daemon --stop --quiet --pidfile /var/run/rpc.statd.pid
        # nfsd needs KILL
        start-stop-daemon --stop -s KILL -n nfsd
        rm -f /var/lock/subsys/nfs
        logger -t ${tag} -p ${facility} -i 'Stopped nfs'
}
 
case "$1" in
start)
        start
;;
stop)
        stop
;;
restart)
        echo "restarting nfs"
        stop
        sleep 10
        start
#       echo "starting rpc.mountd"
#       start-stop-daemon --start --quiet --exec /usr/sbin/rpc.mountd
#       echo "starting rpc.statd"
#       start-stop-daemon --start --quiet  --exec /usr/sbin/rpc.statd
#       echo "starting rpc.nfsd"
#       start-stop-daemon --start --quiet  --exec /usr/sbin/rpc.nfsd $RPCNFSDCOUNT
#       exportfs -r
#       touch /var/lock/subsys/nfs
#       showmount -e
        ;;
*)
        echo "Usage: /etc/init.d/nfs {start|stop|restart}" >&2
        exit 1
        ;;
esac
exit 0


Set up access right and create start/stop links:
Code:
 
chmod 755 /etc/init.d/nfs
chown root:root /etc/init.d/nfs
 
cd /etc/rc.d/rc0.d
ln -s /etc/init.d/nfs K25nfs
cd /etc/rc.d/rc2.d
ln -s /etc/init.d/nfs S70nfs
cd /etc/rc.d/rc6.d
ln -s /etc/init.d/nfs K25nfs


Read http://www.phpman.info/index.php?parameter=exports&mode=man or any other exports(5) man page you can get your hands on. Create an /etc/exports file similar to the following

Code:
/mnt/hda/share <client ip>(rw,async,secure,root_squash)


Where <client ip> should be the IP address of the client you want to grant access. See the exports(5) man page for granting access to a range of clients. Make absolutely sure that there is no space between <client ip> and (rw,async,secure,root_squash), because this gives you a different, unsecure behavior (not that nfs is very secure, but ...).

Reboot the LS or start the init.d/nfs script manually

Code:
/etc/init.d/nfs start


Oh,and configure your client by editing the fstab accordingly. See the mount manual page.


Top
 Profile  
 
PostPosted: Fri Oct 20, 2006 6:03 pm 
Offline
Moderator
User avatar

Joined: Thu Apr 06, 2006 1:33 pm
Posts: 1082
Location: United States of America
Harry wrote:
I am to lazy to do a wiki entry. It roughly works as it follows:


So I put it in there for you... :) please check it and clean it up to your satisfaction :p
http://buffalo.nas-central.org/index.php?title=Get_the_Network_File_System_%28NFS%29_running#LS2_.28mips.29

_________________
-Ramuk

LinkStation HG *250 Uboot - Foonas-EM - Freelink
Kuro HG *750 Uboot - Foonas-EM - Debian Squeeze
Kuro HD *60 Uboot - Foonas-EM - Debian Squeeze (For Sale)
KuroPro *2TB Debian Lenny Armel- Kernel 2.6.26
KuroPro *1TB Debian Lenny Armel- Kernel 2.6.25.6


Top
 Profile  
 
PostPosted: Wed Nov 08, 2006 3:14 pm 
Offline
Newbie

Joined: Wed Nov 08, 2006 9:26 am
Posts: 17
Location: United Kingdom (Great Britain)
Sorry, very small brain...
Harry wrote:
Create a file /etc/init.d/nfs with the following contents:

How do I do this?


Top
 Profile  
 
PostPosted: Wed Nov 08, 2006 10:01 pm 
Offline
Site Admin
User avatar

Joined: Mon Jul 11, 2005 7:19 am
Posts: 7702
Location: Austria, Vienna
you can create a file with
Code:
vi /etc/init.d/nfs


with "i" you change to insert-mode....then you could paste everything there.
but that way you run in the problem that vi somehow kills the structure....

i personally create big scripts (if i need to cut & paste) in windows using ultraedit, save it as a unix file, move it to a share and then i move it to /etc/init.d/.....

_________________
LS1 (2.6 kernel, foonas svn1062, 750 GB, UBoot 1.2) & LS Pro (FreeLink/jtymod/GenLink, changes all the time)
Thx to all donators!


Top
 Profile  
 
PostPosted: Sun Oct 21, 2012 8:38 pm 
Offline
Total Newbie

Joined: Wed Aug 29, 2012 4:59 pm
Posts: 4
The first tar seems to have been moved so the wget command doesn't work. Does anyone know where I can get a copy?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


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 post attachments in this forum

Search for:

Protected by Anti-Spam ACP
Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group