cannot run mkfs.ext3 on a partition even though I see it in fdisk

I've set up a partition using fdisk on a  redhat 5 box. I see the partition listed as a Linux partition (type 83) and it is under an extended partition.
However even after running partprobe - I run the command
mkfs.ext3 /dev/hda2p5

I get the error "No such file or directory. The device apparently does not exist; did you specify it correctly?"
Im really puzzled by this - any help welcome.
astincrawfordAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

hemmiCommented:
Well, what does
ls -l /dev/hda2p5
say? Does it exist?

What does
fdisk -l
say?

What does
blkid
say?

0
astincrawfordAuthor Commented:
thanks for getting back to us.
well fdisk -l shows me /dev/hda2 (but its seen as 8e (Linux LVM) which puzzles me

you;re right though - if i do ls -l /dev/hda2p5 it says no such file or directory

blkid doesn't show it - but if I do fdisk /dev/hda2 I can see it listed as partition 5 !
0
astincrawfordAuthor Commented:
I've tried changing /dev/hda2 to system type linux 83 -

but Im still not able to make a filesystem on /dev/hda2p5 - even though I see it in fdisk
0
The 7 Worst Nightmares of a Sysadmin

Fear not! To defend your business’ IT systems we’re going to shine a light on the seven most sinister terrors that haunt sysadmins. That way you can be sure there’s nothing in your stack waiting to go bump in the night.

hemmiCommented:
What is

fdisk -lu /dev/hda

That will list your partitions.

Also what is

ls -l /dev/hd*

0
astincrawfordAuthor Commented:
output of fdisk -lu /dev/hda is
...
/dev/hda2       208845     167718569       8281507+    (id)83    Linux

so it sees it now (after a reboot).
if i do ls -l /dev/hda2 I see it listed
brw-r----- 1 root disk 3, 2 Apr 9 16:33 /dev/hda2

if I do ls -l /dev/hda2p5 - it says "no such file or directory"
and i get the same error if i try mkfs.ext3 /dev/hda2p5
but if do fdisk /dev/hda2 I can see the /dev/hda2p5 partition fine !!

0
hemmiCommented:
Why don't you simply show all the output????

ls -l /dev/hd*

fdisk -lu /dev/hda

mount

0
astincrawfordAuthor Commented:
the box is on a development server and I cannot cut and paste all the information.
here is a screenshot.

redhat.bmp
0
hemmiCommented:
Currently you don't have an extended patition, otherwise the fdisk output would look like
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         993     7976241   83  Linux
/dev/sda2             994        1044      409657+   5  Extended
/dev/sda5             994        1044      409626   83  Linux

In this case sda2 would indicate the extended partition and within the extended partition you would have sda5 as the real partition.

Your partition is hda2! (And there is no need for the "extended partition" construct, if you don't plan to have more than 4 partitions.

You can format it to ext3 with
mkfs.ext3 /dev/hda2

However, make sure it is really the partition you want to format. That is why I asked for the ouput of the
mount
command.

But for whatever reason, you like to not answer to the complete question.

0
astincrawfordAuthor Commented:
Wait

I am not at the computer now - but I can tell you that if I do fdisk /dev/hda2
I DO see the extended partition as /dev/hda2p4 then I see the /dev/hda2p5 as a linux partition that starts on the same cylinder as the extended partition.
I understand that you create an extended partition as your 4th partition.

There are already 3 primary partitions on that disk, so I do need to make an extended partition.

So obviously if i mkfs.ext3 /dev/hda2 it will format that whole disk to ext3.

I have answered your questions and said clearly that I cannot copy and paste the output. I also provided a screenshot.

What other output would you care to see - I can provide other screenshots tomorrow.
0
hemmiCommented:
Well, your
fdisk -lu /dev/hda
only shows two partitions.
This means that in your primary partition table there are only two entries on that particular disk.
Did you change the partition type of hda2 manually to linux instead of ID 5 (indicating an extended partition?)

How did you create the partition in the first place?
Is /dev/hda1 the system you're running on? You persistently refuse to show the output of the mount command ...
0
hemmiCommented:
My guess is the hda disk is just your standard disk and hda1 is "/boot" and hda2 is "/". But since you don't show the mount command, I just don't know.
0
astincrawfordAuthor Commented:
ok managed to find the issue (finally) it was a case of going in too deep into the disk before running mkfs.ext3.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.