gorpong@telxon (Gordon C. Galligher) (12/05/89)
I've been reading this newsgroup and I see people putting up messages like, "Gee, I'm glad this newsgroup is here, I get all I need to know!" Well, I almost feel the same way. About a month ago I posted a question about two things, 1). Out of inodes on my news partition, 2). Serial Port problems and the like. Question number 2, (NOT my most pressing question) was answered by a multitude of people, and I thank them all. I'm growing OLD waiting for ONE little PEEP about question number 1. I asked that responses be e-mailed to me to keep the bandwidth down in the group, since this thread has come and gone before; but I received no responses. So could someone PLEASE take a few moments of your time to send me e-mail to either: telxon!ping!gorpong@uunet.uu.net, or uunet!telxon!ping!gorpong with the procedure to re-create the partition and increasing the inodes. I know that I should have saved the articles but at the time I saw them, I didn't have a 386 box and didn't think it was necessary. Thank you VERY much. -- Gordon. (To repeat: 386 running ISC 386/ix 2.0.2: NOTICE: Out of Inodes on primary AT disk 1 partition 3 ) Gordon C. Galligher <|> ..!uunet!telxon!gorpong <|> telxon!gorpong@uunet.uu.net Telxon Corporation <|> Akron, Ohio, 44313 <|> "I would advise yas ta keep dialin' Oxmyx" - Spock (216) 867-3700 (3512)<|> _A Piece of the Action_
akcs.larry@nstar.UUCP (Larry Snyder) (12/05/89)
>almost feel the same way. About a month ago I posted a question about two >things, 1). Out of inodes on my news partition, 2). Serial Port problems Question number 1 - If you are running ISC I was told several months ago that you can't adjust the inode allocation under system V. If you are running SCO Xenix this parameter can be changed when making a new device for the hard drive.
bill@twwells.com (T. William Wells) (12/06/89)
In article <434@telxon.UUCP> gorpong@telxon (Gordon C. Galligher) writes: : I've been reading this newsgroup and I see people putting up messages like, : "Gee, I'm glad this newsgroup is here, I get all I need to know!" Well, I : almost feel the same way. About a month ago I posted a question about two : things, 1). Out of inodes on my news partition, 2). Serial Port problems : and the like. Question number 2, (NOT my most pressing question) was answered : by a multitude of people, and I thank them all. I'm growing OLD waiting for : ONE little PEEP about question number 1. Sorry about that. Either I didn't see yours or I lost them. However, I do have the fix for 2.0.2 and I've enclosed it here. From bill Article: 525 of comp.bugs.sys5: Xref: twwells news.admin:3284 news.sysadmin:1590 comp.bugs.sys5:525 comp.unix.i386:2065 Newsgroups: news.admin,news.sysadmin,comp.bugs.sys5,comp.unix.i386 Path: twwells!bill From: bill@twwells.com (T. William Wells) Subject: Inode bug fix for ISC 2.0.2 Message-ID: <1989Oct16.030545.2444@twwells.com> Organization: None, Ft. Lauderdale, FL Date: Mon, 16 Oct 89 03:05:45 GMT Since I've got so many requests for the fix for the inode bug for ISC 2.0.2, I decided to post it. Sorry I've been so slothful on this; various things popped up and I wasn't able to get it all together. In case you want to know what this is: there is a kernel bug that, on occasion, and particularly if you are running a newsfeed, will cause the file system to think that there are no more free inodes, thus preventing creation of new files. Running fsck fixes the inode count but doesn't prevent the problem from occuring again. The problem is this: there is a "free inode cache" stored in the superblock for each file system; this block is kept in memory when the file system is mounted, thus the inode cache permits rapid allocation of inodes. When the cache is emptied, the kernel tries to read more inodes from the disk to fill the cache and then retries the allocate. If the kernel is unable to read more inodes from the disk, it assumes that there are no more free inodes. There is an optimization in the allocation code, which depends on the condition that the lowest free inode is always in the inode cache. What it does is to start the disk read from that lowest inode, instead of the first inode. This means that the inode table doesn't have to always be fully read, for what could be a significant savings in allocating inodes. (Consider what might happen when almost all inodes are in use.) However, the kernel does not maintain that condition properly. It is possible for the kernel to forget the lowest inode, with the effect that the kernel tries to read from some place too far in the inode table, and maybe discovers that there are no free inodes. When that happens, the kernel clears the available inode count, and the file system is essentially kaput. The right fix for this would be to always maintain that condition. However, a binary patch for that would be tricky at best, and maybe impossible. A patch that is possible is to have the allocation routine try from the beginning of the inode table whenever it fails to read inodes from the disk, relying on the free inode count to tell when the table is empty. This changes the condition that must be maintained to: the free inode count must always be accurate. (Having the free inode count never be larger than the actual number of free inodes is sufficient for the patch to not cause problems.) I made a similar patch for Microport SysV/386 3.0e and have been running it for most of this year without problems. I was asked to solve this for Interactive 2.0.2 and did so. However, I did the work on my Microport system, and the enclosed shell script works on that; it ought to work on an Interactive system but I've not tried this. With that caveat, here is what you do to patch your kernel. First, run the shell script. Make sure that it behaved correctly. Then save a copy of your good kernel and /etc/conf/pack.d/s5/Driver.o. If you are really paranoid, back up your whole system, though this shouldn't be necessary. Replace the Driver.o file with the one on /tmp. Finally, rebuild your kernel. That particular bug should never bite you again. Further kernel builds will have the bug fixed as well. If you have any problems, send me e-mail. I'll try to get back to you quicker than I did with this! If the patch causes some nasty kind of crash, please post immediately in hopes that others will read your message before having tried the patch. in=/etc/conf/pack.d/s5/Driver.o out=/tmp/Driver.o # check that we have the right Driver.o file if [ x"`sum $in`" != x"50880 81 $in" ]; then echo "sum failed" exit 1 fi if [ x"`sum -r $in`" != x"33908 81 $in" ]; then echo "sum -r failed" exit 1 fi # copy the file and make an appropriate fix { dd ibs=1 obs=1k count=1977 dd bs=19 count=1 of=/dev/null echo '\074\0144\017\0204\0327\0376\0377\0377\0146\c' echo '\0307\0207\0324\00\00\00\0144\00\0353\0151\c' dd bs=16k } <$in >$out # compare the list of differences against the expected differences cat <<\+ >/tmp/fix$$ 1978 75 74 1980 0 17 1981 0 204 1982 0 327 1983 164 376 1984 14 377 1985 146 377 1986 307 146 1987 207 307 1988 324 207 1989 0 324 1992 144 0 1993 0 144 1994 353 0 1995 152 353 1996 220 151 + if cmp -l $in $out | cmp -s - /tmp/fix$$; then rm /tmp/fix$$ exit 0 else rm /tmp/fix$$ echo "patch failed" exit 1 fi --- Bill { uunet | novavax | ankh | sunvice } !twwells!bill bill@twwells.com (PS: no one has reported problems since this was originally posted.)
steve@nuchat.UUCP (Steve Nuchia) (12/06/89)
In article <[257bab4a:240.1]comp.unix.i386;1@nstar.UUCP> akcs.larry@nstar.UUCP (Larry Snyder) writes: >Question number 1 - If you are running ISC I was told several months ago >that you can't adjust the inode allocation under system V. If you are It is unlikely that I'm the only one to answer this, but it can't be allowed to go unanswerd. Utterly False. Just tell mkfs how many inodes you want, in its admittedly bogus syntax, and it makes that\ many inodes. -- Steve Nuchia South Coast Computing Services (713) 964-2462 "Man is still the best computer that we can put aboard a spacecraft -- and the only one that can be mass produced with unskilled labor." - Wernher von Braun
rli@buster.irby.com (Buster Irby) (12/06/89)
akcs.larry@nstar.UUCP (Larry Snyder) writes: >>almost feel the same way. About a month ago I posted a question about two >>things, 1). Out of inodes on my news partition, 2). Serial Port problems >Question number 1 - If you are running ISC I was told several months ago >that you can't adjust the inode allocation under system V. If you are >running SCO Xenix this parameter can be changed when making a new device for >the hard drive. LARRY I HAVE HAD IT! EITHER YOU NEED TO GET YOUR FACTS STRAIGHT, OR YOU NEED TO KEEP YOUR MOUTH SHUT!! A wrong answer to any question is much worse than no answer at all. I have been reading this group for months now and watching you spouting all kind of incorrect information about ISC and System V, and it is time for it to stop! You might try reading the fine manual before you answer any more questions, you would be amazed at the amount of *correct* information they contain. You are doing the entire network a disservice when you post *WRONG* information to any newsgroup! By the way, the name of this group is comp.unix.i386, not BASH.ISC, and I would appreciate it if you would take your ISC flames to alt.flames where they belong. The *correct* answer to the question can be found in any System V System Administrators Reference Manual: mkfs(1m) /etc/mkfs special blocks[:i-nodes] [gap blocks/cyl] special - is the device name (i.e. /dev/dsk/0s1) blocks - is the total number of blocks on the partition i-nodes - is the user specified number of inodes gap - the rotational gap between heads blocks/cyl - the number of blocks per cylinder By the way, this is not a new feature that ISC snuck into System V/386 in an attempt to get even with Larry Snyder. I have a Uniplus System V.2 manual dated 1983 that showes the same syntax. -- Buster Irby buster!rli
cpcahil@virtech.uucp (Conor P. Cahill) (12/06/89)
In article <[257bab4a:240.1]comp.unix.i386;1@nstar.UUCP>, akcs.larry@nstar.UUCP (Larry Snyder) writes: > >almost feel the same way. About a month ago I posted a question about two > >things, 1). Out of inodes on my news partition, 2). Serial Port problems > > Question number 1 - If you are running ISC I was told several months ago > that you can't adjust the inode allocation under system V. If you are > running SCO Xenix this parameter can be changed when making a new device for > the hard drive. Wrong. All you have to do is specify the number of inodes that you require on the mkfs command line. mkfs /dev/rdsk/0s4 90000:90000 Creates a 90,000 block file system with 90,000 inodes. -- +-----------------------------------------------------------------------+ | Conor P. Cahill uunet!virtech!cpcahil 703-430-9247 ! | Virtual Technologies Inc., P. O. Box 876, Sterling, VA 22170 | +-----------------------------------------------------------------------+
jgd@rsiatl.UUCP (John G. De Armond) (12/06/89)
In article <[257bab4a:240.1]comp.unix.i386;1@nstar.UUCP> akcs.larry@nstar.UUCP (Larry Snyder) writes: >>almost feel the same way. About a month ago I posted a question about two >>things, 1). Out of inodes on my news partition, 2). Serial Port problems > >Question number 1 - If you are running ISC I was told several months ago >that you can't adjust the inode allocation under system V. If you are >running SCO Xenix this parameter can be changed when making a new device for >the hard drive. I don't know where that idea came from but it is false. RTFM for the mkfs command. Note that one option is to specify the blocks AND the inodes in the format "blocks:inodes". I've sent the original fellow email regarding how to fix this problem. I'll post if there is enough interest. John -- John De Armond, WD4OQC | The Fano Factor - Radiation Systems, Inc. Atlanta, GA | Where Theory meets Reality. emory!rsiatl!jgd **I am the NRA** |
akcs.larry@nstar.UUCP (Larry Snyder) (12/06/89)
>The *correct* answer to the question can be found in >any System V System Administrators Reference Manual: Let's be nice now - I've based my information on what I heard when I called ISC technical support - and I was told that under System V the inode allocation could not be changed. Under SCO, using the manual I changed the number of inodes using mkfs. I was just relaying information that I received from the folks who did the port.
jcm@mtunb.ATT.COM (John McMillan) (12/07/89)
In article <613@buster.irby.com> rli@buster.irby.com (Buster Irby) writes: : >mkfs(1m) : >By the way, this is not a new feature that ISC snuck into System >V/386 in an attempt to get even with Larry Snyder. I have a >Uniplus System V.2 manual dated 1983 that showes the same syntax. : My recollection is this syntax has remained unchanged since my first encounter with V6 in the 1970's. (The standard document page on it has been lamentable for all that time.) Anyone unfamiliar with MKFS -- but whose system HAS it -- should not be wasting folks' time with technical "answers" to system issues. A good rule is to limit postings until you're at a level where sharp people come to you for answers. No flames here -- I'm trigger-happy on the 'N' key !-) Condolences to those who can't identify 'N'-mail, and waste their resources following it. jc mcmillan -- att!mtunb!jcm <- muttering for self, not THEM
dougp@ico.isc.com (Doug Pintar) (12/07/89)
In article <1989Dec6.023924.1293@virtech.uucp> cpcahil@virtech.uucp (Conor P. Cahill) writes: >Wrong. All you have to do is specify the number of inodes that you require >on the mkfs command line. > > mkfs /dev/rdsk/0s4 90000:90000 > >Creates a 90,000 block file system with 90,000 inodes. Almost right -- However, in System V filesystems, inodes are kept as 16-bit numbers, so you only get 64K of them... This can get annoying if you're going to have lots of little files (like news articles???). DLP
mjs@cbnews.ATT.COM (martin.j.shannon) (12/07/89)
In article <1989Dec6.023924.1293@virtech.uucp> cpcahil@virtech.uucp (Conor P. Cahill) writes: >All you have to do is specify the number of inodes that you require >on the mkfs command line. Yes, this is true. > mkfs /dev/rdsk/0s4 90000:90000 And that's the right syntax, but.... >Creates a 90,000 block file system with 90,000 inodes. Except that inode numbers are stored in unsigned shorts, so you can't ever have more than 65535 of them. The real limit is probably a few less than 65535, but I don't have access to any current source to verify what it *really* is. A *safe* number would be 65500, I'm quite sure. -- Marty Shannon; AT&T Bell Labs; Liberty Corner, NJ, USA (Affiliation is given for identification only: I don't speak for them; they don't speak for me.)
root@nebulus (Dennis S. Breckenridge) (12/07/89)
cpcahil@virtech.uucp (Conor P. Cahill) writes: >Wrong. All you have to do is specify the number of inodes that you require >on the mkfs command line. > mkfs /dev/rdsk/0s4 90000:90000 >Creates a 90,000 block file system with 90,000 inodes. FLAME ON: mkfs restricts the maximum number of INODES to 65488. The ilist number in the directory file is a 16 bit value 2^15 = 65535. The maximum number of ilists points to the maximum number of files. mkfs is smart enough to ignore anything over 65488. Any number of inodes over the max is set to the maximum. So before you flame someone get the facts straight. RTFM FLAME OFF: -- ----------------------------------------------------------------------------- NAME: Dennis S. Breckenridge UUCP: uunet!tmsoft!nebulus!dennis QTH: Toronto, Canada ELECTROMAGNETIC: 145.03Mhz ve3gss@ve3gss AMPR.ORG: [44.135.88.54] THE RIGHT CHIOCE?: (416) 733-1696 -----------------------------------------------------------------------------
caf@omen.UUCP (Chuck Forsberg) (12/07/89)
In article <257cf96c:240.6comp.unix.i386;1@nstar.UUCP> akcs.larry@nstar.UUCP (Larry Snyder) writes:
:>The *correct* answer to the question can be found in
:>any System V System Administrators Reference Manual:
:
:Let's be nice now - I've based my information on what I heard
:when I called ISC technical support - and I was told that under System V
:the inode allocation could not be changed. Under SCO, using the manual I
:changed the number of inodes using mkfs. I was just relaying information
:that I received from the folks who did the port.
Both answers are correct. Mkfs since V7 or before can be told
how many inodes to make in a new FS. But I know of no way to
increase the number of inodes on an existing file system.
cpcahil@virtech.uucp (Conor P. Cahill) (12/07/89)
In article <12043@cbnews.ATT.COM>, mjs@cbnews.ATT.COM (martin.j.shannon) writes: > In article <1989Dec6.023924.1293@virtech.uucp> cpcahil@virtech.uucp (Conor P. Cahill) writes: > >All you have to do is specify the number of inodes that you require > >on the mkfs command line. > > Yes, this is true. > > > mkfs /dev/rdsk/0s4 90000:90000 > > And that's the right syntax, but.... > > >Creates a 90,000 block file system with 90,000 inodes. > > Except that inode numbers are stored in unsigned shorts, so you can't Yes, yes, yes I know that inode numbers are limited to 16 bits. I was only giving an example of how to specify the number of inodes & the thought of the limit never crossed my mind. Apologies to the entire net community. -- +-----------------------------------------------------------------------+ | Conor P. Cahill uunet!virtech!cpcahil 703-430-9247 ! | Virtual Technologies Inc., P. O. Box 876, Sterling, VA 22170 | +-----------------------------------------------------------------------+
jackv@turnkey.gryphon.COM (Jack F. Vogel) (12/08/89)
In article <257cf96c:240.6comp.unix.i386;1@nstar.UUCP> akcs.larry@nstar.UUCP (Larry Snyder) writes: >Let's be nice now - I've based my information on what I heard >when I called ISC technical support - and I was told that under System V >the inode allocation could not be changed. Under SCO, using the manual I >changed the number of inodes using mkfs. I was just relaying information >that I received from the folks who did the port. Good Grief!!! Here you are spending all your time and effort bashing ISC and now we are supposed to believe you are a reliable vehicle to relay what their technical support team has to say! Give us a break. I think personally that what is going on here is probably a misunderstanding on what was being said. I don't believe that ISC support would assert that there is no way to control how many inodes a filesystem has using an explicit number in the mkfs command. What they may have meant is that once you have a filesystem made with x inodes there is no way to change that number (you could diddle with the superblock using fsdb, but I don't think the filesystem integrity would be maintained) short of recreating it using mkfs again. In fact, I wondered if the original poster actually was experiencing the inode bug that a previous poster alluded to, or if he just actually ran out of inodes and thought that this was a bug. Disclaimer: My opinions only! -- Jack F. Vogel jackv@seas.ucla.edu AIX Technical Support - or - Locus Computing Corp. jackv@ifs.umich.edu
gorpong@ping.UUCP (Gordon C. Galligher) (12/08/89)
In article <[257bab4a:240.1]comp.unix.i386;1@nstar.UUCP> akcs.larry@nstar.UUCP (Larry Snyder) writes:
##things, 1). Out of inodes on my news partition, 2). Serial Port problems
#
#Question number 1 - If you are running ISC I was told several months ago
#that you can't adjust the inode allocation under system V. If you are
#running SCO Xenix this parameter can be changed when making a new device for
#the hard drive.
Actually, I just completed doing it last night. Instead of 5020 inodes on
the filesystem, I used mkfs with 10404 as the number, and it created 10400
inodes!
I want to thank everyone who responded to my plea for help! I was about
ready to throw in the towell! Thank you very much.
-- Gordon.
--
....!uunet!telxon!ping!gorpong