help: using "cp" causes data corruption when copying from drive to drive.

help: using "cp" causes data corruption when copying from drive to drive.

Post by rlditto&asso » Sat, 23 Feb 2002 23:34:44



hello, i have a system with linux mandrake 8.0 on it with most of the
updates
except for the kernel update. i know that this isn't redhat but maybe you
can help anyway.  I have customized the kernel to allow for ppp
being built as a module for poptop(pptp) vpn server services for windows
clients to access over the internet to this server.  now the system is an
intel 815 chipset with piii 1ghz cpu 128mb ram and 2 hard disks on on each
channel one is the working drive a western digital u/100 7200 rpm 30gb drive
with the system and the home directories.  the home directories are shared
over the network with samba.  i have to shares setup for this network called
c and d.  these shares on the file system look like this /home/public/c and
/home/public/d.  the second drive in my system is an ibm 20gb 7200 rpm u/100
drive which i added to the system after i setup up the system.  i mounted
the second drive as /backup and setup a cron job that ran a script that look
like this:
rm -r /backup/mon
mkdir /backup/mon
cp -fPRv /home/public /backup/mon

i have a file like this set up for everyday of the week set to run at 2:00
am in the morning.  the script runs just like it's supposed to but, i get
lots of disk corruption.  monday everything copies just fine. tuesday i get
some of the directories and wednesday i get even fewer and i'm lucky if it
even does anything on fryday. i was running fsck after i umount /backup and
then ran fsck /dev/hdc1 and it sould find tons of errors with inodes etc....
then i made sure cables were plugged in properly and i was using the correct
type of cables they were.  this got to be a real problem.  this is a 20gb
drive and the information i'm backing up is about 2.5 gb in about 33000+
files so i could backup 9 days without a problem, but it's not this way.  is
their a solution to this, or work around?

i also tried a different route i used tar
script looked like this tar -cvzf /backup/mon.tgz /home/public

this command does exactly what i want it to, but when it's done i go into x
windows kde and try to use the archive agent and when i click on the file it
goes to read the file on /dev/hdc and it takes about 30 seconds and then it
stops and nothing comes up on the screen and even if i let it sit for
minutes it doesn't bring up a list of files and directories.  if i backup
one of the home direcories example: c. Things work just fine.  but i'm
worried about when these directories accumulate even more files. and this
disk corruption i get is really agrivating i don't know what i'm doing wrong
but i would be thankful for any help you can provide.

thanks,

joe

 
 
 

1. New HDD copy; using "Drive Copy" program (W98) to dupe Linux

Hello Linux Folks,

I've got RH5.1 Linux & W98 on the same West. Dig. 4GB drive,
and would like to copy all partitions & data to a new Maxtor 5.7GB
drive using "Drive Copy" program under W98.  

I'm not expecting trouble getting it going in terms of CMOS settings,
or in terms of W98.  I am worried, however, about exactly which
files or other changes need to be made in Linux in order to be able
to successfully boot to the newly copied drive of a different size.

I have ver. 2.0 of Drive Copy, which claims to support copying
Linux partitions & data.

I'm fairly new to Linux, so please assume newbie-speak in
your responses ; )

Many, many thanks for your kindness in responding.

Sincerely,

2. Proxy Logging Web Access

3. File locking in vi,emacs

4. call variable from file

5. tape drive causes "Error with sense data" messages in syslog

6. kppp

7. What is defferent "cp -pR " and "cp -pRP" ?

8. Need help making tape drive "Available" after "Defining"

9. "Tar-Baby": Data read/write dilemma using "tar"

10. GETSERVBYNAME()????????????????????"""""""""""""

11. HELP: "reboot" and "ctrl-alt-del" causes system to hang