268 The File System Date: Wed, 29 May 91 00:42:20 EDT From: curt@ai.mit.edu (Curtis Fennell)3 Subject: Mixed up mail To: all-ai@ai.mit.edu Life4 had, what appears to be, hardware problems that caused a number of users’ mailboxes to be misassigned. At first it seemed that the owner- ship of a subset of the mailboxes had been changed, but it later became clear that, for the most part, the ownership was correct but the name of the file was wrong. For example, the following problem occurred: -rw------- 1 bmh user 9873 May 28 18:03 kchang but the contents of the file ‘named’ kchang was really that of the user bmh. Unfortunately, the problem was not entirely consistent and there were some files that did not appear to be associated with the owner or the filename. I have straightened this out as best I could and reassigned ownerships. (A number of people have complained about the fact that they could not seem to read their mailboxes. This should be fixed). Note that I associated ownerships by using the file owner- ships and grep'ing for the “TO:” header line for confirmation I did not grovel through the contents of private mailboxes. Please take a moment to attempt to check your mailbox. I was unable to assign a file named ‘sam.’ It ought to have belonged to sae but I think I have correctly associated the real mailbox with that user. I left the file in /com/mail/strange-sam. The user receives mail sent to bizzi, motor-control, cbip-meet, whitaker-users, etc. Soon after starting to work on this problem, Life crashed and the par- tition containing /com/mail failed the file-system check. Several mailboxes were deleted while attempting to reboot. Jonathan has a list of the deleted files. Please talk to him if you lost data. Please feel free to talk to me if you wish clarification on this prob- lem. Below I include a list of the 60 users whose mailboxes are most likely to be at risk. 3Forwarded to UNIX-HATERS by Gail Zacharias 4“Life” is the host name of the NFS and mail server at the MIT AI Laboratory.
UFS: The Root of All Evil 269 Good luck. We spoke with the current system administrator at the MIT AI Lab about this problem. He told us: Date: Mon, 4 Oct 93 07:27:33 EDT From: bruce@ai.mit.edu (Bruce Walton) Subject: UNIX-HATERS To: simsong@next.cambridge.ma.us (Simson L. Garfinkel) Hi Simson, I recall the episode well I was a lab neophyte at the time. In fact it did happen more than once. (I would rather forget!:-) ) Life would barf file system errors and panic, and upon reboot the mail partition was hopelessly scrambled. We did write some scripts to grovel the To: addresses and try to assign uids to the files. It was pretty ugly, though, because nobody could trust that they were getting all their mail. The problem vanished when we purchased some more reliable disk hardware… No File Types To UFS and all Unix-derived file systems, files are nothing more than long sequences of bytes. (A bag’o’bytes, as the mythology goes, even though they are technically not bags, but streams). Programs are free to interpret those bytes however they wish. To make this easier, Unix doesn’t store type information with each file. Instead, Unix forces the user to encode this information in the file’s name! Files ending with a “.c” are C source files, files ending with a “.o” are object files, and so forth. This makes it easy to burn your fingers when renaming files. To resolve this problem, some Unix files have “magic numbers” that are contained in the file’s first few bytes. Only some files—shell scripts, “.o” files and executable programs—have magic numbers. What happens when a file’s “type” (as indicated by its extension) and its magic number don’t agree? That depends on the particular program you happen to be running. The loader will just complain and exit. The exec() family of kernel func- tions, on the other hand, might try starting up a copy of /bin/sh and giving your file to that shell as input. The lack of file types has become so enshrined in Unix mythology and aca- demic computer science in general that few people can imagine why they
Previous Page Next Page