Need somebody for a small test on the Irix-OS

Need somebody for a small test on the Irix-OS

Post by Hartmut Schreib » Sat, 15 Feb 2003 21:20:02



Hello,

at the end of 2002 i posted my problem (fired because of data
corruption) in two newsgroups. If you like to read the 'old' threads i
put the links at the end of this posting.
Now i need some informations about the behaviour of the SGI-Irix-tar
and about the structure of this OS. My problem is that i've no
Irix-System (it was a '6.5.13m' on an 'Origin2000') in my account to
run the tests by myself.
For the tar-question i need somebody to put some 'big' files (bigger
than one inode) in a temp-dir.
- Please go to the temp dir and type:
     tar cBf - * |  tar xvBf -
- Please run a 'stat filename', what happened to the files???
- I guess:
1. The 'atime' and the 'ctime' are modified, the 'mtime' is the
original one, true?
2. The filesize is still the same, true?
1.&2. is the behaviour like on SuSE Linux and SUN Solaris, so i expect
the same for Irix

But what's about the files itself, did they survive the tar-command
above (in SuSE and Solaris they do) or are they corrupted?? In my
case, the corruption why they fired me looked like only the first
inode was ok but the others were filled with zeros (shortended
text-files, black images...).

I would expect write-protected files to be protected against such kind
of corruption. The 'destroying process' left i.e. the '/bin' directory
untouched. Is (in IRIX) the contents of '/bin', /sbin' ..
write-protected for the 'root'-user??

Thanks a lot in advance,

Best regards

Hartmut Schreiber

##############################
Links to the 'old' threads:

In 'comp.sys.sgi.admin':
http://groups.google.de/groups?dq=&hl=de&lr=&ie=UTF-8&threadm=804d47e...

In 'comp.unix.admin':
http://groups.google.de/groups?dq=&hl=de&lr=&ie=UTF-8&oe=UTF-8&thread...

 
 
 

Need somebody for a small test on the Irix-OS

Post by Steve Cousin » Sun, 16 Feb 2003 05:47:57



> But what's about the files itself, did they survive the tar-command
> above (in SuSE and Solaris they do) or are they corrupted?? In my
> case, the corruption why they fired me looked like only the first
> inode was ok but the others were filled with zeros (shortended
> text-files, black images...).

Hi Hartmut,

I just did what you asked and everything happened as you thought.  mtime
is the original but ctime and atime changed.  filesize is the same.  the
files were zeroed out except for the beginning.

Good luck,

Steve

--
_____________________________________________________________

 Research Associate           Phone: (207) 581-4302
 Ocean Modeling Group          
 School of Marine Sciences    208 Libby Hall,
 University of Maine          Orono ME 04469

 
 
 

Need somebody for a small test on the Irix-OS

Post by mike schec » Fri, 21 Feb 2003 04:22:20


Quote:> - Please go to the temp dir and type:
>      tar cBf - * |  tar xvBf -
> - Please run a 'stat filename', what happened to the files???
> - I guess:
> 1. The 'atime' and the 'ctime' are modified, the 'mtime' is the
> original one, true?
> 2. The filesize is still the same, true?
> 1.&2. is the behaviour like on SuSE Linux and SUN Solaris, so i expect
> the same for Irix

OK, Here is what I got.

When I run the command exactly as you have listed, The new file has the
atime and ctime changed.  In size it looks the same as the original, but
when I run cksum on it, I see its not the same file.  I changed your
sytax to get rid of the blocking, and same outcome.  Only when I tar
-cvf /tmp/destination.tar $sourcefile; cd /tmp; tar -xvf destination.tar
does the checksum of the destination file actually equal that of the
source file. This is on IRIX 6.5 fwiw.  M*of the story?  I dunno,
maybe use cpio to move files?

-Mike

 
 
 

Need somebody for a small test on the Irix-OS

Post by Doug Freyburg » Sat, 22 Feb 2003 01:31:41



> When I run the command exactly as you have listed, The new file has the
> atime and ctime changed.  In size it looks the same as the original, but
> when I run cksum on it, I see its not the same file.  I changed your
> sytax to get rid of the blocking, and same outcome.  Only when I tar
> -cvf /tmp/destination.tar $sourcefile; cd /tmp; tar -xvf destination.tar
> does the checksum of the destination file actually equal that of the
> source file. This is on IRIX 6.5 fwiw.  M*of the story?  I dunno,
> maybe use cpio to move files?

No, the exact same thing is very likely to happen with cpio.  Notice that
in your example you used tar to create new storage, and then used that new
storage to overwrite the original source files.  The new storage is NOT
the exact same data, it is a copy.

The m*of the story is that if you use one set of data to overwrite
itself, you will probably corrupt that data.  It doesn't matter all that
much what tool you use to do it with.  Use any tool that uses the existing
inode to write to a file and the same thing will happen.  Use any tool that
moves aside the original inode and creates a new one and it will not corrupt
the original.  Use any tool that stores the copy anywhere else but the
source inode and that creates a new copy and does not corrupt the original.

For what it's worth, this is the same topic as way sysadmins are supposed
to use vi rather than emacs to edit files in /etc.  Vi's default behavior
is to use the existing inode and in /etc the permissions and ownerships
stored in the inode portion of the file are of paramount importance.  Emacs's
default behavior is to rename the original and create a new copy, thus using
the current user's ownership and umask.  If you really want to use emacs,
this hurdle can be overcome by setting emacs to overwrite the original file,
so in the end any emacs user who is already expert at it enough to know this
issue can use it fine.  The trouble is starting to use emacs in the first
place.  For sysadmins the learning curve is extremely cruel.

 
 
 

Need somebody for a small test on the Irix-OS

Post by mike schec » Sat, 22 Feb 2003 03:17:20


Quote:> No, the exact same thing is very likely to happen with cpio.  Notice that
> in your example you used tar to create new storage, and then used that new
> storage to overwrite the original source files.

I know :).  But when you run cpio, you get this....

bash-2.05a# find . -depth|cpio -dumpv /tmp/test
Attept to pass a file to itself.
0 blocks
1 error
bash-2.05a#

cpio is a little smarter than sysadmins sometimes.....

 
 
 

1. ** A Small OS Test- A Summary **


I had no idea people did so little... You realize anyone with a real
system should at least be able to print, download, format at least three
things at once, play music and an animation, while raytracing (at least
anyone with a real Amiga). Can you do this?

MuheehahahuhahehuheHA!

                      \|/       I'm sorry, did I say download ONE file?

     *------------oOO-(_)-OOo-------------*------------------------------*
     |       __                 ____      | A2000 7 MEGS RAM, 40 MEGS HD |
     |      ////\    /\/\    /\/ __ \/\   |  The Amiga Community Lives!  |
     | __  //// /\  / / /\  / / /  \/ /\  | \ /              *-----------*
     | \\\//// __ \/ _  _ \/ / (_/\/ __ \ |  X               |Idle/\/\/\/|
     |  \XX/ \/  \/\/ \/ \/\/\____/\/  \/ | / Caliber        |Brains\/\/\|

     *------------------------------------*------------------*-----------*
                      Tomorrow's technology ten years ago!

2. Trying to put a file with Apache and the HTTP 1.1 protocol

3. ** Another Small OS Test **

4. /usr/sbin/in.identd

5. test test test test test test test

6. MkLinux pre-DR3 + PowerTower Pro 250 "Monty"?

7. Can somebody help me with a couple of small questions

8. partition allocation error - too big

9. comp.os.linux, comp.os.linux.misc, comp.os.linux.security, comp.os.linux.networking

10. test test test test

11. test command differences between IRIX and Linux

12. IRIX Os

13. Web Application Tool available for beta testing, Linus/Solaris/IRIX versions