adding 2nd hard drive.

RH7 with 2.4.2 kernel.
I added a 40GB drive as master on the secondary IDE controller to a system that has been running for months. fdisk /dev/hdc creaated the partition. mkfs /dev/hdc gives me an error of `not enough space to build proposed files system while setting up superblock'.
What I would like to do is have the new drive in a single partition mounted as /123xyz. Comments/recommendations appreciated.
TIA for your help
Who is Participating?
Nmm, this actually sounds like either a problem with the partition information on the drive, or possibly a software problem with the 'as shipped' RedHat 7.1 installation. I'd suggest running fdisk again, delete the partition and make a new primary Linux (linux is the default partition type) partition that covers the whole drive. Then try 'mke2fs /dev/hdc1' again. If the error re-occurs, get and install all of the applicable updates to 7.1. I don't know for certain if they will fix the problem, but I do know that I can successfully make file systems on additional disks larger than your 40Mb with my 7.1 boxes that have all updates installed.
could you please post the full mkfs command (probably add the -v option. Is the patition of type ext2?
You need to specify the parition, not just the device:

mkfs /dev/hdc1

Then add a line like this to /etc/fstab

/dev/hdc1             /123xyz                   ext2    defaults        1 2
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

emery_kAuthor Commented:
Used `mkfs /dev/hdc1', it properly calls mke2fs which properly says it is an ext2 partition. message upon entering the above is
mk2efs 1.19 13-jul-2000 for EXT2 FX 0.5b 95/08/09
/dev/hdc1: not enough space to build proposed files system while setting up superblock

I shouldn't have to modify the fstab until after formatting and making the new directory to mount it to but before running `mount -a'

running mke2fs directly does the same thing.

I could take the identical spare machine, temporarily install the drive and partition at install but that seems like a lot of monkey motion.

sounds like your system laks some RAM.
Simply kill all processes you don't need at the moment.
Probably you may have insufficent swap, please check with
   swapon -s
emery_kAuthor Commented:
512MB. The only thing I really have running is apache.
swapon-s gives
/dev/hda9 size 1028120 used 0  priority -1

killed apache but same results
could you please post result of
  mkfs -v /dev/hdc1
emery_kAuthor Commented:
it is off and running as I write. I must have done this at least 6 times. always the same error. I tried both extended and primary partitions, mk2efs and mkfs, etc.
It even reached the point I started a reinstall on the spare server with same hardware and told install to format both drives figure worst case I would move that drive over.
I have customers complain that their computers always start working right when they hear my voice. Guess your name did it this time.

I've had people say that all I have to do is to walk into a room with a misbehaving system and it 'magically heals itself' or that they walk into my office to ask a question and just as they start to phrase the question they suddenly realize they know the answer. I claim that is due to the fact that I maintain a 'negative entrophy zone' in my immediate vicinity. One fortunate side affect of that is that it precludes the operation of anything made by Microsoft...

BTW: you really need to consider applying the updates to your 7.1 systems. There are a number of nasty faults in the as-shipped distribution. If you want, I can email you a script that takes a lot of the pain out of applying the updates. Send an email to and I'll mail the current copy of the script back.
> I must have done this at least 6 times.
so it may be worth to use another partition type, minix for example, and check if the error occours again. If so, it might be a disk problem (then run the disk vendor's proprietary format tool, not shure if Linux's format can do it).
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.