LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 03-11-2017, 08:03 AM   #16
hydrurga
Senior Member
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 18.1 MATE
Posts: 3,073

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065

Quote:
Originally Posted by robertkwild View Post
You think its still tarring up those individual files its producing the warning for or it just gives up altogether and fails the whole tar as its producing loads of warnings for individual files?
I don't know. Did you try running tar with the --warning=no-file-changed option?
 
Old 03-11-2017, 05:00 PM   #17
robertkwild
Member
 
Registered: Feb 2015
Posts: 268

Original Poster
Rep: Reputation: Disabled
no not yet sorry hydrurga i will try it monday when im back at work as the script is on my work pc, i will let you know def
 
Old 03-11-2017, 05:57 PM   #18
robertkwild
Member
 
Registered: Feb 2015
Posts: 268

Original Poster
Rep: Reputation: Disabled
i know what i will do to check if the tar is the same as the source directory i will do this -

tar -cf - after_louise_1606/ | md5sum

md5sum after_louise_1606.tar

and if there is no corruption they should be the same md5sum figures

Last edited by robertkwild; 03-11-2017 at 05:59 PM.
 
Old 03-13-2017, 06:40 AM   #19
robertkwild
Member
 
Registered: Feb 2015
Posts: 268

Original Poster
Rep: Reputation: Disabled
still no joy im afraid even when i put in at the end of the tar command --warning=no-file-changed the tar still fails

strange thing is when i did tar -cf - after_louise_1606/ | md5sum, it said the exact same things ie the same warning i was getting before but it managed to produce a md5sum string
 
Old 03-13-2017, 07:03 AM   #20
hydrurga
Senior Member
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 18.1 MATE
Posts: 3,073

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
How about you make a copy of the directory, run the tar on the original directory, then compare the directory with the directory copy you made in order to see if any files or directories have been updated (contents or metadata) in the meantime. If tar says that some files are being changed, you need to find out which ones.

Depending on the results, you can then do the same thing again but without running tar, just pausing 5 minutes or so, to see if it is tar itself that is somehow making the changes.
 
Old 03-13-2017, 07:25 AM   #21
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,185

Rep: Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673
I still do not know if you got the same md5sum or not.
 
Old 03-13-2017, 10:39 AM   #22
robertkwild
Member
 
Registered: Feb 2015
Posts: 268

Original Poster
Rep: Reputation: Disabled
i think i know what the problem is, its because im running the tar command over an nfs share and not on the local drive, this is why im getting read errors as when i run the tar command on my local disk (copy the data over to my local disk) it creates the tar fine

has any else encountered this problem?
 
Old 03-13-2017, 11:44 AM   #23
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,185

Rep: Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673
I still can't see any problem, I don't know why can't you accept: the files were modified during the tar process. Probably they were accessed from another host, I have no idea. But you may have time related problems too.
 
Old 03-14-2017, 03:31 AM   #24
robertkwild
Member
 
Registered: Feb 2015
Posts: 268

Original Poster
Rep: Reputation: Disabled
mmm...

so as its a share its probably opened somewhere else, i need to see the NFS settings on the server
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Backup Script Using tar - Error "file changed as we read it" 3rods Linux - Software 6 03-08-2014 05:18 AM
Script to find tar archives, read tar file contents, output content to an index file. bluesword1969 Linux - General 4 02-07-2011 12:15 PM
Why My ext3 file system changed to read only chandruk Linux - Software 1 01-11-2006 12:15 PM
tar command : error: file changed as we read it sneezesnoeze Linux - General 2 04-05-2004 06:56 PM
Problem creating tar.gz archive - File changed as we read it doctorwebbox Linux - General 1 02-04-2004 05:59 PM


All times are GMT -5. The time now is 03:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration