mirroring to usb external mass storage

mirroring to usb external mass storage

Post by Haines Brow » Mon, 30 Dec 2002 01:05:12



I've been backing up my HD to a USB external mass storage device by
using the following script run by root from a command prompt (the name
of the drive is "mirror" and I provide as argument a date that becomes
the name of the directory in which the backup is created):

find / -print | egrep -v "^/mnt/mirror|^/proc" | cpio -pdmuv
/mnt/mirror/"$1"

This seems to work very well, but there are two issues. First, at some
point during the backup, the -v feedback to my xterm turns to
garbage. That is, numbers seem ok, but letters are replaced with
graphical symbols. This doesn't seem to affect the backup, but I'd
like a visual record I can read. Any idea why xterm should break down
in this way?

Secondly, I now find (this is first backup since an upgrade to RH8.0),
that I can't umount the backup drive. It is busy. This even when the
drive disconnected and all applications closed. cat /proc/devices
tells me that there are three scsi device processes, which I assume
refer to my three scsi buses (two on one card and one on another), but
not my scsi-usb, I assume. ps aux reports:

root 367  0.0  0.0  0  0 ?    SW   Dec21   2:17 [usb-storage-0]

But running a kill -9 on this process has no effect. Short of
rebooting, how do I get rid of the process?

--
      Haines Brown


        www.hartford-hwp.com

 
 
 

mirroring to usb external mass storage

Post by Joe » Sat, 04 Jan 2003 03:22:43



> I've been backing up my HD to a USB external mass storage device by
> using the following script run by root from a command prompt (the name
> of the drive is "mirror" and I provide as argument a date that becomes
> the name of the directory in which the backup is created):

> find / -print | egrep -v "^/mnt/mirror|^/proc" | cpio -pdmuv
> /mnt/mirror/"$1"

> This seems to work very well, but there are two issues. First, at some
> point during the backup, the -v feedback to my xterm turns to
> garbage. That is, numbers seem ok, but letters are replaced with
> graphical symbols. This doesn't seem to affect the backup, but I'd
> like a visual record I can read. Any idea why xterm should break down
> in this way?

One or more of your filenames has control characters in it that switches
xterm into alternate character set. echo "^O" >/dev/thattty to get it
back to normal. Maybe put cat -t at the end of the pipeline to prevent
the problem in the future.

Quote:> Secondly, I now find (this is first backup since an upgrade to RH8.0),
> that I can't umount the backup drive. It is busy. This even when the
> drive disconnected and all applications closed. cat /proc/devices

Never, never remove a disk before unmounting. Make sure you're not
sitting on the drive when you try to unmount it. cd / , then umount
and wait for umount to finish before removing disk.

 
 
 

mirroring to usb external mass storage

Post by Haines Brow » Sat, 04 Jan 2003 04:55:46



> One or more of your filenames has control characters in it that
> switches xterm into alternate character set. echo "^O" >/dev/thattty
> to get it back to normal. Maybe put cat -t at the end of the
> pipeline to prevent the problem in the future.

Much appreciated. Will give it a try.

Quote:> > Secondly, I now find (this is first backup since an upgrade to
> > RH8.0), that I can't umount the backup drive. It is busy. This
> > even when the drive disconnected and all applications closed. cat
> > /proc/devices

> Never, never remove a disk before unmounting. Make sure you're not
> sitting on the drive when you try to unmount it. cd / , then umount
> and wait for umount to finish before removing disk.

I'm afraid the situation is not so simple. First, plenty of time went
by for any processes to end (at least an hour). When I couldn't
dismount the USB external mass storage drive, I terminated ALL
applications and terminals, running ps aux to make sure. I then
reopened a terminal for root to umount the drive, and the drive still
reported as busy. I realized that pulling the USB cable might have
given rise to a sync problem, but I did not want to reboot the
machine. Probably should have.

--
      Haines Brown


        www.hartford-hwp.com

 
 
 

mirroring to usb external mass storage

Post by Haines Brow » Sat, 04 Jan 2003 06:57:41




> > One or more of your filenames has control characters in it that
> > switches xterm into alternate character set. echo "^O" >/dev/thattty
> > to get it back to normal. Maybe put cat -t at the end of the
> > pipeline to prevent the problem in the future.

Incidentally, where is the "end of the pipeline" in the following
expression?

  find / -print | egrep -v "^/mnt/mirror|^/proc" | cpio -pdmuv
  /mnt/mirror

--
      Haines Brown


        www.hartford-hwp.com

 
 
 

mirroring to usb external mass storage

Post by Joe » Sun, 05 Jan 2003 02:30:12





> > > One or more of your filenames has control characters in it that
> > > switches xterm into alternate character set. echo "^O" >/dev/thattty
> > > to get it back to normal. Maybe put cat -t at the end of the
> > > pipeline to prevent the problem in the future.

> Incidentally, where is the "end of the pipeline" in the following
> expression?

>   find / -print | egrep -v "^/mnt/mirror|^/proc" | cpio -pdmuv /mnt/mirror

OOPs, that suggestion for cat -t should have been cat -v, or both...

    find ... | cpio -pdmuv /mnt/mirror 2>&1 | cat -vt

 
 
 

1. usb mass storage on a non-usb sparc system?

Hi, all

I've just installed a addonics pci usb2 host controller on my ultra60. And
it seem to work properly. After I insert a western digital 250GB external
hd to one port. It recognized as usb mass storage. But I can't see
anything when using volcheck -v. What should I do in order to use
removable media manager? Is it possible to mount it as pcfs? How?

The other question might be silly. Is there a driver supporting usb2?
Addonics's web site suggests installing a solaris8 patch. But I'm using
solaris9. Anybody here has any comments on my dreaming of having usb2 mass
storage on an old non-usb sparc system? Maybe I am mad, but it is even
crazy to sit there wating for >7000minutes to format my 250GB hard drive.

Thanks for your time! Appreciate your help!

2. SCSI controller support in FreeBSD ...

3. [drizzt.dourden@iname.com: USB mass storage and USB message]

4. Help...SAMBA only works one way ---->

5. USB mass storage digital camera

6. Billing and management software for ISPs

7. FinePix A101 + USB Mass storage driver

8. Imwheel problem

9. problem with USB mass storage device (?)

10. USB Mass Storage Device

11. Memory Stick (USB Mass Storage)

12. 2.4.21: USB Mass Storage data integrity not assured?

13. USB Mass Storage