OUR NETWORK:TiVoCommunity TechLore MyOpenRouter Dijit Community MediaSmart Home See all... About UsAdvertiseContact Us

 
Learn about scoring Forum's Raw Score: 317129.0
May 11, 2009 07:04 PM

Categories: Pogoplug Drive (Linux)

Rating (0 votes)
  • 1
  • 2
  • 3
  • 4
  • 5
Rate This!

Member Avatar

chesterdkat

Member
Joined: 05/11/2009

It is possible that your Linux support is very exciting if I am understanding its features and capabilities correctly. Correct me if I am wrong, from what I have seen this Linux app allows you to add the Pogoplug drive to the fstab file so the Linux server will use it exactly as though it is physically residing in that server. Thus, I should be able to use UNIX/Linux utilities like rsync, NFS etc. to sync files from my networked computers to the USB drive that is physically connected to the Pogoplug and via the Linux box.

Is the above correct and am I "getting it"?

How about a tutorial on what needs to be done to get this going? I have a Ubuntu 8.04 64 bit server (no GUI) that I'd love to have the Pogoplug utilizing as above. I'll have some time later in the week to give this a try so I am anxiously looking forward to a decent tutorial.

Thanks...

Discussion:    Add a Comment | Comments 1-6 of 6 | Latest Comment

May 12, 2009 10:32 AM

OK, I'm starting to "get it" on the Linux support. I installed "fusefs" on my Ubuntu box then untared the Pogoplug Linux 64 application. I ran it as depicted on the download page and the drive mounted and I was able to move between the directories as root! Very cool to say the least! I can see where this has DOUBLED the value of my Pogoplug which I was already pretty pleased with. Now I just need to learn how to have my Ubuntu box mount on bootup and how to allow users (my wife & I) to have permission to connect to it. At the moment only root can connect to it.

I may have this 64 bit Ubuntu install setup and going but I am just an amateur with it's use, but I'm learning.

A pointer or two of the obvious that I need to do to make my Pogoplug available to non-root users would be appreciated!

Thanks...

May 12, 2009 1:52 PM

I personally haven't found a way to do it via fstab, simply because it's not a normal mount like an NFS or SMB mount would be.

It almost reminds me of mounting Truecrypt volumes under Linux, in which you had to run an executable to mount up the encrypted volume into the filesystem using some credentials. Kernel module took care of things behind the scenes. I think FUSE is doing the same for pogoplug behind the scenes, so it's not a normal mount in the traditional sense. There might be a way to do it, I just haven't dug deep enough (I have been able to get FUSE & NTFS-3G to mount NTFS volumes from fstab in the past).

I can offer some help though. I have created an init script that can be run at startup and will mount the pogoplug into your filesystem.

It supports most of the basic commands, like start, stop, restart, status, and condrestart (although I haven't tested condrestart).

So, for instance, under any Redhat flavored Linux distro, you can issue:

service pogoplug start

and it'll map the drive.

service pogoplug stop

will unmount it.

I haven't tested how long the mount will last without failing. But I think you can configure a package like "monit" to watch it and then issue a restart on the script if it unmounts.

You can run the script under other distro's...you'd just "cd /etc/init.d" and then run "./pogoplugfs start" instead of the RH service commands I listed above.

I'll post the script tonight when I get home and can get access to it.

May 12, 2009 3:53 PM

If you want to run pogoplugfs as a user other than root, you can use the following instructions. The first set are only setup in nature, and need only be run once. Then you can run pogoplugfs as the user you wish to own the files.

Since the source of the files comes from any number of multiple file system formats, there is no way currently to map user permissions other than the owner of the drive. The single Linux user that ran pogoplugfs will have the permissions to the files on the pogoplug that is owned by the email address on the command line.

# Add your user to FUSE group
$ sudo usermod -a -G fuse $(id -u -n)

-- log out and log back in to make sure you now have all the permissions --

# Make a mount point directory
$ sudo mkdir /media/pogoplug

# Set permissions on that mount point
$ sudo chown root:fuse /media/pogoplug
$ sudo chmod 0775 /media/pogoplug

# Launch Pogoplug
$ ./pogoplugfs --user [YOUREMAIL] --password [YOURPASSWORD] --mountpoint /media/pogoplug

-- Browse away through file manager or via another command prompt.

Answers Post May 14, 2009 4:27 PM

Heh, sorry for the delay on this one. I had to make sure it worked with "chkconfig" under RH variants. Looks like it was broken.

Save this as "pogoplug" under /etc/init.d (or wherever your distro stores init scripts). Make it executable with chmod.

For Redhat, you'll need to add it to chkconfig with

chkconfig --add pogoplug

if you want to be able to set runlevel options using that tool.

Provided you have fuse and everything else working, you should be able to issue "service pogoplug start" or "/etc/init.d/pogoplug start" and it should mount.

I'm using a /etc/pogoplugfs.conf file to store the login credentials, and have set "logseverity=15" because I like to see some of what it's doing in the log files.

Still haven't figured out how to get it to stop writing a pogoplug.log file to whatever directory it was run from. Seems to be built into the binary to do that, along with dump output to stdout. The redirects in the init script should send the stdout/stderr stuff to /var/log/pogplug.

#!/bin/bash
#
# /etc/rc.d/init.d/pogoplug
#
# Mounts the Pogoplug under /pogoplug
# make sure to create /etc/pogoplugfs.conf file
# which contains username/password and possibly other config info
# see pogoplugfs --help for more info
#
# chkconfig: 2345 90 10
# description: Pogoplug Mounter
# processname: pogoplugfs

source /etc/rc.d/init.d/functions

[ -x /usr/local/bin/pogoplugfs ] || exit 1

RETVAL=0
prog="pogoplugfs"
desc="Pogoplug Mounter"

start() {
echo "Attempting to mount Pogoplug under /pogoplug..."
/usr/local/bin/pogoplugfs --mountpoint /pogoplug >> /var/log/pogoplug 2>&1 &
sleep 3
/bin/mountpoint -q /pogoplug
RETVAL=$?
[ $RETVAL -eq 0 ] && success || failure
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
echo
}

stop() {
echo "Unmounting Pogoplug."
/bin/umount /pogoplug
RETVAL=$?
[ $RETVAL -eq 0 ] && success || failure
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
return $RETVAL
}

status() {
/bin/mountpoint /pogoplug
return $?
}

case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
RETVAL=$?
;;
status)
status
;;
condrestart)
[ -e /var/lock/subsys/$prog ] && restart
RETVAL=$?
;;
*)
echo $"Usage: $0 {start|stop|restart|status|condrestart}"
RETVAL=1
esac

exit $RETVAL

Answers Post May 15, 2009 11:22 PM updated: May 15, 2009 11:23 PM

Ok, here is the script you want to drop as pogoplug into /etc/init.d on an Ubuntu 9.04 system. So far it seems to do fine with sudo /etc/init.d/pogoplug

No warranties
============= CUT HERE ==============
#!/bin/bash
### BEGIN INIT INFO
# Provides: pogoplug
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Pogoplug mounter
# Description: Pogoplug mounter.
### END INIT INFO

PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="Pogoplug mounter"
NAME=pogoplugfs

[ -x /usr/local/bin/pogoplugfs ] || exit 1

RETVAL=0

# Define LSB log_* functions.
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
. /lib/lsb/init-functions

start() {
echo "Attempting to mount Pogoplug under /media/pogoplug..."
/usr/local/bin/pogoplugfs --fuseopts allow_other --mountpoint /media/pogoplug >> /var/log/pogoplug 2>&1 &
sleep 3
/bin/mountpoint -q /media/pogoplug
RETVAL="$?"
[ $RETVAL = 0 ] && return 0
echo
[ $RETVAL = 0 ] && touch /var/lock/subsys/$NAME
echo
}

stop() {
echo "Unmounting Pogoplug."
/bin/umount /media/pogoplug
RETVAL="$?"
[ $RETVAL = 0 ] && return 0
echo
[ $RETVAL = 0 ] && rm -f /var/lock/subsys/$NAME
return $RETVAL
}

status() {
/bin/mountpoint /media/pogoplug
return $?
}

case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
RETVAL=$?
;;
status)
status
;;
condrestart)
[ -e /var/lock/subsys/$NAME ] && restart
RETVAL=$?
;;
*)
echo $"Usage: $0 {start|stop|restart|status|condrestart}"
RETVAL=1
esac

exit $RETVAL

May 16, 2009 8:17 AM

Hopefully I can get some time at home to get this going.

Thanks so much for the comprehensive help!

Discussion:    Add a Comment | Back to Top | Comments 1-6 of 6 | Latest Comment

Add Your Reply

(will not be displayed)

Email me when comments are added to this thread

 
 

Please log in or register to participate in this community!

Log In

Remember

Not a member? Sign up!

Did you forget your password?

You can also log in using OpenID.

close this window
close this window