astincrawford
asked on
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.
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.
ASKER
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 !
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 !
ASKER
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
but Im still not able to make a filesystem on /dev/hda2p5 - even though I see it in fdisk
What is
fdisk -lu /dev/hda
That will list your partitions.
Also what is
ls -l /dev/hd*
fdisk -lu /dev/hda
That will list your partitions.
Also what is
ls -l /dev/hd*
ASKER
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 !!
...
/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 !!
Why don't you simply show all the output????
ls -l /dev/hd*
fdisk -lu /dev/hda
mount
ls -l /dev/hd*
fdisk -lu /dev/hda
mount
ASKER
the box is on a development server and I cannot cut and paste all the information.
here is a screenshot.
redhat.bmp
here is a screenshot.
redhat.bmp
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.
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.
ASKER
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.
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.
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 ...
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 ...
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ls -l /dev/hda2p5
say? Does it exist?
What does
fdisk -l
say?
What does
blkid
say?