Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I created an ext4 file system on /dev/sda1 yesterday to test the drive before trying to add it to a RAID. It's a 3 TB drive, so I'm trying to use parted to do all my partition stuff.

I've done an rm 1 and then print shows no partitions. If I then do mkpart primary 0% 100% (no file system specified), and then do print it shows the partition with an ext4 file system.

How can I remove the partition so that it also then removes the file system?

share|improve this question
up vote 2 down vote accepted

Parted didn't automatically create a filesystem; you created it.

When you deleted the partition, that's the only thing you deleted. Deleting the partition doesn't delete any of the data within the partition, so there's still a valid ext4 filesystem there. Thus, when you recreate the partition and print the partition table, it can be clearly seen.

To resolve the issue, erase the hard drive or the partition, or simply create a new filesystem on the partition.

share|improve this answer
What should I do to "erase the hard drive"? I've tried doing a mklabel to over write everything, but even that didn't solve it. – tubaguy50035 May 12 '13 at 2:46
So just for clarification, the partition did go away, but since I created over the same space, all of that data that set up the file system was still intact? – tubaguy50035 May 12 '13 at 3:21
Right, you only deleted the partition, not any of the data within it. – Michael Hampton May 12 '13 at 3:21
Works for me. dding right now. – tubaguy50035 May 12 '13 at 3:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.