OpenWrt Forum Archive

Topic: Limits in partition size in Kamikaze 7.06?

The content of this topic has been archived on 27 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Trying to partition and format a 300 GB USB attached hard drive.

Having partitioned the drive as follows:

Disk /dev/scsi/host1/bus0/target0/lun0/disc: 300.0 GB, 300090728448 bytes
255 heads, 63 sectors/track, 36483 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

                                 Device Boot      Start         End      Blocks   Id  System
/dev/scsi/host1/bus0/target0/lun0/part1               1          32      257008+  82  Linux swap / Solaris
/dev/scsi/host1/bus0/target0/lun0/part2              33        1402    11004525   83  Linux
/dev/scsi/host1/bus0/target0/lun0/part3            1403        2772    11004525   83  Linux
/dev/scsi/host1/bus0/target0/lun0/part4            2773       36483   270783607+   5  Extended
/dev/scsi/host1/bus0/target0/lun0/part5            2773       36480   270759478+  83  Linux

Partition 2 and 3 formats just fine with mke2fs -j /dev/scsi/host1/bus0/target0/lun0/part2 and mke2fs -j /dev/scsi/host1/bus0/target0/lun0/part3.
However, when trying to format partition 5, I get the following error:

root@OpenWrt:~# mke2fs -j /dev/scsi/host1/bus0/target0/lun0/part5
mke2fs 1.39 (29-May-2006)
/dev/scsi/host1/bus0/target0/lun0/part5: Memory allocation failed while setting up superblock

I've tried both using a primary partition as part4, and as above an extended partition and then within that, a Linux partition. Same problem.
Funny thing is that it seems that the bug is size dependent. If I create part5 to be 100 GB the formatting works, whereas 250 GB or the remaining part of the disk gives the error above.
So somewhere in between there seem to be a limit... Is  this by design or an error? Or am I doing something wrong?
I've used the same disk in WhiteRussian without problems, so this behaviour seems to be new to Kamikaze.


Edit:
150GB in part5 works fine and can be formatted, whereas 200GB doesn't.
part1 is 256 MB
part2 is 11 GB
part3 is 11 GB

Thanks,
-MN

(Last edited by mountaindude on 18 Aug 2007, 17:06)

Hi there,

I had the same problem. It seems that mke2fs needs enough memory to build the partition table in memory. After that the partition can be created without any problems.

What I did to get my partition formatted is, I created a swap partition (following instructions from http://wiki.openwrt.org/LocalFileSystemHowTo) to extend my physical memory.

After doing that mke2fs worked like a charm.

Regards

TAnderson

The discussion might have continued from here.