How do you mount an extternal usb hdd - arch on pogoplug pro

This forum is for all other ARMv5 devices

How do you mount an extternal usb hdd - arch on pogoplug pro

Postby yoda313 » Sun Jan 06, 2013 4:13 pm

Hi,

I have archlinux (alarm) installed on my pogoplug pro. I am NEW TO LINUX. I want to mount an external usb harddrive that has media files on it (a 500gb usb drive with mkv video files (h264) and pictures and such). I want it to be accessible with minidlna which is installed already.

I know there is a mount command but I don't want to do anything like accidentally format the harddrive. I just want to load the harddrive so that minidlna will be able to access the files.

I have an android tablet and a upnp app that can see my device (it shows the linux penguin and "alarm" as the name so that is my pogoplug device with minidlna on it. I have my media harddrive plugged into the back of the pogoplug and the light on the usb harddrive is on so it is connected. I just need to properly mount it so it can be read through the upnp software.

Thank you for your help.

I have done searching but I can't seem to locate a super beginners guide for something like mounting a harddrive. I saw threads about automounting but I just want to load it right now so I can get to using it. I'll worry about more advanced features later.

Thanks again.

Edit - fyi I am using PUTTY to ssh into the pogoplug (running windows vista fyi)
yoda313
 
Posts: 6
Joined: Sun Jan 06, 2013 2:15 pm

Re: How do you mount an extternal usb hdd - arch on pogoplug

Postby WarheadsSE » Sun Jan 06, 2013 4:18 pm

Find the drive:
$this->bbcode_second_pass_code('', 'cat /proc/partitions')
Mount it:
$this->bbcode_second_pass_code('', 'mkdir -p /media/something
mount /dev/sdXN /media/something')
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: How do you mount an extternal usb hdd - arch on pogoplug

Postby yoda313 » Sun Jan 06, 2013 4:27 pm

$this->bbcode_second_pass_quote('WarheadsSE', 'F')ind the drive:
$this->bbcode_second_pass_code('', 'cat /proc/partitions')
Mount it:
$this->bbcode_second_pass_code('', 'mkdir -p /media/something
mount /dev/sdXN /media/something')


Thank you again.

I am assuming (remember linux noob here) that "something" refers to the drive letter you want to assign it so I'm choosing "f" for the drive letter.

Here is what happened:

[root@alarm ~]# cat /proc/partitions
major minor #blocks name

31 0 131072 mtdblock0
31 1 14336 mtdblock1
31 2 116736 mtdblock2
8 0 1985024 sda
8 1 1983712 sda1
8 16 488386583 sdb
8 17 488383488 sdb1
[root@alarm ~]# mkdir -p/media/f
mkdir: invalid option -- '/'
Try 'mkdir --help' for more information.
[root@alarm ~]# mkdir -p /media/f
[root@alarm ~]# mount /dev/sdXN /media/f
mount: special device /dev/sdXN does not exist
[root@alarm ~]# mount /dev/sdXN/media/f
mount: can't find /dev/sdXN/media/f in /etc/fstab
[root@alarm ~]# major minor #blocks name
-bash: major: command not found

I am not sure if either the spacing in the command is incorrect or if I need to do something with sdb or sdb1. I don't know why there are two when I only have one harddrive attached (well two actually my 2gb OS memory stick but there is only one 500gb harddrive).

Thank you again for your assistance while I try to get this up and running.

Edit - doing some more googling I think its already mounted:

[root@alarm ~]# mount /dev/sdb1
mount: /dev/sdb1 is already mounted or /media/Seagate_Backup_Plus_Drive busy
/dev/sdb1 is already mounted on /media/Seagate_Backup_Plus_Drive
So now I just need to read the minidlna faqs on how to get it to point to this drive for the media files that are on it.

Thanks again.
yoda313
 
Posts: 6
Joined: Sun Jan 06, 2013 2:15 pm

Re: How do you mount an extternal usb hdd - arch on pogoplug

Postby chat1410 » Sun Jan 06, 2013 10:00 pm

It looks like you performed step 14 in the instructions:
$this->bbcode_second_pass_quote('', 'I')f you want to have your plug automount drives when they're plugged in. Install the udev rules:
pacman -Sy udev-automount


USB drives that Arch can mount with be automatically mounted using the label of the partition on said drive. If there isn't a label, the drive will be mounted as [ hd-sdX ].

If you type [ mount ] and hit enter, you'll see all the currently mounted devices with their mount points.

[edit to address some of your other points/questions]

$this->bbcode_second_pass_quote('yoda313', '[')root@alarm ~]# mkdir -p /media/f


$this->bbcode_second_pass_quote('mkdir --help', 'C')reate the DIRECTORY(ies), if they do not already exist.

The [ -p ] argument will create all parent directories, in this specific instance it's not needed (but it doesn't hurt).
This command you ran created a directory (folder) named "f" in the directory "media". Just so you know, you can name your mount point whatever you want, try to avoid spaces because they make your life more difficult. If you ever want to learn about a command, you can just add [ --help ] to the end of the root command or type [ man (command) ] to read the manual for that command.

$this->bbcode_second_pass_quote('yoda313', '[')root@alarm ~]# mount /dev/sdXN /media/f
mount: special device /dev/sdXN does not exist

Warhead did not mean "sdXN" literally, the X specifies the drive "letter", the N specifies the partition number. sda1 is the first partition of the first drive found, in OXNAS Arch (the version you're running), this will ALWAYS be the drive that contains your root file system. The next drive Arch discovers will be sdb. You don't mount drives, you mount partitions, so you'd want to mount sdb1.

If the partition wasn't already mounted, this is the proper commend that would mount your hard drive to [ /media/f ]:
$this->bbcode_second_pass_code('', 'mount /dev/sdb1 /media/f')

$this->bbcode_second_pass_quote('yoda313', 'S')o now I just need to read the minidlna faqs on how to get it to point to this drive for the media files that are on it.

As you stated, your drive is mounted at [ /media/Seagate_Backup_Plus_Drive ]. So you'd want to ensure the following line is in your /etc/minidlna.conf file:
$this->bbcode_second_pass_code('', 'media_dir=/media/Seagate_Backup_Plus_Drive')
chat1410
 
Posts: 28
Joined: Thu Nov 01, 2012 5:55 pm
Top

Re: How do you mount an extternal usb hdd - arch on pogoplug

Postby Socaltom » Tue Jan 08, 2013 4:42 am

Another easy way to see your mounts is to type "df"
This tells you the free space on each disk that is mounted
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: How do you mount an extternal usb hdd - arch on pogoplug

Postby yoda313 » Sun Jan 27, 2013 4:29 am

Thank you chat1410 and to everyone else who has helped.

I have minidlna running on startup thanks to the minidlna faq page. I also have the location of the harddrive saved in the conf file for minidlna.

However in the dlna apps I've tried on my tablet there aren't any folders available to view. I can see the linux server (alarm is what its called) but when I click to browse the folders for the media files I don't get anything.

I think I am missing some final step here.

Could it be that it just takes awhile for minidlna to index the drive? Does it scan the whole harddrive before it serves up the files? If so that will take some time as I have lots and lots of files on it (500gb drive).

I think I'll leave it on overnight and see what happens.

I can even see it on my windows pc so I know its there its just that when I click on its webpage (right click on it in the network tab - running windows vista) it pulls up and shows minidlna but there are 0 files available.

Its exciting to know that I am this close to getting it working. I must be missing something trivial or its just going to take time to load the harddrive.

Thanks again for your assistance and sorry for the delay in responding. This is the first time I've gotten back to working on this project since I started it.
yoda313
 
Posts: 6
Joined: Sun Jan 06, 2013 2:15 pm

Re: How do you mount an extternal usb hdd - arch on pogoplug

Postby chat1410 » Tue Jan 29, 2013 9:20 pm

When I setup miniDLNA I had to tell it to build the database.

Rebuild database manually - database will need to be updated every time you add a file:
$this->bbcode_second_pass_code('', 'rc.d stop minidlna
sudo -u nobody minidlna -R
(Sometime later, after the rebuild finishes)
killall minidlna
rc.d start minidlna')

Rebuild database automatically - miniDLNA watches for files in your media directory using inotify:
$this->bbcode_second_pass_code('', 'nano /etc/sysctl.conf
fs.inotify.max_user_watches = 100000
(Reboot or run [ sudo sysctl fs.inotify.max_user_watches=100000 ])')
chat1410
 
Posts: 28
Joined: Thu Nov 01, 2012 5:55 pm

Re: How do you mount an extternal usb hdd - arch on pogoplug

Postby dinjo » Wed Jan 30, 2013 5:41 am

I'm not sure about this but minidlna at times does not finds new files and at times it does it seems quite picky and i have to do a rebuild database if a file is not recognized.
dinjo
 
Posts: 258
Joined: Mon Nov 28, 2011 5:59 am

Re: How do you mount an extternal usb hdd - arch on pogoplug

Postby yoda313 » Sun Feb 03, 2013 2:44 am

Thank you chat1410 and dinjo.

It looks like I have to get SUDO installed or activated somehow on my pogo. At least when I type sudo on some commands I've seen I haven't gotten any response. I used the archlinux instructions for installing linux on pogo.

I do appreciate the assistance on minidlna.

How long does it generally take to initialize the database? I'll be using a 500gb usb drive that is mostly full with a variety of jpgs and video files (mix of mkv h264 videos and other video types).

Once I get sudo working I'll run your process.

Thanks again.

Edit - I found this link for installing sudo and it did not work just like in the original post:

or when I try to install sudo.

Code: Select all
[root@alarm home]# pacman -S sudo
resolving dependencies...
looking for inter-conflicts...

Targets (1): sudo-1.8.3-1

Total Download Size: 0.44 MB
Total Installed Size: 1.89 MB

Proceed with installation? [Y/n] y
:: Retrieving packages from core...
error: failed retrieving file 'sudo-1.8.3-1-arm.pkg.tar.xz' from archlinuxarm.org : No address record
warning: failed to retrieve some files from core

What do I do to get sudo installed?

This is from this post:
viewtopic.php?f=29&t=1851&p=10177&hilit=install+sudo#p10177

Thanks.

Edit - Ok I looked at this page:

https://wiki.archlinux.org/index.php/Sudo#Installation

But I still get an installation error.

There was a mention about not resolving nameserver but I don't know about that (mentioned in another link).

I think I"m two steps away from getting this to work. I just need to get SUDO working then I can get mindlna to initialize the database. Your assistance is appreciated.

Edit - I got SUDO installed! I did this - pacman -Syy and got it updated and was able to install sudo.

However I get a permission denied when I tried the database deal for minidlna. I am so close I can feel it now. Thanks again for any tips.

Edit - I got it working! Sort of!

I did the build database command sudo -u nobody minidlna -R
This time It did not say permission denied. However it didn't do anything. But on a whim I did killall and restarted minidlna. Then I checked my upnp app on my tablet and there were files there! There were only a few mp3 folders but I only waited a minute or two after doing the build database command.

I think i'll be able to get everything initialized properly now. I was able to play a mp3 file just fine through my upnp app on the tablet so I know it works. I just need it to load all the video, music and picture files that are on it.

Why doesn't minidlna have some sort of progress indicator while building the database? I can wait obviously but I don't know how long to wait. I guess I'll just start it and give it a couple of hours before checking again. I wish there was some kind of way to know when it was done.

This is exciting. I can't wait to play my first h264 mkv file. That is something the stock pogoplug software just wouldn't do for some damn reason (I have an original black pogoplug pro model).

Thanks again everyone :) Now I'll see if I can get it to fully load my media files on the usb harddrive.

Edit - well it looks like after leaving it on the initialize stage for over an hour I seem to have all the files accessible.

There is some buffering issues but I think its because I'm on super G (108) and not N - but I don't think the 108 is enabled so its G level for the wifi router.

I did disable the QOS thing after reading a review about speed issues - actually QOS wasn't turned on but the setting before it was so I turned that off - now I'll try again and see if I get less buffering issues.

I've looked at Best Buy and I can get a name brand wifi n router for 30.00 USD or less so I may just bite the bullet and finally upgrade my router - it is at least three or four years old or more and not an N router so it might be time.
yoda313
 
Posts: 6
Joined: Sun Jan 06, 2013 2:15 pm


Return to Community Supported

Who is online

Users browsing this forum: No registered users and 8 guests