LinuxQuestions.org
Help answer threads with 0 replies.
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 08-02-2004, 02:58 PM   #16
Linux24
Member
 
Registered: Aug 2004
Distribution: Mandrake 10.1
Posts: 204

Rep: Reputation: 30

Quote:
Originally posted by win32sux
by the way, i'm still waiting for evidence that NOT running a defrag before doing a windows partition resize is better than running it...
That's not the point.

It's simply pointless to run a defrag on Windows XP before you resize the Windows XP partition because defrag does not do anything beneficial in Windows XP that helps a resize later.

Quote:
without this sorta evidence, advising people to not run a defrag seems really irresponsible on your behalf
It is not irresponsible because there are really no consequences for not running one. Running a backup on your data covers any possible loss anyway.

Quote:
it's always better to be safe than sorry...
But running defrag on Windows XP makes you no safer.

Quote:
J.W. wrote:

Perhaps the XP defrag process does not attempt to relocate all the files at the front of the drive, but in order to put the pieces in "closer proximity" to one another, they are being moved, and as a result, you would be increasing the probability for maximizing the amount of contiguous free space on the disk. In other words, rather than having files scattered throughout the disk, defragging will have the tendency to consolidate the files in such a way that the amount of contiguous space at the back of the drive is maximized.
Disk data is disk data, and whether the data is fragmented or not is irrelevant during a partition resize, since basically all the operation does is find all data elements and copy them to empty space.

Just make some backup CD's or DVD's of your data and just do the resize or blow everything away and install both OS's fresh. There is no risk if you run back everything up - except a lost hour reinstalling Windows. And even in this case you clear out your registry and empty off all the crud left behind by software being installed and uninstalled.
 
Old 08-02-2004, 06:50 PM   #17
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 84
Quote:
Originally posted by Linux24
Disk data is disk data, and whether the data is fragmented or not is irrelevant during a partition resize, since basically all the operation does is find all data elements and copy them to empty space.
I know that, but your conclusion is incorrect. Consider the following diagram, where a "." indicates free space, and an "X" indicates where a data file fragment is physically stored:

Before defrag:
...XXX...XXX...XXX...XXX

After defrag:
...XXXXXXXXXXXX.........

In this example, it would be impossible to resize the "before" partition, because there is no available free space at the end of the drive. In contrast, you would be able to resize the "after" partition, because there is free space available. Ergo, running a defrag prior to resizing is useful, and perhaps even necessary.

I suspect that you are concluding that because a defrag does not result in an increase to the total amount of unused space on the disk, then it does not peform any useful function, but that's not the point. Instead, by physically relocating the file fragments in close proximity to one another, you do have the chance to make more contiguous free space available, which is critical in terms of resizing the partition. -- J.W.
 
Old 08-03-2004, 10:35 AM   #18
Linux24
Member
 
Registered: Aug 2004
Distribution: Mandrake 10.1
Posts: 204

Rep: Reputation: 30
Quote:
Originally posted by J.W.
I know that, but your conclusion is incorrect. Consider the following diagram, where a "." indicates free space, and an "X" indicates where a data file fragment is physically stored:

Before defrag:
...XXX...XXX...XXX...XXX

After defrag:
...XXXXXXXXXXXX.........

In this example, it would be impossible to resize the "before" partition, because there is no available free space at the end of the drive. In contrast, you would be able to resize the "after" partition, because there is free space available. Ergo, running a defrag prior to resizing is useful, and perhaps even necessary.

I suspect that you are concluding that because a defrag does not result in an increase to the total amount of unused space on the disk, then it does not peform any useful function, but that's not the point. Instead, by physically relocating the file fragments in close proximity to one another, you do have the chance to make more contiguous free space available, which is critical in terms of resizing the partition. -- J.W.
100% wrong on all counts.

That is not how resizing works. Those are not constraints on resizing.

Resize does not require free space at the end of the drive to operate. Partition Magic 8.0+ does the following using your example:

Before resize (W=windoze data to prevent corporate filters from catching three X chars):
W_WWW__WW____WW___W

After resize (| marks end of partition)
W_WWWWWWWW__|_______

Resizing the partition copies all disk data, even that at the end, to empty space anywhere on the drive, and after it does that, it then clips off the end of the partition. This is why defragging is pointless before doing this. The resize activity itself moves the data for you.

No, resizing does not defragment the files, but it does fill up empty space with fragmented data previously at the end of your drive.

I resized my XP partition from 60 GB down to 30GB. I had 40GB free. But about 15 GB were at the *very back* of the partition. Partition Magic copied that data to the front and mashed all that 20GB into the 30GB space in the front (fragmented), and then clipped off the end of the partition where I added my Reiser partitions for Linux.

No data was lost. Following the resize, I could then defragment to try to reorganize the drive, IF I was seeing a performance hit. But I am not. My IBM 60GXP is pumping data through at the same benchmark previous to the resize without being defragmented. Fragmentation is 40%, and isn't hurting a thing for me on my system.

So, JW, it is not impossible to resize a partition before a defrag or if there is data sitting where the new partition will go, because good resizing programs move that data to empty space. You don't need to defrag.

Therefore, what you are saying about constraints on resizing being contiguous free space is completely incorrect.

Plus, you should also know that your example of what defrag does is only true in FAT16 and FAT32.

In NTFS, defrag does not move files to the front. It simply does the following, again, borrowing from your graphic:

Before defrag

WW__WW__WWWW___WWWW

After defrag
W____W____WWW____WWWW


And if you use a third party application like Norton Speeddisk, and you kill your swap file, and move every setting possible to do so, you could end up with this:

After defrag:

WWWWW_____________WWWW

Because Norton's product, depending on settings, often moves rarely accessed files to the very, very end of the partition. Performing a defrag like this is not going to help any newbie resize their partition because data is actually moved to the end of the partition, not just up front.

Luckily, as I have pointed out repeated, this doesn't matter, because resize will grab those last four W's and move them into the empty space alloted.

The only thing that stops you from resizing a partition is not having enough free space to place all of the data currently in the partition you wish to shrink. If you wish to expand the partition, then there are no constraints at all other than physical disk size and unallocated space available.
 
Old 08-03-2004, 11:42 AM   #19
Linux24
Member
 
Registered: Aug 2004
Distribution: Mandrake 10.1
Posts: 204

Rep: Reputation: 30
And on top of all of that, the How to resize partitions article that is linked from the FAQ on this website makes it clear that good resizing programs can overcome any limitations involved with free space being non contiguous.

http://mlf.linux.rulez.org/mlf/ezaz/...e.html#example
 
Old 08-03-2004, 05:43 PM   #20
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 84
Linux24 - I stand corrected on Partition Magic's ability to work around any issues associated with where file fragments may be physically located on the disk. I hadn't realized that Partition Magic could perform that kind of work on its own, but after reading your post and doing some Googling, I now have a better understanding, and I'll concede that my earlier comment regarding contiguous free space at the back of the drive to be much less applicable under NTFS than it once was under FAT32.

As for the need or benefit to performing a defrag however, we will need to agree to disagree. The basis for your position appears to be largely based on the TechBuilder article you cite, but even in that article the author states "defragmenting remains an important task" and as the links that win32sux posted, even Microsoft itself recommends defragging. Those seem like pretty persuasive arguments, at least to me, although I have no doubt you would consider them otherwise. Fair enough. Regards -- J.W.
 
Old 08-03-2004, 10:27 PM   #21
Linux24
Member
 
Registered: Aug 2004
Distribution: Mandrake 10.1
Posts: 204

Rep: Reputation: 30
Quote:
Originally posted by J.W.
The basis for your position appears to be largely based on the TechBuilder article you cite, but even in that article the author states "defragmenting remains an important task" and as the links that win32sux posted, even Microsoft itself recommends defragging. Those seem like pretty persuasive arguments, at least to me, although I have no doubt you would consider them otherwise. Fair enough. Regards -- J.W.
My opinion on the value of defragging comes from two places. The article I cited was just what I was able to find on the first page and first entry of a web search.

The first place I learned that defragging is a big honkin' waste of time for the most part was Maximum PC magazine. I could pour over my many back issues and attempt to find one of the many places over the last year that various editors have written things like (paraphrased), "Defragging is over-rated. You can skip it in XP, because it won't make your games faster, and you ought to have a butt-load of ram since it is so cheap anyway."

The other place is my own benchmarking. I used to defrag my hard drive weekly for years, until I started reading that kind of thing. So I let it go, with daily use, for months, and then benchmarked it several times. Then I defragged and benchmarked again using a simple freeware executable that reads and writes to measure data throughput and seek times. There was a difference, but it was not noticable. It was something like .4 ms on seek time and data throughput was the same around 24MB/sec.

Since I have no raw data to post, nor my real identity, nor any formal citations to make, people will just have to decide for themselves, and I agree that just dropping it at this point is wisest, because little progress would be made from here on out, and even if anyone did all the work to find the truth, almost nothing would be gained, since almost no techno-dolt computer users will ever defrag their drives anyway, and almost no power user can be talked out of attempting even a .1% gain in performance no matter the cost. So, oh well.

Further, I apologize for any abrasive tone that comes across in my writing. Sometimes I am multitasking when I answer articles, and I often lack the discipline to wait until I am more rested or have more time, and when I do that, I forget to polish it up into a more diplomatic, tasteful tone. So, apologies for any text-based rough-housing on my part. I'll try and do better in the future.
 
Old 08-03-2004, 11:04 PM   #22
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 84
Linux24 - Agreed. As for any "text-based rough-housing" (which is a nice turn of a phrase BTW) I appreciate the olive branch. Sometimes certain discussions can get, well, a bit "lively", but as long as the conversations remain civil, and the discussion does not descend into a series of angry insults and personal attacks, then the occasional challenge or defense of a particular technical point can produce positive results. At least for me, certainly this discussion was beneficial because I learned a couple of things I hadn't known before, thanks to the info you provided.

In any event, time to move onward. Based on your profile it appears that you've just recently joined LQ within the past few days, so if no one has mentioned it before, let me say: Welcome to LQ! -- J.W.
 
  


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
Installing Mandrake 10.1 zathrus Mandriva 3 02-28-2005 07:29 PM
Installing Mandrake w/o CD agentscott00 Linux - Newbie 1 10-11-2004 01:48 AM
Installing Mandrake 9.2 Z3r01 Linux - Newbie 4 03-06-2004 06:06 PM
installing mandrake nathan15243 Linux - Newbie 13 11-23-2003 11:40 AM
qt-2.3.2 installing on mandrake 8.2 unknown_errors Linux - Software 0 06-19-2002 01:25 AM


All times are GMT -5. The time now is 10:39 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