Buffalo NAS-Central Forums

Welcome to the Linkstation Wiki community
It is currently Thu Sep 18, 2014 10:39 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Buffalo Linkstation NFS
PostPosted: Sun Jun 03, 2012 11:54 am 
Offline
Total Newbie

Joined: Sun Jun 03, 2012 11:26 am
Posts: 4
Hi there everyone,

I recently bought a Linkstation Pro Quad LS-QVL and am pretty happy with the unit. Bit surprised that it does not support NFS natively. Now being a Linux platform I am sure that there is a way to enable the NFS component but in order to install NFS support I am going to need root access. I read over a few guides but still have not been able to get root access. By the looks of it SSH is enabled by default as I can establish a connection but am not able to login. So far I have performed the following:

1) java -jar acp_commander.jar -t 192.168.1.61 -ip 192.168.1.61 -pw adminpasswordhere -c "(echo newrootpass;echo newrootpass)|passwd"

2) java -jar acp_commander.jar -t 192.168.1.61 -ip 192.168.1.61 -pw adminpasswordhere -c "sed -i 's/UsePAM yes/UsePAM no/g' /etc/sshd_config"

But still no root access. I am running firmware version 1.58 if that makes any difference.

My question is has anybody successfully enabled NFS on the Linkstation Pro Quad LS-QVL and would someone be able to provide a step by step guide to get root access and install the NFS module or point me in the right direction.

Any info would be hugely appreciated


Top
 Profile  
 
PostPosted: Sun Jun 03, 2012 1:16 pm 
Offline
Moderator

Joined: Fri Jun 29, 2007 10:39 am
Posts: 2591
Use the guide for the LS-VL in our wiki.
If you use a RAID configuration, adapt the path from /mnt/disk1
to /mnt/array1 (or which array? your default share is located on).
If you don't know where your share is located on, use acp_commander
to find out (e.g. create an empty file via the following line:
"echo share > /mnt/array1/share/test.txt"
try array2, array3 as well; and look into the share, if the test.txt appears).

_________________
Please do not use private mail (PN/M) to ask questions. Use the proper forum instead. (me)

If there is no verified backup of a dataset, the dataset, by definition, is unimportant. (c't 2012)

RAID (no matter which level) never ever substitutes a backup. (me)


Top
 Profile  
 
PostPosted: Mon Jun 04, 2012 7:29 am 
Offline
Total Newbie

Joined: Sun Jun 03, 2012 11:26 am
Posts: 4
Thanks for the info,

Managed to get root access by doing the following:


1) change root password:
java -jar acp_commander.jar -t 192.168.0.10 -ip 192.168.0.10 -pw adminpasswordhere -c "(echo newrootpass;echo newrootpass)|passwd"


2) allow root to login on ssh
java -jar c:\acp_commander.jar -t 192.168.1.61 -ip 192.168.1.61 -pw adminpasswordhere -c "sed -i 's/UsePAM yes/UsePAM no/g' /etc/sshd_config"


3) execute this additional command to enable root login on ssh
java -jar c:\acp_commander.jar -t 192.168.1.61 -ip 192.168.1.61 -pw adminpasswordhere -c "sed -i 's/PermitRootLogin no/PermitRootLogin yes/g' /etc/sshd_config"


4) restart ssh service
java -jar c:\acp_commander.jar -t 192.168.1.61 -ip 192.168.1.61 -pw adminpasswordhere -c "/etc/init.d/sshd.sh restart"

I wasnt executing step 3 as it was supposed to be only for units running firmware version 1.37 or something and I was running 1.58. Turned out I still needed to execute step 3.

Still having a few problems getting NFS to run due to portmapper not running but I will keep on working on it.


Top
 Profile  
 
PostPosted: Tue Jun 05, 2012 5:51 am 
Offline
Total Newbie

Joined: Sun Jun 03, 2012 11:26 am
Posts: 4
I have noticed that the NFS guide says

You DO need the packages "portmap" and "e2fslibs" from Optware installed!

How are the above packages downloaded installed ? Do I need to install Optware on my LS-QVL prior to getting these packages or could I use apt-get to download and install the packages ? This part of getting NFS up and running is a bit sketchy and would hate to brick my linkstation.

Any info would be great.

Thanks


Top
 Profile  
 
PostPosted: Tue Jun 05, 2012 9:22 am 
Offline
Moderator

Joined: Fri Jun 29, 2007 10:39 am
Posts: 2591
You need to use Optware. There is no correct feed server for the apt stuff
on any Buffalo box.
Depending on the RAID level of your box, you should use the single box
bootstrap or the RAID bootstrap (read: terastation bootstrap).
Maybe there is guide for the LS-QVL?

_________________
Please do not use private mail (PN/M) to ask questions. Use the proper forum instead. (me)

If there is no verified backup of a dataset, the dataset, by definition, is unimportant. (c't 2012)

RAID (no matter which level) never ever substitutes a backup. (me)


Top
 Profile  
 
PostPosted: Wed Jun 06, 2012 6:13 am 
Offline
Total Newbie

Joined: Sun Jun 03, 2012 11:26 am
Posts: 4
Hey Kenatonline,

Thanks for the info so far, slowly but surely getting through it. So got NFS up and running, the only problem is that it is not starting during boot. When I execute nfs.sh manually it works fine. Similar issue to post

viewtopic.php?f=68&t=25177

I am not quite sure how to add the required line to get it to load at boot time as I am not that familiar with the rcS file. Here is the output of the rcS

Code:
#!/bin/sh

PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
export PATH

DEBUG=0
. /usr/local/lib/libmsg
. /usr/local/lib/libsys.sh

CheckDebugMode()
{
        IsDebugMode
        if [ "$?" -eq "" ] ; then
                DEBUG=1
        else
                DEBUG=0
        fi
}

exec_sh_ex()
{
        PadPrint "Starting :$1 ... "
        if [ ! -x /etc/init.d/$1 ] ; then
                echo [Skipped.]
                return 1
        fi
        if [ "${DEBUG}" = 1 ] ; then
                /etc/init.d/$1 start
                RET=$?
        else
                /etc/init.d/$1 start > /dev/null 2>&1 > /dev/null
                RET=$?
        fi

        case ${RET} in
        0)
                echo [Success.]
                ;;
        *)
                echo [Failed. ]
                ;;
        esac
}

exec_sh()
{
        echo "=== $1 ==="
        /etc/init.d/$1 start
}

cleanup_lock_files()
{
        echo "cleanup lock files..." >&2
        rm -rf /var/lock/* 2>/dev/null
}

echo "--- rcStart (hddroot) ---" > /dev/ttyS0

mount proc /proc -t proc
mount sysfs /sys -t sysfs

cleanup_lock_files

# for NFS
TMP=`grep /dev/root /proc/mounts|grep nfs`
if [ "$TMP" != "" ]; then
        echo "nfs root mode."
        /sbin/hwclock -s
fi
#
date

ldconfig
/sbin/depmod -a
UmountWithCheck /etc/pwrmgr/etc/pwrmgr
UmountWithCheck /etc/pwrmgr

echo "** step1 **"
#for cmd in checkroot.sh procps.sh devpts.sh sethostname.sh restore_config.sh free_ramdisk.sh vm_tune.sh
#do
#       exec_sh ${cmd}
#done

for cmd in /etc/rc.d/sysinit.d/S*
do
        ${cmd} start
done

echo "** step2 **"
#for cmd in EnablingAutoip.sh usb.sh hotplug.sh networking.sh update_ntp.sh syslog.sh network_control.sh inetd.sh errormon.sh kernelmon.sh miconmon.sh checkSysMd.sh start_data_array.sh set_quota.sh
#do
#       exec_sh ${cmd}
#done

#
echo "** step3 **"
for cmd in diskmon.sh ftpd.sh atalk.sh httpd.sh smb.sh clientUtil_servd.sh bonjour.sh lsprcvd.sh daemonwatch.sh cron.sh checkconfig.sh ups.sh pwrmgr.sh
do
        exec_sh ${cmd}
done

echo "** step4 **"
for cmd in lprng.sh ltbootd.sh pmcd.sh
do
        exec_sh ${cmd}
done

for cmd in /etc/rc.d/extensions.d/S*
do
        cmd_basename=$(basename $cmd)
        case $cmd_basename in
            S[[:digit:]][[:digit:]]B_*)
                echo " * Starting ${cmd_basename#S*_} in background..."
                ${cmd} start > /dev/null 2>&1 &
                ;;
            *)
                ${cmd} start
        esac
done
## for older F/W (before 1.05)
grep "schedule_no=" /etc/melco/raidscan >/dev/null
if [ $? -ne 0 ]; then
   echo -e "raidscan=off\nschedule_type=month\nschedule_week=Sun\nschedule_month=1\nschedule_start_time=2\nschedule_no=" >/etc/melco/raidscan
fi

#fin.

## fix bug #11761
if grep -q '^:' /etc/passwd; then
        perl -ni -e 'm/^:/ or print' /etc/passwd
        perl -ni -e 'm/^:/ or print' /etc/shadow
fi

## bug #22161, #22667
if grep -q "diskmon\.sh" /etc/cron/crontabs/root; then
        sed -ie "/.*diskmon\.sh.*/d" /etc/cron/crontabs/root
        /etc/init.d/cron.sh restart
fi

if ! grep -q check_smart.sh /etc/cron/crontabs/root; then
        echo '10 4 * * * /etc/cron/cron.d/check_smart.sh' >> /etc/cron/crontabs/root
        /etc/init.d/cron.sh restart
fi
exec_sh bootcomplete.sh

echo "** step final(after bootcomplete) **"
for cmd in hdd_late_check.sh check_initialization.sh usb_late_check.sh
do
        start-stop-daemon --background --start --exec /etc/init.d/$cmd -- start
done

start-stop-daemon --background --start --exec /usr/local/bin/share_delete.sh

POWER_SW_STAT=$(cat /proc/buffalo/gpio/switch/power 2>/dev/null)
AUTO_POWER_SW_STAT=$(cat /proc/buffalo/gpio/switch/auto_power 2>/dev/null)
if [[ $POWER_SW_STAT == off && $AUTO_POWER_SW_STAT == off ]]; then
        /usr/local/bin/shutdown.sh normal
fi

/usr/local/bin/hdd_raid_syncspeed.sh

# Optware setup
[ -x /etc/init.d/rc.optware ] && /etc/init.d/rc.optware start

exit 0


Any info would be great.

Thanks


Top
 Profile  
 
PostPosted: Wed Jun 06, 2012 8:31 am 
Offline
Moderator

Joined: Fri Jun 29, 2007 10:39 am
Posts: 2591
Do NOT mess with rcS.
That is not the "Buffalo way" to do this.
If you want to start own scripts, put them into the optware
startup procedure or into the "Buffalo" satrtup procedure
(which is your own script in /etc/rc.d/extensions.d).
If you don't want to use the optware procedure, do this:
Code:
ln -s /etc/init.d/nfs.sh /etc/rc.d/extensions.d/S99nfs

This assumes, you have the script nfs.sh in /etc/init.d.

_________________
Please do not use private mail (PN/M) to ask questions. Use the proper forum instead. (me)

If there is no verified backup of a dataset, the dataset, by definition, is unimportant. (c't 2012)

RAID (no matter which level) never ever substitutes a backup. (me)


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 5 guests


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