Linux [XBMCbuntu] Cannot write to network disk
#1
I have just upgraded my Revo 3610 from an XBMC Standalone setup to XBMCbuntu and I am having problems with mounting my network drive successfully:

I have read everything I could get my hands on about this subject and also posted in the Ubuntu Forums for help but no advise gotten yet.

My /etc/fstab looks like this:

Code:
#Root File System
UUID=61c36f6b-dea2-4d26-ba5b-47089320e032 / ext4 discard,noatime,nodiratime,defaults 0 1
#Swap Partition
UUID=75381868-39a1-4d07-99c1-51d2af642c1e swap swap sw 0 0
#Mount /tmp to RAM
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
#Mounting FREECOM (network drive)
#//192.168.1.2/PUBLIC /media/PUBLIC cifs credentials=/home/xbmc/.smbcredentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
#//192.168.1.2/PUBLIC /media/PUBLIC  cifs    username=xbmc,password=xbmc,file_mode=0777,dir_mode=0777 0  0
#//192.168.1.2/PUBLIC /media/PUBLIC smbfs username=xbmc,password=xbmc 0 0
#//192.168.1.2/PUBLIC /media/PUBLIC cifs username=xbmc,password=xbmc,nounix 0 0
#//192.168.1.2/PUBLIC /media/PUBLIC cifs rw,_netdev,user=xbmc,password=xbmc,uid=1000,gid=1000,file_mode=0777,dir_mode=0777 0 0

When I navigate to /media/PUBLIC after using any of the commented-out options above I can see my files, I can even delete files BUT... if I try to copy a file (Example: $ cp /home/xbmc/30\ Rock.S01E01.Pilot.avi /media/PUBLIC/) The command-line freezes. If I then browse to the network share on my windows PC I can see the file "30 Rock.S01E01.Pilot.avi" on the drive but it has a tiny filesize. eg: 239KB. (I have waited long periods and this size will not increase). The XBMC box also stalls on shutdown if it has gotten stuck copying.

The network drive works perfectly on my Windows PC, I can copy large files of any type to and from it. Also the Network-Drive's own file check returned no errors.

Also If I comment-out all fstab lines for Network Drive and just navigate to the drive in pacman (XBMCbuntu filemanager) with
Code:
smb://192.168.1.2/PUBLIC
everything works perfectly.

Its driving me mad,

Any suggestions welcome!!

Any Ideas at all, Please!!
Image
Reply
#2
try this line in fstab:
Code:
//192.168.1.2/PUBLIC /media/PUBLIC cifs username=xbmc,password=xbmc,users,uid=xbmc 0 0
adjust user and pass if necessary

then post the output of this:
Code:
cd  /media/PUBLIC
ls -la
touch test
rm test

if the above works, but you are still having problems copying large files you might have a problem with your network driver.
Reply
#3
I added the above line to fstab and restarted my machine.

(2012-04-19, 15:05)wsnipex Wrote: then post the output of this:

So, obviously nothing unusual for the start:
Code:
xbmc@Sauron:~$ cd /media/PUBLIC/
xbmc@Sauron:/media/PUBLIC$ ls -la
total 288864
drwxr-xr-x 1 xbmc root         0 2012-04-04 00:06 BackUp
drwxr-xr-x 1 xbmc root         0 2010-03-15 00:27 Files
-rwxr-xr-x 1 xbmc root 195075930 2012-02-26 12:37 Half-Life_Portable.rar
-rwxr-xr-x 1 xbmc root 100720097 2010-02-01 14:02 killa.sampla.x264.mkv
drwxr-xr-x 1 xbmc root         0 2010-01-11 20:16 Mount FREECOM.app
drwxr-xr-x 1 xbmc root         0 2010-01-11 20:36 Movies
drwxr-xr-x 1 xbmc root         0 2010-02-02 20:22 Other Videos
drwxr-xr-x 1 xbmc root         0 2012-04-01 18:33 Photos
drwxr-xr-x 1 xbmc root         0 2010-01-12 00:25 TV Shows
xbmc@Sauron:/media/PUBLIC$ touch test
xbmc@Sauron:/media/PUBLIC$ rm test
xbmc@Sauron:/media/PUBLIC$

All looks OK but when I test moving a file (using a different file this time just incase)
Code:
cp ~/Torrents/Completed/TV/The.Big.Bang.Theory.It.All.Started.With.A.Big.Bang.HDTV.x264-TLA.mp4 /media/PUBLIC/

Everything freezes as before.... same tiny file size (804KB this time) seen on the Network Drive with my Windows PC.
Also if I open another terminal I cannot even
Code:
cd /media/PUBLIC
it just freezes also.

Are there any logs I could provide to help debugging this, would dmesg help at all?

I though myself fairly OK with linux, but everytime I feel comfortable in the commandline something happens I cannot explain!!

Thanks for any help!!
The Capt.
Image
Reply
#4
so the mount is working. this must be something different.
is the internet connection working normally?
can you copy files _from_ the NAS to your xbmc?


try to ping your NAS for 3 min and see if there is packet loss:

Code:
ping 192.168.1.2

also try to ping google:

Code:
ping google.com

if you get packet loss post the output of this:
Code:
ifconfig -a
lspci
lsmod | grep 816
Reply
#5
Using the same fstab line you suggested:

Transferring _from_ the NAS worked perfectly.

Code:
cp /media/PUBLICI/TV\ Shows/Game\ Of\ Thrones/Season\ 1/Game\ Of\ Thrones.S01.E01.mp4 ~/
No freezes, file transfers perfectly, no problems.

After 5 mins of
Code:
ping 192.168.1.2

I got
Code:
463 packets transmitted, 463 received, 0% packet loss, time 461996ms

and after
Code:
ping google.com

I got
Code:
437 packets transmitted, 437 received, 0% packet loss, time 440811ms

So no problem there that I can see.

Any thing else I can try?
Image
Reply
#6
hmm strange. Maybe check logs on the NAS and on xbmc /var/log/samba/* and /var/log/syslog
Reply
#7
in /var/log/syslog I found the following

Code:
Apr 19 21:11:08 Sauron kernel: [    5.058486] CIFS VFS: Error connecting to socket. Aborting operation
Apr 19 21:11:08 Sauron kernel: [    5.078546] CIFS VFS: Error connecting to socket. Aborting operation
Apr 19 21:11:08 Sauron kernel: [    5.081292] CIFS VFS: cifs_mount failed w/return code = -101
Apr 19 21:11:08 Sauron kernel: [    5.092403] CIFS VFS: cifs_mount failed w/return code = -101

does that mean anything to you?

I saw nothing of interest in the other log files (I think anyway!!)
Image
Reply
#8
I suppose the network is not yet up when fstab get called.
can you try to mount manually when the system is up?

Code:
sudo mount -t cifs //192.168.1.2/PUBLIC /media/PUBLIC -o username=xbmc,password=xbmc,users,uid=xbmc

if this works, you might have to delay the mounting e.g. by putting this command in /etc/rc.local instead of fstab
Reply
#9
(2012-04-20, 18:26)wsnipex Wrote: if this works, you might have to delay the mounting e.g. by putting this command in /etc/rc.local instead of fstab

This did not work, to be honest I didn't expect it to because the drive must be mounted if I can list its contents.

I am going to clear my syslog, reboot with the line still in fstab and check again for errors. It might be trying to unsuccessfully connect while the network is starting up, but it must get there if the drive is mounted after boot.

What I still just cannot figure out is if the drive looks correctly mounted, why the hell cant I transfer files of any decent size _to_ the drive!!??

Thanks for all this help by the way!, any other Ideas at all??

Could it be network driver problems?
(Acer connected by LAN to router, same with Network Drive)

Thanks

Image
Reply
#10
OK so I cleared syslog, restarted my machine with the fstab line in place and here is my syslog and also the exact list of commands I did to test everything:

My Commandline History:
here

My corresponding syslog:
here

Any ideas?

Just thought two sets of eyes looking through this is beter than one!!

Thanks again
Image
Reply
#11
Had to give up on this because I just could not figure it out.

It works exactly as expected on a Ubuntu Live USB, but just will not work on XBMCbuntu.

Mounting with gvfs-mount works perfectly, but that depends on a desktop loading so it is no solution (cannot put it in fstab or /etc/init.d/). Ended up just connecting the drive by USB and sharing it through Samba on the XBMCbuntu box.

I even reinstalled the entire system from a new XBMCbuntu iso and still broken.

Thanks for the help anyway.
Image
Reply

Logout Mark Read Team Forum Stats Members Help
[XBMCbuntu] Cannot write to network disk0