Hi,
I'm trying to configure Transmission to download to a drive connected to my router as a NAS.
The router is a Huawei HG533 , it has some basic samba config available you can create user accounts and set them as read only or read/write also set the root folder for the user ... There's no options for a guest account or much else.
So after much reading and playing about I have the set up half working. (users and passwords have been ****'d out for obvious reasons)
To get the drive mounted manually this works, although it does prompt for a password afterwards -
Code:
sudo mount -t cifs //192.168.1.1/router /mnt/router -o user=******
So I added this to fstab to match the above
Code:
//192.168.1.1/router /mnt/router cifs username=******,password=****** 0 0
I had a few problems getting the drive to mount under xbian, one thing I have found is that it appears that you MUST include the domain parameter in the fstab file..
I have added this to /etc/fstab
Code:
//192.168.1.1/router /mnt/router cifs username=******,password=******,domain=WORKGROUP 0 0
Then I run -
It mounts fine , but on reboot it doesn't mount at all !
Anyone know of a fix for this ?
Thanks,
Stu
@
stumax
edit /etc/init/xbian-net.conf and take this first lines:
Code:
#!upstart
start on ………….
stop on started xbian-net and (net-device-up and (started gssd and started idmapd or started statd) or xbian-nowait)
change to:
("………" just means whatever is there, keep "start on" as is - important is change "stop on …." to "stop on started xbian-net")
Code:
#!upstart
start on ………….
stop on started xbian-net
report back.
Thanks mk01, I'll give this a try this evening and let you know how I get on !
Stu
Hi mk01,
Unfortunatlely it didn't do the trick
So the first few lines of xbian-net.conf looks like so, is this what you meant ?
Code:
#!upstart
nice -4
start on mountall
task
in fstab I have -
Code:
//192.168.1.1/router /mnt/router cifs username=******,password=******,domain=WORKGROUP 0 0
Thanks,
sTu
realized just now, updated the post
how I wrote it at first will not change the logic (to start and then stop). now should be ok.
Hi mk01,
OK so now I have -
Code:
#!upstart
nice -4
start on mountall
stop on started xbian-net
Same result on boot i'm afraid (not mounting)!
Thanks,
Stu
ok, can you post to pastebin:
Code:
cat /run/upstart-ev.log
tail /var/log/upstart/xbian-net.log
also what happens if you do from command line:
Code:
sudo mount -avs -t cifs
Hi there,
my results:
pastebin
Just for your info, the harddrives weren't in any form of sleep state so this doesn't seem to be a problem.
ok, got the point
change "stop on started xbian"
to
Code:
stop on started xbian-net and (net-device-up IFACE!=lo or xbian-nowait)
Hi mk01,
seems like it's still not working. I get the same errors on nzbget.
Here's the logs from the three commands.
pastebin
can you please post your xbian-update version ? i will check the source as original B2 was a bit different than i'm testing on.
and yes, the mount.nfs output "nothing was mounted" is confusing, but it because current "new" linux implementation joined nfs4 and nfs2/3 under one helper so as you use mount -a -t nfs it actually runs two programs, one for nfs4 and second for nfs2/3 . of course one will report failure, second one will succeeded . people programming it should be sometimes think rather twice (btw: me too
) )
or maybe to speed this up - can you replace your /etc/init/xbian-net.conf with this content?
Code:
#!upstart
start on started xbian-run
stop on started xbian-net and (net-device-up IFACE!=lo or xbian-nowait)
nice -6
pre-start script
splash --msgtxt="configuring network..." --percentage
net="$(printf "%b" "$(ip a | grep "state UP" | awk -F': ' '{print $2}')\n$(ifquery -la | grep -vw lo)\neth0" | sort | uniq)"
for i in $net; do start -q network-interface INTERFACE=$i IFACE=$i || :; done
end script
post-stop script
timeout 20 sh -c "while true; do timeout -k 15 -s 9 10 mount -avs -t nfs4,nfs,cifs -o wsize=65536,rsize=262144 && break; done"
[ $? -ne 124 ] || mount -aFs -t nfs4,nfs,cifs &
exit 0
end script
Looks like editing it broke my setup. At least it doesn't come up again. Have to investigate further by the time i get home.
ok now I have the feeling we are hitting two problems one maybe solved masked by the other.
can you refer to this post ?
and the linked link
http://forum.xbian.org/thread-1770-post-19570.html#pid19570
(if you have "nfs" type in fstab, the new joined mount helper is trying nfs4 first. unfortunately under some conditions can't fallback correctly. according to the last changes in man pages around nfs, stating the vers= is highly recommended).
Thanks for the updates .. I won't get chance to test this until tomorrow evening. I'll let you know how I get on!
Cheers,
Stu
So finnaly got my fingers on the box.
Adding vers=3 to the options in the fstab finally worked.
If I would have started xbian while watching the output on the screen and comparing it to the logs on the nas would have showed me 2 things:
1. Xbian isn't going through its "normal" routine. It stops at the login prompt only to start xbmc after the internal timer counted down
2. There was no attempt to mount an nfs share in the logs of the nas
Btw, I am back to the "old" Version of the xbian-net.conf
Thanks for your help and your hard work for xbian.