LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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, 02: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, 03:10 AM   #2
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,654
Blog Entries: 33

Rep: Reputation: 283Reputation: 283Reputation: 283
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 04:09 AM.
 
Old 12-14-2009, 03:21 AM   #3
divyashree
Senior Member
 
Registered: Apr 2007
Location: Bangalore, India
Distribution: RHEL,SuSE,CentOS,Fedora,Ubuntu
Posts: 1,386

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 03:24 AM.
 
Old 12-14-2009, 03:25 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,119

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
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, 03: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, 04: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, 06:08 AM   #7
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
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, 06:26 AM   #8
pierre2
Member
 
Registered: May 2009
Location: Perth, AU
Distribution: LinuxMint
Posts: 388
Blog Entries: 9

Rep: Reputation: 88
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, 06: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 04:22 PM
Cannot delete partition with fdisk jackpal Linux - Hardware 2 07-18-2005 11:57 AM
What app can REALLY delete a partition? (not fdisk, parted, etc...) kornerr Linux - General 4 05-28-2005 12:14 PM
Cannot use fdisk to write partition data evolvedlight Slackware - Installation 4 04-20-2005 09:00 AM
I can't get rid of linux, can't delete partition with fdisk Dachy Linux - Newbie 14 05-05-2004 01:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:44 AM.

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
Open Source Consulting | Domain Registration