obarthelemy
Posts: 1399
Joined: Tue Aug 09, 2011 10:53 pm

Re: [alpha tutorial] NAS, Torrent and DLNA headless server

Mon Oct 17, 2011 6:52 am

Ok. I'm almost finished with setting up just that on a arm-based Hercules eCafe EX HD. Though the eCafe uses Ubuntu while the Pi should mainly un Debian, most stuff should be very similar. The eCafe works very satisfactorily, using about 10% of CPU (Cortex A8@800MHz) and 50k of RAM at full load. So...

The server is designed to run screenless/keyboardless after setup. It'll boot to a console, and auto-run all required software. Files are assumed to be on an external, mechanical HD.

List of stuff to do and install

OS: Debian, console mode. We'll Probably keep X11 around because it'll be on the SD images, it's impossible to remove it without breaking apt-get, and even on a 2GB SD we'll have spare space.

Console software:
- samba, to share drives with Windows PC both ways
- ssh, to remote connect to a console from Windows
- transmission-daemon, for torrents, controlled via the web or the console.
- miniDLNA, a non-transcoding, very light DLNA server.

Utilities:
- htop, fun list of stuff that's running
- links2, because the web is so much better in text mode
- mingetty, for autologin (not sure)
- pastebinit, for when you need help
- backup script, for the data drive and the system SD

Optional Extras:
- a build environment to compile miniDLNA, though I'm sure binaries will be available shortly after the Pi is released, if not before
- X11, expecially if you have no other Linux PC, for gparted. Also, gives access to a "true" browser. Text-based links2 is funny, but not very practical
Those 2 are convoluted to install, so we'll not cover them here.

obarthelemy
Posts: 1399
Joined: Tue Aug 09, 2011 10:53 pm

Re: [alpha tutorial] NAS, Torrent and DLNA headless server

Mon Oct 17, 2011 6:52 am

1- OS Install :Starting off the Official OS image, we need to
1a- run the Flash optimizations listed in http://www.raspberrypi.org/?pa.....#038;t=607. Aligning partitions and turnig jounalling off requires another Linux PC since you can't do it on the boot SD. The rest Just works
1b- stop X11 from auto-launching
1c- user autologin and autorun
/etc/init/tty*.conf -> mingetty --autoload olivier (Upstart ?)

1d- prepare our data HD

2- installing and configuring Samba.
2a- mount parameters
mount -t cifs //192.168.0.9/SRVITXDATA /mnt/itx -o auto,rw,noatime, nodiratime,username=olivier,pasword=hihihi,iocharset=utf8 0 0
2b- config file: /etc/samba/smb.conf (!!)
[global]
netbios name = ecafe
server string = ecafe
guest ok = yes
security = share
[data]
path = /data
writable = yes

3- Transmission-daemon: /home/user/.config/transmission-daemon/settings.json

4- miniDLNA
4a-
4b- config file: /etc/minidlna.conf

5- Backup
5a- System SD: requires a Linux system that does not boot it (2nd SD card reader + bigger boot card; 2nd Linux PC with SD card reader). tar on both partitions.
5b- data HD: rsync.


Nick Scott
Posts: 13
Joined: Fri Oct 07, 2011 11:17 pm
Location: Christchurch, New Zealand
Contact: Website

Re: [alpha tutorial] NAS, Torrent and DLNA headless server

Tue Oct 18, 2011 6:44 pm

Just a thought, might be worth looking rsync on to it, might as well use it to store backups on aswell, (and I find rsync is an incredibly useful way of doing backups).

obarthelemy
Posts: 1399
Joined: Tue Aug 09, 2011 10:53 pm

Re: [alpha tutorial] NAS, Torrent and DLNA headless server

Wed Oct 19, 2011 1:22 am

Yep. almost as good as xxcopy ^^

HansH
Posts: 214
Joined: Mon Sep 05, 2011 7:49 am

Re: [alpha tutorial] NAS, Torrent and DLNA headless server

Sat Jan 07, 2012 10:54 am

Perhaps its worth looking at Voyage Linux, just what kind of packages its using and how its setup  ( http://linux.voyage.hk )

Voyage Linux is an embedded debian based distro for use on soekris, alix/wrap boards

Works like a charm on flash and it requires very little filespace 200 MB - 500 MB

Been running your kind of configuration (minidlna,ssh,..)  inside 38 MB memory ...

I have also a nginx webserver and a python davserver running on it

I use  memory to mount tmpfs as a ramdisk, so I can do some fileactivity in ram instead on flash.  My / filesystem is mounted ro

Use a secondary usb flash drive for backup

So now we wait for a Pi ...

rovr138
Posts: 2
Joined: Thu Nov 03, 2011 1:36 am

Re: [alpha tutorial] NAS, Torrent and DLNA headless server

Sun Jan 15, 2012 3:57 pm

I have something a project like this planned once I buy the RaspberryPi.

I was thinking on using rtorrent combined with rutorrent or rtGui to access it via web, but that would mean I need to install Apache or lighthttpd.

For transfering files instead of Samba, I'm leaning more towards NFS. I read this, http://wdtvforum.com/main/index.php?topic=5393.0 , article some time ago. It's a comparison of FTP, NFS, SMB, and SSH. (NFS @72.8819 Mb/s, FTP @ 26.2575 Mb/s, SMB 20.7123 Mb/s, SSH 16.0952 MB/s)

Warringer
Posts: 56
Joined: Tue Aug 23, 2011 5:04 pm

Re: [alpha tutorial] NAS, Torrent and DLNA headless server

Sun Jan 15, 2012 4:06 pm

obarthelemy said:


1a- run the Flash optimizations listed in http://www.raspberrypi.org/?pa.....#038;t=607. Aligning partitions and turnig jounalling off requires another Linux PC since you can"t do it on the boot SD. The rest Just works


Broken link due to new forum software.

Return to “Other projects”