Unfortunately no one can be told what fun_plug is - you have to see it for yourself.
You are not logged in.
Pages: 1
Am in the process of setting up the Funplug on a USB but when I go to copy the ffp files I keep getting:
"cp: cannot create .blah de blah .Operation not Permitted"
I am using command "cp -a /mnt/HD_a2/ffp /mnt/USB/"
Permission bits are 777 for /mnt/USB
Should I be using some other command?
thx
Tony
Last edited by flashman1207 (2009-01-12 17:00:17)
Offline
Curious if /mnt/USB is mounted. Can you post the following
lsmod #(expect to see usb-storage.ko loaded)
fdisk -l /dev/sd[cde] #(expect to see ext2 filesystem on one of the partitions)
mount #(expect to see the USB partition mounted to /mnt/USB)
If you see all good results when running the above commands then I'd "cd /mnt/USB" then "touch test_file" this will create a test file on the usb stick. To see if it's there "ls" and see if the file you just created is there.
Offline
kennedy101 wrote:
Curious if /mnt/USB is mounted. Can you post the following
lsmod #(expect to see usb-storage.ko loaded)
fdisk -l /dev/sd[cde] #(expect to see ext2 filesystem on one of the partitions)
mount #(expect to see the USB partition mounted to /mnt/USB)
If you see all good results when running the above commands then I'd "cd /mnt/USB" then "touch test_file" this will create a test file on the usb stick. To see if it's there "ls" and see if the file you just created is there.
lsmod # gives:
Module Size Used by Not tainted
usb_storage 29956 1
lltd 43072 0
usblp 10976 0
sd_mod 14484 10
fdisk -l /dev/sdc gives:
Disk /dev/sdc: 1027 MB, 1027603968 bytes
255 heads, 63 sectors/track, 124 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdc1 * 1 125 1003488 6 FAT16
Partition 1 has different physical/logical endings:
phys=(123, 254, 63) logical=(124, 237, 48)
mount gives:
rootfs on / type rootfs (rw)
/dev/root on / type ext2 (rw)
proc on /proc type proc (rw,nodiratime)
/dev/loop0 on /sys/crfs type cramfs (ro)
/dev/md0 on /mnt/HD_a2 type ext2 (rw)
/dev/md1 on /mnt/HD_b2 type ext2 (rw)
none on /proc/bus/usb type usbfs (rw)
/dev/sdc1 on /mnt/USB type vfat (rw,nodiratime,fmask=0000,dmask=0000,codepage=cp850,iocharset=iso8859-1)
devpts on /dev/pts type devpts (rw)
Device Boot Start End Blocks Id System
/dev/sdc1 * 1 125 1003488 6 FAT16
Partition 1 has different physical/logical endings:
phys=(123, 254, 63) logical=(124, 237, 48)
Did a "cd /mnt/USB" and touch file as suggested and this worked......
Have attached my usbdisk.sh
Offline
and here is my setup.sh
Offline
And here is the ffp.log (my apologies for the individual posts but I couldn't work out how to add multiple attachments...)
Last edited by flashman1207 (2009-01-13 11:28:44)
Offline
flashman1207 wrote:
fdisk -l /dev/sdc gives:
Disk /dev/sdc: 1027 MB, 1027603968 bytes
255 heads, 63 sectors/track, 124 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdc1 * 1 125 1003488 6 FAT16
Partition 1 has different physical/logical endings:
phys=(123, 254, 63) logical=(124, 237, 48)
My guess is that the file system is the problem. FAT doesn't support Linux file attributes and links. I would suggest to format your USB disk as ext2.
Offline
silversurfer wrote:
flashman1207 wrote:
fdisk -l /dev/sdc gives:
Disk /dev/sdc: 1027 MB, 1027603968 bytes
255 heads, 63 sectors/track, 124 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdc1 * 1 125 1003488 6 FAT16
Partition 1 has different physical/logical endings:
phys=(123, 254, 63) logical=(124, 237, 48)My guess is that the file system is the problem. FAT doesn't support Linux file attributes and links. I would suggest to format your USB disk as ext2.
OK, tried that using:
fdisk /dev/sdc
but get message:
Segmentation Fault
When I run:
fdisk
it shows:
BusyBox v1.12.1
is this correct? How do I fix "segmentation fault"?
Thx
Tony
Offline
OK, have downloaded "Partition Manager" and formatted the USB to ext2 using this. Then did:
mke2fs /dev/sdc1
and rebooted....
Now, is "cp -a /mnt/HD_a2/ffp /mnt/USB/" the correct command to copy everything from ffp (including links etc) to the USB?
Thx
Tony
Offline
cp -a ... command is what I used a while back when I did this. I used http://bfg100k.blogspot.com/2008/11/upg … o-usb.html as a guide.
Offline
toolbox wrote:
cp -a ... command is what I used a while back when I did this. I used http://bfg100k.blogspot.com/2008/11/upg … o-usb.html as a guide.
Somewhere I thought I read that a "cp -a" doesn't copy all Symbolic Links etc and that you should use "cp -r".... Is that true.
PS I followed that link you posted too...
Last edited by flashman1207 (2009-01-14 01:22:09)
Offline
I use cp -aR and it kept all the links for me.
Offline
If you are not sure about the options of a command, try "<command> --help". This will usually tell you the options and a description of them.
cp --help says:
root@nas:/# cp --help BusyBox v1.11.1 (2008-07-13 20:04:00 CEST) multi-call binary Usage: cp [OPTION]... SOURCE DEST Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY Options: -a Same as -dpR -d,-P Preserve links -H,-L Dereference all symlinks (default) -p Preserve file attributes if possible -f Force overwrite -i Prompt before overwrite -R,-r Recurse directories -l,-s Create (sym)links root@nas:/#
You can see that the option "-a" already includes "-d", "-p" and "-R".
Offline
silversurfer wrote:
If you are not sure about the options of a command, try "<command> --help". This will usually tell you the options and a description of them.
cp --help says:Code:
root@nas:/# cp --help BusyBox v1.11.1 (2008-07-13 20:04:00 CEST) multi-call binary Usage: cp [OPTION]... SOURCE DEST Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY Options: -a Same as -dpR -d,-P Preserve links -H,-L Dereference all symlinks (default) -p Preserve file attributes if possible -f Force overwrite -i Prompt before overwrite -R,-r Recurse directories -l,-s Create (sym)links root@nas:/#You can see that the option "-a" already includes "-d", "-p" and "-R".
Thanks, used "cp -a" and according to ffp.log its loading from USB. Damn disks keep spinning up and down every 15 mins though (same as before) so will be looking at fixing that next (Print Server is disabled, as is DHCP, UPNP, iTunes. Only thing "extra" running is FTP and a fan script).....
Thx
Offline
You can try "lsof | grep HD" to see which process has stuff opened on your disks. Usually you will see smbd there, the samba daemon.
root@nas:/# lsof | grep HD smbd 1823 root cwd DIR 8,2 4096 2 /mnt/HD_a2 smbd 1877 root cwd DIR 8,2 4096 2 /mnt/HD_a2 root@nas:/#
Samba won't bother the disks unless somebody is accessing files in one of the shares.
Your problem is usually caused by running a memory resident script/program from within /mnt/HD_... It could be your fan script but you need to check it yourself.
Offline
I am on the way to try out to get Fun Plug om a USB just to get my discs not to spin up about every 15 minutes.
It would be great to get a wiki article about this for all newbies like me. I saw this article (http://bfg100k.blogspot.com/2008/11/upg … o-usb.html) but it's would be great with a copy and paste article.
Anyone up for it, I would love to help out if I can.
Offline
silversurfer wrote:
You can try "lsof | grep HD" to see which process has stuff opened on your disks. Usually you will see smbd there, the samba daemon.
Code:
root@nas:/# lsof | grep HD smbd 1823 root cwd DIR 8,2 4096 2 /mnt/HD_a2 smbd 1877 root cwd DIR 8,2 4096 2 /mnt/HD_a2 root@nas:/#Samba won't bother the disks unless somebody is accessing files in one of the shares.
Your problem is usually caused by running a memory resident script/program from within /mnt/HD_... It could be your fan script but you need to check it yourself.
Heres the output from the lsof | grep HD_ command, there is a lot of stuff in there....... most of it is BT which i don't use. The fan control script i though was supposed to run in RAM ...
Appreciate any help here, am on holidays till 28th so won't be able to reply till then....
Last edited by flashman1207 (2009-01-18 03:22:41)
Offline
It looks like torrent is running. If you don't need it you should disable it. It looks like the fan script was started from "/mnt/HD_a2", probably by the funplug script. You need to "cd" out of "/mnt/HD_a2" before starting other scripts via funplug. It even looks like the funplug script didn't finish executing. Maybe you didn't start the fan script in the background.
This is how my funplug script starts the fan script:
cd /ffp/start ./newfancontrol & >/dev/null 2>/dev/null
The "&" is important there to start the script in the background. Otherwise funplug will keep running as long as the fan script is running.
Offline
silversurfer wrote:
It looks like torrent is running. If you don't need it you should disable it. It looks like the fan script was started from "/mnt/HD_a2", probably by the funplug script. You need to "cd" out of "/mnt/HD_a2" before starting other scripts via funplug. It even looks like the funplug script didn't finish executing. Maybe you didn't start the fan script in the background.
This is how my funplug script starts the fan script:Code:
cd /ffp/start ./newfancontrol & >/dev/null 2>/dev/nullThe "&" is important there to start the script in the background. Otherwise funplug will keep running as long as the fan script is running.
Here is my funplug script, its the latest fonz one. Pretty vanilla except the fan script bit at the end... Is it missing something????
I deleted the BT Torrent and here is the latest output from "lsof | grep HD_"
Thx
Last edited by flashman1207 (2009-01-18 13:59:46)
Offline
It is as I expected. You run the fan script from your disk and that is causing the disk access. You need to move your fan script "ctrl_fanspeed.sh" to somewhere else, the USB stick for example or at least the RAM disk and start it from there. Also you need to add the "&" to the end of the line.
The lines should look like this:
cd <path to fan script> <path to fan script>/ctrl_fanspeed.sh &
Substitute <path to fan script> by the real path. This will allow your funplug to complete and will prevent access to your disks by funplug or the fan script.
Offline
silversurfer wrote:
It is as I expected. You run the fan script from your disk and that is causing the disk access. You need to move your fan script "ctrl_fanspeed.sh" to somewhere else, the USB stick for example or at least the RAM disk and start it from there. Also you need to add the "&" to the end of the line.
The lines should look like this:Code:
cd <path to fan script> <path to fan script>/ctrl_fanspeed.sh &Substitute <path to fan script> by the real path. This will allow your funplug to complete and will prevent access to your disks by funplug or the fan script.
I added the following to the funplug script:
cp /mnt/HD_a2/ctrl_fanspeed.sh /ffp/start
cd /ffp/start
./ctrl_fanspeed.sh & >/dev/null 2>/dev/null
Attached is the output from the lsof | grep HD_ command but is the funplug still not ending?
ps -ea shows:
smbd 1758 nobody cwd DIR 9,0 4096 2 /mnt/HD_a2
smbd 1758 nobody 23r DIR 9,1 4096 6897665 /mnt/HD_b2/Media/ISO's
smbd 1758 nobody 25r DIR 9,0 4096 38518787 /mnt/HD_a2/Linux_Files/Linux stuff
fun_plug 1770 root 1w REG 9,0 431861 20 /mnt/HD_a2/ffp.log
fun_plug 1770 root 2w REG 9,0 431861 20 /mnt/HD_a2/ffp.log
fun_plug 1770 root 10r REG 9,0 1989 33570820 /mnt/HD_a2/fun_plug
rc 1883 root 1w REG 9,0 431861 20 /mnt/HD_a2/ffp.log
rc 1883 root 2w REG 9,0 431861 20 /mnt/HD_a2/ffp.log
ctrl_fans 1934 root 1w REG 9,0 431861 20 /mnt/HD_a2/ffp.log
ctrl_fans 1934 root 2w REG 9,0 431861 20 /mnt/HD_a2/ffp.log
sleep 1989 root 1w REG 9,0 431861 20 /mnt/HD_a2/ffp.log
sleep 1989 root 2w REG 9,0 431861 20 /mnt/HD_a2/ffp.log
grep 1992 root 1w REG 9,0 0 21 /mnt/HD_a2/output.txt
thx
Tony
Offline
SilverSurfer,
Thanks for your help, I don't know if the funplug is ending but my disks are no longer spinning up every 10 minutes or so.... at last !!!!!
Offline
Pages: 1