XBMC as NAS
#1
I'm not sure if there is another thread for this topic, because I don't know how to phrase an adequate query for it, so sorry if it's double.

I have a windows 7 PC booting XBMC-live 10.1 and I have connected two external USB drives to it. I would like to be able to copy to and from theses drives with my windows 7 laptop. In this way I don’t have to be home with a powered on laptop each time one of my roommates wants to watch a movie, but I can still acces my drives using my laptop.
Reply
#2
Actually pretty easy, all you need to do is set up Samba:

Just run "sudo apt-get install samba" on the xbmc-live box to make sure it's installed (dunno if it is out of the box, never used xbmc live) and have a look here:
http://wiki.xbmc.org/index.php?title=SMB#Linux

Thats should give you a basic idea where it goes, if you are scared of the command line you can download the smb.conf file using winscp/filezilla to your windows computer and edit it using a non-shitty text editor like notepad++ (windows editor/notepad won't work)

Reply
#3
turbomettwurst thanks for your reply! I finally managed to enter the right login credentials so I'm going to get right to implementing it. I´m kind of a newb so I´ll probably have some more questions if you´re ok with that^^

Ok I managed:

sudo apt-get install samba

and:

sudo nano /etc/samba/smb.conf

then I added this to smb.conf at the bottom:

[Media]
comment = Root media share
path = /media
inherit permissions = Yes
guest ok = Yes

Basically what happened is that the media root showed up in my windows laptop but I get a message saying that I still can't acces it and I should contact my netword administrator. However, I thought that "guest ok = Yes" would resolve this. Any ideas?
Reply
#4
Code:
[storage]
path = /storage
browseable = yes
read only = no

2 additional thougts:
a.) you might need to add a user, that can be done using: "smbpasswd -a <username>"
b.) you might have to change the permissions on the target directory in order to make them writable, the (non-secure, quick n dirty) way to do that is by running: "chmod -Rv 777 /path/to/the/files"

Reply
#5
Hi turbomettwurst thanks for your reply, but I can't seem to get it to work. I allready added users with a password but when I implement your code the XBMC still shows up in the network configuration of my windows 7 system, but I can no longer acces the Media share. Before, I could acces the Media share and the floppy drives that are default in the /media root, but not the two USB-HDD's that I attached to my XBMC-machine. These thow HDD show up in the /media folder and I would like to map them as network drives on my windows 7 laptop, but I'm denied permission to these drives.

[Media]
path = /media
browseable = yes
read only = no
Reply
#6
Would you be so kind to post the output of "ls -al /media" (with usb drives attached)?
Reply
#7
ls -al /media output:

total 32
drwxr-xr-x 5 root root 4096 2012-10-11 13:32 .
drwxr-xr-x 22 root root 4096 2012-10-10 17:53 ..
drwx------ 1 xbmc xbmc 4096 2012-10-09 01:07 Expansion Drive
lrwxrwxrwx 1 root root 7 2012-10-10 17:50 floppy -> floppy0
drwxr-xr-x 2 root root 4096 2012-10-10 17:50 floppy0
drwx------ 1 xbmc xbmc 16384 2012-10-09 01:06 SAMSUNG

But I got it to work! Here's the code I used:



[XBMC]
path = /home/xbmc
public = yes
guest only = yes
writable = yes
browseable = yes
force user = xbmc
inherit permissions = yes

[Media]
path = /media
public = yes
guest only = yes
writable = yes
browseable = yes
force user = xbmc
inherit permissions = yes


Thanks for all the help turbomettwurst!

Reply
#8
anytime Smile
Reply
#9
I must be missing something because he mentioned Windows PC's. Samba is built right into Windows no?
Server: Synology Diskstation 1511+ with 8x WD Red NAS 3TB drives, DSM 5.2
Main HTPC: Home Built i3, 8GB RAM, Corsair 128GB SSD, nVidia 630GTX, Harmony Home Control, Pioneer VSX-53, Panasonic VT30 65" 3D TV, Windows 10, Isengard
Bedroom HTPC: Zotac-ID 41 8GB RAM, 128GB SSD, Rii micro keyboard remote, Samsung HW-E550, Sony 32" Google TV, OpenElec 6.0 beta 4
Reply
#10
Samba is the reverse engineered open source alternative/replacement of microsofts proprietary filesharing protocol smb (which has been replaced by cifs nowadays but the name seems to stick...)
Well he wrote "I have a windows 7 PC booting XBMC-live 10.1", so i figured it's dual boot, but xbmc-live kind of implies linux Smile
Reply
#11
I've also been trying to do the same thing, but I'm running into two problems:

XBMC is XBMCBuntu (previously "live") Eden installed on a small "book-size" machine (a Foxconn NT330i Intel Atom 330 1.6GHz, dual-core).
Drives are attached by USB and networking is all by WiFi. It all works beautifully for the local TV.

I'm sharing the entire filesystem--that is to say I've got 3 physical drives each with 1 partition on it.
So, if one filesystem is labeled _Argosy and lives in /dev/sdh1, then the automount point is /media/_Argosy and I share that /media/_Argosy.
After setting up SAMBA I am able to access all 3 filesytems by WinXP and a also by CIFS in a couple of android devices.

But, I run into 2 problems:
  1. Permissions
    Many times (every time?) when XBMC reboots, all the automounted filesystems on the USB drives show up with permissions of 466 (r--rw-rw-)
    This is really strange, since a directory with the x permission turned off isn't navigable! Why would these be the default permissions for a mounted FS?
    I've tried umounting the filesystems, creating the mount points in /media (normally they are auto-created by something in XBMC), chmod 755, chown tanya.tanya * (the non-root user created when I installed XBMCBuntu Eden is "tanya") and remounting by mount -a. No dice--comes back 466.

    After mounting, chmod 755 the mount points (while mounted), and this seems to stick for a while. But later gets overwritten--back to 466 when XBMC is just sitting there--no reboot or umount/mount that I can see.
    Shotgunning everything under /media by find . -type d -exec chmod 755 {} \; doesn't help either.

    Can anyone tell me where the permissions for the automounted USB drives are specified?
    If I chmod 755 /media/_Argosy (and the other 2) then the XP box & android devices can navigate the FS--but this doesn't seem to stick!
    I would like this to stick, but I don't see any way to option for ext2 to specify permissions in /etc/fstab.



  2. Performance
    Problem 2 is performance. For a week or so everything was OK, then I started playing videos by the remote devices and they lag terribly, stop and start a lot, etc.
    Top says CPU idle is 91%, and only about 1/2 the memory seems to be used at any time.
    diskmontools says the short test passes OK (for whatever that's worth).

    Maybe this is a WiFi problem, but I kinda doubt it--there's not a whole lot of traffic on WiFi in the house and the AP is about 15 feet from the box through 1 interior wall. To rule it out, this weekend I plan to reproduce the problem, then turn of WiFi and connect XBMC by copper then test again.

    Maybe my hardware is weak? It's a pretty small computer, but the DIYNAS folks seem to say you don't need a hot-rod rig just to serve files in your house. The CPU usage seems ok, so what am I missing here--some resource I'm running out of?

    I'm really guessing here--any performance experience using XBMC-Live as a NAS would be great--even a statement that "this just ain't a good idea with XBMC".

Thanks in advance to anyone who can help out a SAMBA noob.
Reply
#12
(2012-10-13, 01:57)turbomettwurst Wrote: Samba is the reverse engineered open source alternative/replacement of microsofts proprietary filesharing protocol smb (which has been replaced by cifs nowadays but the name seems to stick...)
Well he wrote "I have a windows 7 PC booting XBMC-live 10.1", so i figured it's dual boot, but xbmc-live kind of implies linux Smile

Yeah that's that I was thinking too. What he should be doing is just running the Windows version of XBMC if he has Windows 7. SMB works perfectly fine but I've become a really big fan of NFS.

Also,

I'd recommend using a dedicated machine as a NAS. Too much can happen to ruin your library if you do it on removable drives on your main computer. Whether it be a cheap box with FreeNAS ( my personal favorite although I use a Synology Diskstation now)
Server: Synology Diskstation 1511+ with 8x WD Red NAS 3TB drives, DSM 5.2
Main HTPC: Home Built i3, 8GB RAM, Corsair 128GB SSD, nVidia 630GTX, Harmony Home Control, Pioneer VSX-53, Panasonic VT30 65" 3D TV, Windows 10, Isengard
Bedroom HTPC: Zotac-ID 41 8GB RAM, 128GB SSD, Rii micro keyboard remote, Samsung HW-E550, Sony 32" Google TV, OpenElec 6.0 beta 4
Reply

Logout Mark Read Team Forum Stats Members Help
XBMC as NAS0