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?
 
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
 
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
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.

 
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
 
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
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.