Delete and Re-create a Partition in Linux

Posted on 2007-10-01
Medium Priority
Last Modified: 2013-12-16
Greetings -

I have a VMWare ESX server that has a "temporary files" partition that has become corrupted.  This partition is not part of the ESX default installation, it is simply on the same server used for temporary image storage.  I've attempted to fix this with fsck, efsck, and a variety of other utilities to no avail.  I get superblock error messages and a bunch of other ugly error messages regardless of what I do.

What I want to do is delete this partition (named /dev/sda7) and recreate it.  It's been years since I've done this in UNIX so any help is appreciated.

A list of commands to run with short explanations of what they are would be appreciated.

Question by:amendala
1 Comment

Accepted Solution

sanjooz earned 2000 total points
ID: 19993885
If you are going to delete and recreate it anyway, why don't you format it?

mkfs.ext2 or mkfs.ext3 /dev/hda7

If you really really want to delete, take a look at this

or you can use gparted while running your linux system

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses
Course of the Month15 days, 6 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question