Samba and minidlna on pogoplug

This forum is for all other ARMv5 devices

Samba and minidlna on pogoplug

Postby megazal » Sun Mar 24, 2013 5:26 pm

Hi!
I've just installed ArchLinux on my pogoplug based on guide for pogoplug pro/video/v3 and everything went fine. Unfortunately I'm noob in linux... The only 2 things I want to make with my pogo is to run samba and minidlna to share my media for other devices in my home: tv, raspberry pi (xmbc), laptop, ps3 and android phone. Therefore I will be thankful for your help.
1. Firstly a little question about this text from installation guide "Upstream Arch Linux has dropped support for initscripts going forward. This leaves the Oxnas based devices in a state of limbo. The current kernel..." - should I avoid updating my arch linux (or maybe it is updating automatically)? I didn't use command "pacman -Syu" so far.
2. "If you want to have your plug automount drives when they're plugged in. Install the udev rules: pacman -Sy udev-automount". I installed it but i don't know if now every usb drive is automatically mounted after pluging it to pogo? If yes: is this service is working still after rebooting pogo or should I start it again?
3. How to check names of my drives (to use them in config files of samba, minidlna etc.)?
4. I tried to install samba according to http://obihoernchen.net/wordpress/770/plug_computer_arch_linux/. I installed it with "pacman -Sy minidlna" but I have problem with second step "systemctl enable minidlna". It gave me result "Operation failed: Invalid argument". I realized that also other commands from this page are not working, e.g. hostnamectl or timedatectl resulted with "Failed to get D-Bus connection: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory". I suppose that it is connected with systemd which I read something about but I am not sure. Maybe you can tell me what should I do to install this apps according to mentioned guide? Maybe I should replace some commands with other ones? Or maybe you can give me links to better (up to date) guides?
I will be really grateful for help!

***Edited
Ok, I've found that using "fdisk -l" I can check disks list. Normally there is only "/dev/sda1" with system, when I pluged additional pendrive there is also "/dev/sdb1". Does it mean that this additional disk is already mounted? And second question - can I just remove it from pogoplug or should I use any safe method like in Windows?
megazal
 
Posts: 9
Joined: Sun Mar 24, 2013 5:02 pm

Re: Samba and minidlna on pogoplug

Postby Socaltom » Sun Mar 24, 2013 7:23 pm

$this->bbcode_second_pass_quote('megazal', 'H')i!

1. Firstly a little question about this text from installation guide "Upstream Arch Linux has dropped support for initscripts going forward. This leaves the Oxnas based devices in a state of limbo. The current kernel..." - should I avoid updating my arch linux (or maybe it is updating automatically)? I didn't use command "pacman -Syu" so far.


On the oxnas devices ( Pro/Video/V3) don't run Pacman -Syu. It will try and update the system to a state that isn't compatible. You can update individual programs ( samba etc) with Pacman -Sy samba and it will update that particular system to the current version. However, unless something is broken, then I recommend not updating. Often updating breaks something that you will have to troubleshoot.

$this->bbcode_second_pass_quote('megazal', '
')2. "If you want to have your plug automount drives when they're plugged in. Install the udev rules: pacman -Sy udev-automount". I installed it but i don't know if now every usb drive is automatically mounted after pluging it to pogo? If yes: is this service is working still after rebooting pogo or should I start it again?


the automount rules will continue after a reboot, but udev won't automount NTFS drives, but ext 2, 3, and 4 will be fine.


$this->bbcode_second_pass_quote('', '3'). How to check names of my drives (to use them in config files of samba, minidlna etc.)?


There are several ways, my favorite is "df". It lists the name of the drive, the space used on the drive and the original device name.



$this->bbcode_second_pass_quote('', '4'). I tried to install samba according to http://obihoernchen.net/wordpress/770/plug_computer_arch_linux/. I installed it with "pacman -Sy minidlna" but I have problem with second step "systemctl enable minidlna". It gave me result "Operation failed: Invalid argument". I realized that also other commands from this page are not working, e.g. hostnamectl or timedatectl resulted with "Failed to get D-Bus connection: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory". I suppose that it is connected with systemd which I read something about but I am not sure. Maybe you can tell me what should I do to install this apps according to mentioned guide? Maybe I should replace some commands with other ones? Or maybe you can give me links to better (up to date) guides?


The guides have been updated, and that is the problem, the oxnas systems are using a legacy kernel without systemd.
to start minidlna try
$this->bbcode_second_pass_code('', '/etc/rc.d minidlna start')

if the daemon file has been removed from the package you may get an error message.

For samba try

$this->bbcode_second_pass_code('', '/etc/rc.d/samba start')

$this->bbcode_second_pass_quote('', '*')**Edited
Ok, I've found that using "fdisk -l" I can check disks list. Normally there is only "/dev/sda1" with system, when I pluged additional pendrive there is also "/dev/sdb1". Does it mean that this additional disk is already mounted? And second question - can I just remove it from pogoplug or should I use any safe method like in Windows?
[/quote]

fdisk will list partitions, mounted or not.
Partitions like /dev/sdb1 will automount to /media/hd-sdb1
If you label the partition ( look up "e2label") it will mount to /media/What_Ever_you_labeled_the_partition

Hope that helps
Tom
used to be owned by me
Pink Pogo V2, Black Pogo V3, Zyxel NAS 325 v1,
used to be Adminstrator for
Goflex net, Black V3, Black V2
Now I have a couple of raspberry pi ( 3+ and 4)
Socaltom
 
Posts: 571
Joined: Thu Apr 07, 2011 2:21 pm
Location: The left side
Top

Re: Samba and minidlna on pogoplug

Postby megazal » Sun Mar 24, 2013 8:14 pm

Thank you for help! I can start minidlna with your command :-) But I'm still not sure about usb drives. When I connect pendrive formated on Windows I have such information:

1. with fdisk -l:
Disk /dev/sda: 2003 MB, 2003828736 bytes, 3913728 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc3072e18

Device Boot Start End Blocks Id System
/dev/sda1 10 3913599 1956795 83 Linux

Disk /dev/sdb: 4008 MB, 4008706048 bytes, 7829504 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sdb1 32 7829503 3914736 b W95 FAT32

2. with df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 1926024 925140 903048 51% /
/dev/root 1926024 925140 903048 51% /
devtmpfs 62632 0 62632 0% /dev
run 62704 192 62512 1% /run
shm 62704 0 62704 0% /dev/shm
/dev/sdb1 3907088 627236 3279852 17% /media/hd-sdb1

I don't know if this pendrive is already mounted. If not could you tell me how to mount it in easy way?

And two more questions:
How to automatically start apps (like minidlna) after system reboot? Should I edit any confog file?
How to see list of files and directories which are in current directory. I tried with "dir" command but it doesn't give any effect.
megazal
 
Posts: 9
Joined: Sun Mar 24, 2013 5:02 pm

Re: Samba and minidlna on pogoplug

Postby Geoff » Mon Mar 25, 2013 4:14 am

$this->bbcode_second_pass_quote('megazal', '
')How to automatically start apps (like minidlna) after system reboot? Should I edit any confog file?

If you tried "rc.d app-name" and that worked ok, then you can just add the app-name to the end of the DAEMONS variable in /etc/rc.conf and it should start up and shut down automatically. If "rc.d app-name" didn't work then look here for clues.
Geoff
 
Posts: 231
Joined: Wed Mar 09, 2011 5:14 pm
Top

Re: Samba and minidlna on pogoplug

Postby Socaltom » Mon Mar 25, 2013 1:04 pm

The pen drive is mounted as /media/hd-sdb1


to list contents of a directory type ls -l

Here is a list of Linux commands
http://ss64.com/bash/


To mount a drive the command is

Mount /dev/sdx# /(where ever you want to mount it)
For example. Mount /dev/sdb1. /media/movies


However the mount location must exist first.
mkdir /media/movies Will make the mount point
Tom



Tom
used to be owned by me
Pink Pogo V2, Black Pogo V3, Zyxel NAS 325 v1,
used to be Adminstrator for
Goflex net, Black V3, Black V2
Now I have a couple of raspberry pi ( 3+ and 4)
Socaltom
 
Posts: 571
Joined: Thu Apr 07, 2011 2:21 pm
Location: The left side

Re: Samba and minidlna on pogoplug

Postby megazal » Mon Mar 25, 2013 10:39 pm

Hi again

I think I can run minidlna but unfortunately i cannot see any files. Below I explain all steps I made and problems I found trying to run it correctly:

1) I formated usb drive (pen 8gb) with ext2 system (under ubuntu live version), called it Test, created directories and copied there some files according to below scheme:
/Films/film.avi
/Music/Album1/(a lor of mp3 files)
/Music/Album2/(a lor of mp3 files)

2) I plug this pendrive into pogoplug

3) after "fdisk -l" I have such effect:
Device Boot Start End Blocks Id System
/dev/sdb1 63 15654239 7827088+ b W95 FAT32
Why it is recognized as W95 FAT32 (In Win 8 this pen is unrecognizable)?

4) after "df" command I can see following info:
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 1926024 925180 903008 51% /
/dev/root 1926024 925180 903008 51% /
devtmpfs 62632 0 62632 0% /dev
run 62704 192 62512 1% /run
shm 62704 0 62704 0% /dev/shm
/dev/sdb1 7704136 896592 6416192 13% /media/Test
I can cd into /media then Test and its directories and see files with "dir" command.

5) With "nano /etc/minidlna.conf" I edited conf file - I added two lines:
media_dir=V,/media/Test/Films
media_dir=A,/media/Test/Music

6) When I started minidlna by "/etc/rc.d/minidlna start" I got following comment:
:: Starting minidlna [BUSY]
[2013/03/25 17:27:48] minidlna.c:475: error: Media directory "/media/Testowy/Filmy" not accessible! [Permission denied]
[2013/03/25 17:27:48] minidlna.c:475: error: Media directory "/media/Testowy/Muzyka" not accessible! [Permission denied]
daemon(): Permission denied [DONE]

7) Despite of above mentioned errors minidlna was working because it was visible in Win 8 and also in my TV set (without any files, only with empty default directiories like Music, Video, Pictures and them subdirectories)

8) I tried to find something in Internet and now I suppose that default user of minidlna (nobody) doesn't have correct permissons. Therefore I edited other conf with "nano /etc/conf.d/minidlna" and changed INIDLNA_USER=nobody to INIDLNA_USER=root

9) Now it runs without mentioned minidlna.c:475: errors but still cannot see any files through Win 8 or TV set and I don't have any idea why and what should I do...
10) I tried to add line "db_dir=/var/cache/minidlna" in /etc/minidlna.conf but it hasn't changed anything.

11) I'm also not sure if running minidlna as a root is ok.

I will be very thankful for any help and suggestions!
megazal
 
Posts: 9
Joined: Sun Mar 24, 2013 5:02 pm

Re: Samba and minidlna on pogoplug

Postby megazal » Sat Mar 30, 2013 11:07 am

Please help me :-)

I can already run minidlna without any errors using nobody user. I used chmod command to 777 all directories and files, I also used chown command to change user and group of all files on my pendrive with media to nobody (previously both were 999). Then I met next error "deamon(): Permission denied". So I have found in Internet that I should a line:
SUBSYSTEM=="mem", KERNEL=="null|zero|full|random|urandom", MODE="0666"
to /usr/lib/udev/rules.d/50-udev-default.rules in the # mem section and reboot. I did it and now I can run minidlna without errors. The problem is that I still have the same situation - I can see multimedia server called "alarm: nobody" in all my devices (laptop, PS3, TV) but I cannot see any files there. I also cannot see any subdirectories of my pendrive, even these ones that I made with mkdir command directly in pendrive connected to pogoplud (via ssh).
My pendrive is mounted in /media/PendriveName so I used in /etc/minidlna.conf a lot of combinations of "media_dir=/media/PendriveName" with A, V letter and with subdirectories of my pendrive but nothing has changed. I don't have any idea what to do. The only things I can imagine but unfortunately cannot do are:
- adding nobody user to my system
- chmod /media to 777
- mount my pendrive in other way ot into other directory
megazal
 
Posts: 9
Joined: Sun Mar 24, 2013 5:02 pm

Re: Samba and minidlna on pogoplug

Postby Socaltom » Sat Mar 30, 2013 2:45 pm

Did you follow the instructions here to rebuild the DB?
https://wiki.archlinux.org/index.php/MiniDLNA
used to be owned by me
Pink Pogo V2, Black Pogo V3, Zyxel NAS 325 v1,
used to be Adminstrator for
Goflex net, Black V3, Black V2
Now I have a couple of raspberry pi ( 3+ and 4)
Socaltom
 
Posts: 571
Joined: Thu Apr 07, 2011 2:21 pm
Location: The left side

Re: Samba and minidlna on pogoplug

Postby megazal » Tue Apr 02, 2013 6:30 pm

Thanks for help! I checked my configs one more time, deleted all files from cache and log directories and also increased inotify watches and now minidlna works :-)

Now I'm trying to run samba. Unfortunately I didn't have samba in /etc/rc.d. I made this file according to http://archlinuxarm.org/forum/viewtopic.php?f=29&t=4970. When I type "rc.d start samba" I have following comments:
/usr/sbin/smbd: /usr/lib/libc.so.6: version `GLIBC_2.17' not found (required by /usr/sbin/smbd)
/usr/sbin/nmbd: /usr/lib/libc.so.6: version `GLIBC_2.17' not found (required by /usr/sbin/nmbd)
Using commad "pacman -Sy samba" (but not installing it) I have following info:
warning: samba-3.6.13-1 is up to date -- reinstalling
So I think I have samba-3.6.13-1. I tried to find samba-3.6.11-4-arm on the internet to download it and install from disk but without any success. I'm not sure if installing this older version will solve my problems but currently I don't have any other idea how to win against these GLIBC_2.17 errors. Is there any chance to run samba on my pogo?
megazal
 
Posts: 9
Joined: Sun Mar 24, 2013 5:02 pm

Re: Samba and minidlna on pogoplug

Postby Geoff » Wed Apr 03, 2013 2:50 am

It sounds like you just need to "pacman -Syu" again so that your glibc and everything else will be up to date.
Geoff
 
Posts: 231
Joined: Wed Mar 09, 2011 5:14 pm

Next

Return to Community Supported

Who is online

Users browsing this forum: No registered users and 7 guests