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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
12-14-2009, 02:37 AM
|
#1
|
LQ Newbie
Registered: Nov 2009
Posts: 26
Rep:
|
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).
|
|
|
12-14-2009, 03:10 AM
|
#2
|
Senior Member
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,696
|
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.
|
|
|
12-14-2009, 03:21 AM
|
#3
|
Senior Member
Registered: Apr 2007
Location: Bangalore, India
Distribution: RHEL,SuSE,CentOS,Fedora,Ubuntu
Posts: 1,386
Rep: 
|
Quote:
Originally Posted by wmasry
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.
|
|
|
12-14-2009, 03:25 AM
|
#4
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,384
|
Quote:
Originally Posted by wmasry
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.
|
|
|
12-14-2009, 03:48 AM
|
#5
|
Senior Member
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537
Rep:
|
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.
|
|
|
12-15-2009, 04:25 AM
|
#6
|
LQ Newbie
Registered: Nov 2009
Posts: 26
Original Poster
Rep:
|
Quote:
Originally Posted by GlennsPref
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
|
|
|
12-15-2009, 06:08 AM
|
#7
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809
|
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.
|
|
|
12-15-2009, 06:26 AM
|
#8
|
Member
Registered: May 2009
Location: Perth, AU
Distribution: LinuxMint
Posts: 390
Rep:
|
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.
|
|
|
12-15-2009, 06:41 AM
|
#9
|
LQ Newbie
Registered: Dec 2009
Posts: 4
Rep:
|
Quote:
Originally Posted by wmasry
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 ..................................
|
|
|
09-17-2024, 03:08 PM
|
#10
|
LQ Newbie
Registered: Sep 2024
Posts: 2
Rep:
|
Deleting a partition with fdisk removes the metadata that tells the operating system where the partition starts and ends on the disk. However, the data within the deleted partition is not immediately destroyed. It remains on the disk, but without the partition table entry, the operating system cannot access or recognize this data in a normal way. At least i understand it is like that. Correct me if i am wrong.
Last edited by rtmistler; 11-27-2024 at 06:12 AM.
|
|
1 members found this post helpful.
|
09-17-2024, 05:18 PM
|
#11
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,674
|
Quote:
Originally Posted by creggy
Deleting a partition with fdisk removes the metadata that tells the operating system where the partition starts and ends on the disk. However, the data within the deleted partition is not immediately destroyed. It remains on the disk, but without the partition table entry, the operating system cannot access or recognize this data in a normal way. At least i understand it is like that. Correct me if i am wrong
|
Right, that's what everyone said **FIFTEEN YEARS AGO** when this thread was created.
|
|
|
09-17-2024, 06:47 PM
|
#12
|
LQ Guru
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 11,201
|
I will repeat myself: this forum software should "auto-lock" forum threads after a (fairly short) period of time. Thereafter, you can certainly refer to them, through an appropriate URL, but you cannot resurrect them.
Now, as to this "resurrected topic" today. Today, "it is no longer necessary."
Today, LVM = Logical Volume Management eliminates the need for this sort of "partition twiddling." (This is the default installation option for most distros ... for very obvious reasons. And, it can be added later.) Disk partitions are combined to create so-called "storage pools," to which "logical volumes" are assigned. The operating system and its users directly see only these "volumes," which may be spread across multiple partitions and drives. Unlike the "bad old days" when a "mount point" corresponded to a single physical resource, that is no longer the case.
The facility provides other very pragmatic features. For example, if a particular drive "begins to make ominous clicking noises," you can remove all of the data from this drive without(!) downtime.
So, today, the user would simply create a new partition somewhere, and "add it to a storage pool." Then, expand the filesystem to recognize the additional space. Today, this process is very easy to do.
In general, the designers of this subsystem did an exceptional job of engineering. (Is there a 'Nerd Award?' ...)
Last edited by sundialsvcs; 09-17-2024 at 06:51 PM.
|
|
|
11-27-2024, 01:39 AM
|
#13
|
LQ Newbie
Registered: Sep 2024
Posts: 2
Rep:
|
THat makes sense
|
|
|
11-27-2024, 01:45 AM
|
#14
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,253
|
this is just spam. edited post (#10) with a link to a windows software
|
|
1 members found this post helpful.
|
All times are GMT -5. The time now is 11:26 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|