LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-14-2009, 03:37 AM   #1
wmasry
LQ Newbie
 
Registered: Nov 2009
Posts: 26

Rep: Reputation: 15
If i deleted a partition using fdisk , will that delete the data on this partition?


If i deleted a partition using fdisk , will that delete the data on this partition?

I want to use this in order to increase the partition size (after i increased the file system size).
 
Old 12-14-2009, 04:10 AM   #2
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Posts: 3,366
Blog Entries: 33

Rep: Reputation: 216Reputation: 216Reputation: 216
Hi, the real answer is no, but you won't be able to access it directly.

The file table will be gone, so the files will have no-names and just be data.

<edit>Looks like gparted copes well with the job, post #4 by syg00 and post #5 by exvor, thank you </edit>

gparted

There are programs that can recover data from a partition,

like testdisk and photorec,
http://www.cgsecurity.org/wiki/TestDisk
http://www.cgsecurity.org/wiki/PhotoRec

dd_rhelp and dd-rescue
http://freshmeat.net/projects/dd_rhelp/
http://www.garloff.de/kurt/linux/ddrescue/

The best option for you would be to backup the data first, then resize the partition,

format it, reboot, and finally copy the data back.

You might want to use "rsync" to backup and restore the files, it saves file-permisions

Cheers, Glenn

Last edited by GlennsPref; 12-14-2009 at 05:09 AM.
 
Old 12-14-2009, 04:21 AM   #3
divyashree
Senior Member
 
Registered: Apr 2007
Location: bbsr,orissa,India
Distribution: RHEL5 ,RHEL4,CENT OS5,FEDORA,UBUNTU
Posts: 1,362

Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by wmasry View Post
If i deleted a partition using fdisk , will that delete the data on this partition?

I want to use this in order to increase the partition size (after i increased the file system size).
After u delete the partition the data becomes raw data(without any format),so u need to recover ur data.

U should use lvm partitioning ,using which u can resize ur partition size(increase or decrease) without affecting the data .

Last edited by divyashree; 12-14-2009 at 04:24 AM.
 
Old 12-14-2009, 04:25 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,847

Rep: Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823
Quote:
Originally Posted by wmasry View Post
If i deleted a partition using fdisk , will that delete the data on this partition?
Nope - quite safe.
Quote:
I want to use this in order to increase the partition size (after i increased the file system size).
Do it in the other order. The resize will (generally) resize up to the size of the partition - saves having to worry about passing the actual size to the resize.
Generally you'd be better to use gparted to do the whole lot - a GUI like partition magic.
 
Old 12-14-2009, 04:48 AM   #5
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537

Rep: Reputation: 87
gparted will also allow you to extend a existing file system and its a gui. Tho I would only try this on a ext2 or ext3 partition. Otherwise its perfectly safe.
 
Old 12-15-2009, 05:25 AM   #6
wmasry
LQ Newbie
 
Registered: Nov 2009
Posts: 26

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by GlennsPref View Post
Hi, the real answer is no, but you won't be able to access it directly.

The file table will be gone, so the files will have no-names and just be data.

<edit>Looks like gparted copes well with the job, post #4 by syg00 and post #5 by exvor, thank you </edit>

gparted

There are programs that can recover data from a partition,

like testdisk and photorec,
http://www.cgsecurity.org/wiki/TestDisk
http://www.cgsecurity.org/wiki/PhotoRec

dd_rhelp and dd-rescue
http://freshmeat.net/projects/dd_rhelp/
http://www.garloff.de/kurt/linux/ddrescue/

The best option for you would be to backup the data first, then resize the partition,

format it, reboot, and finally copy the data back.

You might want to use "rsync" to backup and restore the files, it saves file-permisions

Cheers, Glenn
But what if i used the fdisk back again to create a new partition with a larger size , using the same first cylinder , will that effect the data or not
 
Old 12-15-2009, 07:08 AM   #7
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Caution: Playing with fire here. Much of this has not been thoroughly tested.

If I am not mistaken, creating, deleting, and re-sizing partitions only affects the partition tables**. For example, if you had a partition, formatted with a filesystem, and full of data, then you could delete it and create a new one with the same starting point and size, and everything would be intact.

If you create a new partition with different parameters, the first thing that happens is that the filesystem structure is no longer correct----then, once you create a new filesystem, you have effectively de-referenced all of the data. Even then, some of it is still intact and can be recovered.

The only way to be totally sure of all this is to run experiments on a system with no irreplaceable data.


**In addition to the primary partition table (4 entries), each logical partition has a 2-entry table as part of the "linked-list" structure when using extended/logical partitions.
 
Old 12-15-2009, 07:26 AM   #8
pierre2
Member
 
Registered: May 2009
Location: Perth, AU
Distribution: LinuxMint
Posts: 359
Blog Entries: 8

Rep: Reputation: 83
I have deleted a partition that I didn't want anymore (& therefore its data).
& then resized the required partition up a bit in size.

Takes a while, on a slow processor, but works ok with Gparted, for all of those functions.
 
Old 12-15-2009, 07:41 AM   #9
amit.bk02
LQ Newbie
 
Registered: Dec 2009
Posts: 4

Rep: Reputation: 0
Quote:
Originally Posted by wmasry View Post
If i deleted a partition using fdisk , will that delete the data on this partition?

I want to use this in order to increase the partition size (after i increased the file system size).
he frend the actual data is not deleted u just deleted access entry if want to access is just go to /etc/vi fstab see the device driver(label) mount it on any folder and take a backup if u want to incress the size you have to go throw lvm method ....for mounting use command mount/dev/(label name) /folder name ..................................
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
fdisk deleted my lenovo recovery partition. suyashram Linux - Newbie 4 04-09-2009 05:22 PM
Cannot delete partition with fdisk jackpal Linux - Hardware 2 07-18-2005 12:57 PM
What app can REALLY delete a partition? (not fdisk, parted, etc...) kornerr Linux - General 4 05-28-2005 01:14 PM
Cannot use fdisk to write partition data evolvedlight Slackware - Installation 4 04-20-2005 10:00 AM
I can't get rid of linux, can't delete partition with fdisk Dachy Linux - Newbie 14 05-05-2004 02:25 PM


All times are GMT -5. The time now is 07:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration