[lkml]   [1999]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: 2.2.1 mkfs.ext2 out of memory
In <> Richard B. Johnson ( wrote:
> On Thu, 18 Feb 1999, Jon P. deOng wrote:
>> Hi,
>> I'm running a pII 400 with 256Mb of ram with a vanilla 2.2.1 kernel
>> Im trying to create a raid5 array with 4 9gig scsi seagate cheetah drives
>> connected to the external adapter of an adaptec 2940uw controller. My os
>> drive is also a 9gig scsi cheetah on the internal ultra scsi adapter. I
>> have no scsi2 devices at all. I have verified proper termination and turned
>> off the auto term in the adaptec bios.
>> Now I have no problems with mkraid, mdadd, or mdrun. All of these raid tools
>> report no errors. The problem comes when i try to format /dev/md0
>> my syntax is
>> mkfs.ext2 /dev/md0
>> mkfs gets almost halfway through writing the inode tables and then i get
>> this output
>> Writing inode tabels: 1969/3254
>> Out of Memory for mkfs.ext2
>> Killed

> Yep! First make a big swap partition or a big swap file. There is, roughly
> 4096 bytes of memory required for every megabyte of file-system space when
> you execute mkfs.ext2. This depends upon the allocation-unit size, but
> it's a reasonable rule-of-thumb.

> Then boot into single-user mode with no network daemons running. Make
> sure your swap partition is activated, then make the file-system. You
> should be sucessful.

Sometimes big swap helps but NOT ALWAYS. I was unable to set up RedHat 4.2
on comp with 11MiB RAM and 1GiB HDD even with 128MiB swap but with 31MiB
all was just fine without any swap :-(( Plus your "rule-of-thumb" will give
us 144MiB for 36GiB "drive" and there are 256MiB REAL memory ! IMO it's some
rare race in kernel triggered by mkfs.ext2 when there are a lot of dirty
pages in cache but they are not written on disk and so you could not allocate
memory even of there are plenty of swap area...

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:50    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean