I am unable to delete a partition using fdisk

Solution Verified - Updated -

Issue

I am trying to delete a partition called /dev/sdw8 but unable to delete it.

'fdisk -l /dev/sdw' command display:

fdisk -l /dev/sdw 
 
Disk /dev/sdw (Sun disk label): 30 heads, 128 sectors, 54612 cylinders 
Units = cylinders of 3840 * 512 bytes 
 
   Device Flag    Start       End    Blocks   Id  System 
/dev/sdw8  u          0     54612 104855040    f  Unknown

deleteting the partition /dev/sdw8.

Command (m for help): p 
 
Disk /dev/sdw (Sun disk label): 30 heads, 128 sectors, 54612 cylinders 
Units = cylinders of 3840 * 512 bytes 
 
   Device Flag    Start       End    Blocks   Id  System 
/dev/sdw8  u          0     54612 104855040    f  Unknown 
 
Command (m for help): d 
Selected partition 4 

Saving the changes:

Command (m for help): w 
The partition table has been altered! 
 
Calling ioctl() to re-read partition table. 
Syncing disks. 

When I do 'print' the partition /dev/sdw8 it still appears:

Command (m for help): p 
 
Disk /dev/sdw (Sun disk label): 30 heads, 128 sectors, 54612 cylinders 
Units = cylinders of 3840 * 512 bytes 
 
   Device Flag    Start       End    Blocks   Id  System 
/dev/sdw8  u          0     54612 104855040    f  Unknown 

root@ls1oracmdr1sb ~]# fdisk -l /dev/sdw8 
 
Disk /dev/sdw8 (Sun disk label): 30 heads, 128 sectors, 54612 cylinders 
Units = cylinders of 3840 * 512 bytes 
 
    Device Flag    Start       End    Blocks   Id  System 
/dev/sdw8p8  u          0     54612 104855040    f  Unknown 

Trying to create a new partition to see if it takes

Command (m for help): n 
Partition number (1-8): 1 
Other partitions already cover the whole disk. 
Delete some/shrink them before retry. 

So I am unable to delete the partition. How do I fix this problem.

Environment

  • Red Hat Enterprise Linux 4
  • Red Hat Enterprise Linux 5

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content