Re: [PLUG] Indecipherable rsync error message SOLVED

2018-09-29 Thread Tomas K
Try hdparam to control sleep time.

Here is Ubuntu link:
https://askubuntu.com/questions/39760/how-can-i-control-hdd-spin-down-t
ime

If that does not work, and you cannot change your DAS settings, you
might need to look at powertop to check if your USB is not going to
sleep.

Synology NAS have settings to set disk sleep timer. It is a great way
to prolong disk life and reduce heat and noise. By default it is off.
 
Tomas

On Sat, 2018-09-29 at 16:16 -0700, John Jason Jordan wrote:
> On Sat, 29 Sep 2018 14:28:43 -0700
> Tomas K  dijo:
> 
> > It appears that you either did not have the directory mounted or it
> > was
> > in power saving mode (disks spun down, etc.)
> 
> The Movies USB device is always mounted, but yes, it seems to go into
> sleep mode all the time. Any disk activity brings it out of sleep
> mode,
> although it can take a full minute before it is available. The
> Synology
> is NAS, and it doesn't appear to suffer from being in sleep mode.
> 
> Why couldn't I just make a little bash script:
> 
> cd ..
> cd /media/jjj/Movies
> 
> 
> That seems simpler, simple enough that even I understand it. :)
> 
> Having said that I suffer from this drive having to refresh itself
> all
> the time. I mean, dozens of times a day I sit here twiddling my
> thumbs
> while I wait and listen to the discs rumble and watch the lights
> blink. I use this disk all day long, yet it seems to go into sleep
> mode
> after five minutes of inactivity. 
> ___
> PLUG mailing list
> PLUG@pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Indecipherable rsync error message SOLVED

2018-09-29 Thread John Jason Jordan
On Sat, 29 Sep 2018 14:28:43 -0700
Tomas K  dijo:

>It appears that you either did not have the directory mounted or it was
>in power saving mode (disks spun down, etc.)

The Movies USB device is always mounted, but yes, it seems to go into
sleep mode all the time. Any disk activity brings it out of sleep mode,
although it can take a full minute before it is available. The Synology
is NAS, and it doesn't appear to suffer from being in sleep mode.

Why couldn't I just make a little bash script:

cd ..
cd /media/jjj/Movies


That seems simpler, simple enough that even I understand it. :)

Having said that I suffer from this drive having to refresh itself all
the time. I mean, dozens of times a day I sit here twiddling my thumbs
while I wait and listen to the discs rumble and watch the lights
blink. I use this disk all day long, yet it seems to go into sleep mode
after five minutes of inactivity. 
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Indecipherable rsync error message SOLVED

2018-09-29 Thread Tomas K
It appears that you either did not have the directory mounted or it was
in power saving mode (disks spun down, etc.)

I would recommend that you to either manually make sure that the source
and destinations are both available or setup some wait loop in your
script to allow and trigger mounting.

Ages ago, I wrote/used this simple bash function which waits for disk
to spin up and become available on the file system.

function waitForDir () {
  # waits for directory to not be empty
  local maxWait=30
  local c=0
  if (( $# != 1 )); then
>&2 echo "ERROR: Please give directory as cmd argument."
exit 0
  fi
  while (( $(ls $1 | wc -l) == 0 )); do
if (( $c > $maxWait )); then
  >&2 echo "ERROR: Directory $1 missing content after $maxWait
seconds"
  exit 0
else
  c=$(( $c + 1 ))
fi
sleep 1
  done
}

Then I used it this way:
  waitForDir /media/jjj/Movies
Note: that it needs some content to be in the directory.

Best regards, Tomas

On Sat, 2018-09-29 at 11:01 -0700, John Jason Jordan wrote:
> On Fri, 28 Sep 2018 22:39:53 -0700
> John Jason Jordan  dijo:
> 
> Problem solved:
> 
> cd ..
> cd /media/jjj/Movies
> 
> Now the rsync command works as expected, as do other commands.
> ___
> PLUG mailing list
> PLUG@pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Indecipherable rsync error message SOLVED

2018-09-29 Thread John Jason Jordan
On Fri, 28 Sep 2018 22:39:53 -0700
John Jason Jordan  dijo:

Problem solved:

cd ..
cd /media/jjj/Movies

Now the rsync command works as expected, as do other commands.
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Indecipherable rsync error message

2018-09-29 Thread John Jason Jordan
On Fri, 28 Sep 2018 23:34:37 -0700
wes  dijo:

>On Fri, Sep 28, 2018 at 10:26 PM John Jason Jordan 
>wrote:

>> rsync: getcwd(): Input/output error (5) rsync error: errors selecting
>> input/output files, dirs (code 3) at util.c(1056) [Receiver=3.1.1]

>I don't know about the numbers, but "input/output error" typically
>means it's having problems reading something from a disk. The fact
>that it's not giving you a sensible error message indicates that it's
>a really unusual problem. "getcwd()" is a function that returns the
>current working directory, so I'd start there. Do the commands
>ls /media/jjj/Movies/ and ls /media/jjj/Synology return normal-looking
>output?

Last night when I first posted the question it was too late for me to
think to add some details:

The 'from' directory is a Mediasonic enclosure containing 14TB
of storage, of which all but 4.5TB is used. The destination is a
Synology NAS with 16TB of storage. They are mounted
at /media/jjj/Movies and /media/jjj/Synology, respectively. There is a
text file 'rsync_exclusions' which lists just 'lost+found.' 

Just now I tried 'ls -la' while in /media/jjj/Movies and got the
following error: 'ls: reading directory '.': Input/output error'. So
then I added the path to the command and it worked. And I can drag and
drop, and add or delete files with the GUI (Nautilus, Thunar).

Clearly, the problem is the Mediasonic, and I know part of what is
going on. The Mediasonic has two connectors: USB 3.1 Gen 1 and eSATA,
right next to each other on the back of the case. I always used
the USB connector, but recently it failed, and the enclosure is out of
warranty, so I bought an eSATA cable with an eSATA to USB adapter for
the end that goes into the computer. Perhaps the eSATA jack on the
Mediasonic is now also failing.

But I don't understand why the drive continues to work fine for most
things - as I write this a torrent client is reading files without a
problem, and the GUI file managers also work fine. Last night from the
command line I used ddrescue to write an ISO file to the Mediasonic for
a damaged DVD, which also worked fine. But the ls and rsync commands
still fail. That is a mystery. And what to do about it is also a
mystery.
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Indecipherable rsync error message

2018-09-29 Thread Jim Garrison
On 9/28/2018 10:23 PM, John Jason Jordan wrote:
> rsync -rptog --progress --stats --delete
> --exclude-from=/media/jjj/Movies/rsync_exclusions /media/jjj/Movies/ 
> /media/jjj/Synology
> 
> rsync: getcwd(): Input/output error (5) rsync error: errors selecting
> input/output files, dirs (code 3) at util.c(1056) [Receiver=3.1.1]

What is in the file /media/jjj/Movies/rsync_exclusions ? Did you make
a change to that file recently? Are all the paths in that file valid?

--
Jim Garrison

___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Indecipherable rsync error message

2018-09-29 Thread David Fleck
On Fri, 2018-09-28 at 23:34 -0700, wes wrote:
> "getcwd()" is a function that returns the current working
> directory, so I'd start there. 

Are you in a valid directory location when running the command?

___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Indecipherable rsync error message

2018-09-29 Thread wes
On Fri, Sep 28, 2018 at 10:26 PM John Jason Jordan  wrote:

> This is an rsync command that used to work:
>
> rsync -rptog --progress --stats --delete
> --exclude-from=/media/jjj/Movies/rsync_exclusions /media/jjj/Movies/
> /media/jjj/Synology
>
> This evening it gives me:
>
> rsync: getcwd(): Input/output error (5) rsync error: errors selecting
> input/output files, dirs (code 3) at util.c(1056) [Receiver=3.1.1]
>
> Can someone translate that for me?
>
>
I don't know about the numbers, but "input/output error" typically means
it's having problems reading something from a disk. The fact that it's not
giving you a sensible error message indicates that it's a really unusual
problem. "getcwd()" is a function that returns the current working
directory, so I'd start there. Do the commands ls /media/jjj/Movies/ and ls
/media/jjj/Synology return normal-looking output?

-wes
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug