deleting partition does not effect superblock?

Jan-Benedict Glaw jbglaw at lug-owl.de
Thu Apr 6 06:58:32 UTC 2006


On Thu, 2006-04-06 14:37:33 +0800, Sumit Narayan <talk2sumit at gmail.com> wrote:
> Shouldn't the superblock be changed/deleted once the partition is
> deleted? I tried a reboot, but the output remained the same.

No, everything you see is "works as expected."  A partition is only a
container (as well as "disks", "volume groups", "RAID arrays",
"logical volumes", "image files" etc. are.)

Whenever you destroy such a container, its contents isn't modified (or
deleted) or otherwise modified. So it's perfectly okay to delete such
a container (eg. remove start and end from the partition table) and
recreate it at some time later (by adding those values back to the
partition table.)  As long as the new container starts at the same
location, a filesystem driver will be able to find the old
information. If you start a block later, it won't find it's
superblocks.

Finally, you have several choices how to defeat getting back old data.
Most probably, you'd just zero it out before deleting the partition
with something like:

# cat /dev/zero > /dev/hda3

(of course with the correct device name!)

MfG, JBG

-- 
Jan-Benedict Glaw       jbglaw at lug-owl.de    . +49-172-7608481             _ O _
"Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg  _ _ O
 für einen Freien Staat voll Freier Bürger"  | im Internet! |   im Irak!   O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/ext3-users/attachments/20060406/b3a0e144/attachment.sig>


More information about the Ext3-users mailing list