Downloading and Greyhole

User avatar
gboudreau
Posts: 606
Joined: Sat Jan 23, 2010 1:15 pm
Location: Montréal, Canada
Contact:

Re: Downloading and Greyhole

Postby gboudreau » Fri Dec 24, 2010 5:13 pm

Make sure you have no spaces in the credential file.
The file you should be editing is: /home/your_username/.smb_credentials
And you need to make sure the /etc/init.d/mount_shares_locally file uses your_username on line 12:
username="your_username"
- Guillaume Boudreau

eldano
Posts: 60
Joined: Fri Dec 17, 2010 2:26 am
Location: The Netherlands

Re: Downloading and Greyhole

Postby eldano » Mon Dec 27, 2010 8:18 am

Ok I checked the files, can't find anything that could be wrong,

/home/your_username/.smb_credentials
username=<eldano>
password=<*my'eldano' password (not root password)*>
domain=HOME

/etc/init.d/mount_shares_locally file uses your_username on line 12
#!/bin/sh
#
### BEGIN INIT INFO
# Provides: mount_shares_locally
# Required-Start: $network $local_fs $remote_fs smb mysqld
# Required-Stop: $network $local_fs $remote_fs smb
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: mount Samba shares locally
### END INIT INFO

username="eldano"

if [ -f /etc/rc.d/init.d/functions ]; then
. /etc/rc.d/init.d/functions
fi

start () {
uid=`id -u $username`
gid=`id -g $username`

echo -n $"Mounting Samba shares locally: "
mkdir -p /mnt/samba/
cd /mnt/samba/
mysql -u root -phda -e "select comment from shares" hda_production | grep -v "^comment$" | xargs -d "\n" mk$
ls -1 | while read d; do
/sbin/mount.cifs "//127.0.0.1/$d" "$d" -o credentials=/home/${username}/.smb_credentials,uid=${uid}$
done
touch /var/lock/subsys/mount_shares_locally
success $"$base startup"
echo
return 0
}

stop () {
echo -n $"Unmounting locally mounted Samba shares: "
/bin/umount -l /mnt/samba/*
rm -f /var/lock/subsys/mount_shares_locally
success $"$base shutdown"
echo
return 0
}

restart () {
stop
start
}

case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
;;
esac

exit $?

eldano
Posts: 60
Joined: Fri Dec 17, 2010 2:26 am
Location: The Netherlands

Re: Downloading and Greyhole

Postby eldano » Mon Dec 27, 2010 8:33 am

I tried running the service again today, and I gave me a different error... I was not root while doing this;
[eldano@localhost ~]$ service mount_shares_locally start
Mounting Samba shares locally: mount error(1): Operation not permitted
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
mount error(1): Operation not permitted
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
mount error(1): Operation not permitted
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
mount error(1): Operation not permitted
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
mount error(1): Operation not permitted
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
mount error(1): Operation not permitted
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
mount error(1): Operation not permitted
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
touch: cannot touch `/var/lock/subsys/mount_shares_locally': Permission denied
[ OK ]
And when I am root it gives the error like before:
[root@localhost ~]# service mount_shares_locally start
Mounting Samba shares locally: mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
[ OK ]
Maybe this will help.

User avatar
gboudreau
Posts: 606
Joined: Sat Jan 23, 2010 1:15 pm
Location: Montréal, Canada
Contact:

Re: Downloading and Greyhole

Postby gboudreau » Tue Dec 28, 2010 11:07 am

Drop the < and >:

Code: Select all

username=eldano password=some_password domain=HOME
- Guillaume Boudreau

eldano
Posts: 60
Joined: Fri Dec 17, 2010 2:26 am
Location: The Netherlands

Re: Downloading and Greyhole

Postby eldano » Tue Dec 28, 2010 1:50 pm

Solved!
Ha, so simple! Thanks Gboudreau!

User avatar
gboudreau
Posts: 606
Joined: Sat Jan 23, 2010 1:15 pm
Location: Montréal, Canada
Contact:

Re: Downloading and Greyhole

Postby gboudreau » Tue Dec 28, 2010 2:03 pm

Fixed the wiki article to prevent other users from interpreting those as you did.
Should be clearer now.
- Guillaume Boudreau

eldano
Posts: 60
Joined: Fri Dec 17, 2010 2:26 am
Location: The Netherlands

Re: Downloading and Greyhole

Postby eldano » Tue Dec 28, 2010 2:38 pm

Good thinking, amahi targets also linux newbees like me, so the clearer the better. Thanks again.

eldano
Posts: 60
Joined: Fri Dec 17, 2010 2:26 am
Location: The Netherlands

Re: Downloading and Greyhole

Postby eldano » Wed Dec 29, 2010 3:27 am

Question about the following
Example of using Terminal to move files from one share to another, when shares are mounted locally on the HDA:
- From client computer: ssh hda
- In SSH on HDA: mv /mnt/samba/torrents/SomeThing /mnt/samba/Movies/HD/
That's it.
What I did:
[eldano@localhost samba]$ mv /mnt/samba/Torrents/SomeDirectory/ /mnt/samba/Movies/
mv: cannot remove `/mnt/samba/Torrents/SomeDirectory/Sample.mkv': Permission denied
mv: cannot remove `/mnt/samba/Torrents/SomeDirectory/file.mkv': Permission denied
mv: cannot remove `/mnt/samba/Torrents/SomeDirectory/file.nfo': Permission denied
But the directory is copied to the new location. But not removed from the torrents share. Why? I don't know.

The torrent was deleted from transmission, so was not in use
The File/directory I am copying is 13GB.
Took about 16minutes ~13MB/s

My question is: is this normal, or is something wrong on my system? My guess is that it is still going over the 100mbit router? (My router status lights were going nuts).. or can I do something to speed it up?

Thanks

User avatar
gboudreau
Posts: 606
Joined: Sat Jan 23, 2010 1:15 pm
Location: Montréal, Canada
Contact:

Re: Downloading and Greyhole

Postby gboudreau » Wed Dec 29, 2010 3:35 am

No, that is not going through the router.

The files created by Transmission in /mnt/samba/Torrents are not writable (& deletable) by your user.
For those files, you'll need to copy them from the terminal, then delete them using Transmission (delete, not just remove, which wouldn't delete the files on disk, just the torrent seeding).

To copy:

Code: Select all

cp -r /mnt/samba/Torrents/SomeDirectory /mnt/samba/Movies/
- Guillaume Boudreau

eldano
Posts: 60
Joined: Fri Dec 17, 2010 2:26 am
Location: The Netherlands

Re: Downloading and Greyhole

Postby eldano » Wed Dec 29, 2010 3:54 am

Thanks for the fast answer, man you're quick.

So that this goes so slow is normal? If I copy a file on my desktop locally of 10GB it does not even take one second.

On the server between shares an 10GB file it takes about 12 minutes. Do you have that to then on your server?? Harddrive are faster that 13mb/s right?
The whole idea of mounting shares locally is fast moving/coping of files right, and that greyhole 'sees what changes'?

Thanks again for your wisdom

Who is online

Users browsing this forum: No registered users and 5 guests