MacNN Forums (http://forums.macnn.com/)
-   Mac OS X (http://forums.macnn.com/mac-os-x/)
-   -   Defragmentation by cloning/re-cloning with Disk Utility? (http://forums.macnn.com/90/mac-os-x/376691/defragmentation-cloning-re-cloning-disk-utility/)

 
Krank Sep 11, 2008 08:45 AM
Defragmentation by cloning/re-cloning with Disk Utility?
To take up a question posted in another forum:

I've used Disk Utility (booting from the OSX install disk) to clone my system, the purpose being to re-install in a defragmented state so Bootcamp can finally partition the drive.

Questions:

1. Is this really a viable way to defragment? I've just learned that there are two 'levels' of disk imaging; one of which actually maintains the fragmentation by making an exact copy. Which one is Disk Utility using?

2. How do I check that the disk image created will work? It's now on an external FW drive. I've been told to boot from this, but don't know how.

3. In case the .dmg turns out to be fine, do I choose the option 'erase disk' in Disk Utility's 'Restore' menu?

Your help is much appreciated.
 
TETENAL Sep 11, 2008 11:45 AM
Obviously, if you choose not to erase the drive with Disk Utility before restoring, then it is not making a sector for sector clone since it obviously can't. So erase the drive yourself beforehand and don't check that box in Disk Utility. Files should be restored in one big chunk. Whether Disk Utility makes a sector for sector clone when you do check the erase option I don't know.

When you hold down the option key while booting you will see a screen that allows you to choose the boot volume. You can also choose the boot volume in System Preferences. Use either method to boot from the external drive.
 
Krank Sep 13, 2008 08:00 AM
Quote, Originally Posted by TETENAL (Post 3723389)
Obviously, if you choose not to erase the drive with Disk Utility before restoring, then it is not making a sector for sector clone since it obviously can't. So erase the drive yourself beforehand and don't check that box in Disk Utility. Files should be restored in one big chunk. Whether Disk Utility makes a sector for sector clone when you do check the erase option I don't know.

When you hold down the option key while booting you will see a screen that allows you to choose the boot volume. You can also choose the boot volume in System Preferences. Use either method to boot from the external drive.
Thanks a lot.

I've tried before without checking 'erase drive', and got an error message (that I can't recall). Possibly because there simply wasn't enough room on the internal disk. I guess it's a given that I should either wipe it first or check that box. I'll see how it goes now.
 
tooki Sep 13, 2008 02:34 PM
OK, so there are two kinds of Restore: file copy and block copy. File copy is much like making Finder copies, and does defragment in the process, but takes a while. Block copy is true disk cloning, where all fragmentation, etc is preserved, but it's faster. Block copy is triggered by selecting "erase disk" in the Restore part of Disk Utility.

For your case, you want the file copy, so you must not select "erase drive" in Restore. Instead, first erase the destination disk in Disk Utility, then do a Restore without "erase drive".

Are you going to be cloning back to the original disk? If so, then you can do a block copy in one direction and a file copy in the other. Order doesn't matter.
 
Simon Sep 13, 2008 03:34 PM
What other conditions need to be met for block copy? I thought there was some issue with the size of the source and target partitions. I regularly set it to erase the target drive and yet I still always get file copies rather than block copies.
 
tooki Sep 13, 2008 06:14 PM
I think the target must be larger than the source, and you can't do it from a live volume, you must be booted from another disk (such as an OS X install disc).
 
Krank Sep 14, 2008 01:07 PM
tooki, thanks so much for helping out.

I'm stuck with a simple problem: I can't seem to boot from the disk image I've created on the external drive. There's a .dmg on the disk with the correct file size (and it took hours to create), but it doesn't show up as boot volume in System Preferences nor when holding down the 'option' key when re-starting. I don't want to proceed cloning it back until I know it's okay. What could be the problem? FWIW, it's a bus-powered FireWire drive.
 
Cold Warrior Sep 14, 2008 01:22 PM
It won't work that way. Open Disk Utility and click the Restore tab. As the source, choose the .dmg you created, and as the destination, drag your external drive from the left-hand pane to the Destination field. Now when you choose restore, it will use the .dmg to make a bootable system on the external.
 
OreoCookie Sep 14, 2008 02:59 PM
BTW, these days, you don't need to defrag your disk anymore. MacOS X automatically defrags your drive in the background*. I don't think you'll notice any difference.

* Only certain files are defragged, I don't remember the exact size anymore, though.
 
tooki Sep 14, 2008 03:08 PM
Files under 20MB are automagically defragged upon use. However, Mac OS X does not defragment free space, which can also be a worthwhile endeavor for demanding applications. (For everyday use, it's not worth the effort.)
 
Krank Sep 14, 2008 07:00 PM
Quote, Originally Posted by OreoCookie (Post 3724957)
BTW, these days, you don't need to defrag your disk anymore. MacOS X automatically defrags your drive in the background*. I don't think you'll notice any difference.

* Only certain files are defragged, I don't remember the exact size anymore, though.
Well, BootCamp can't proceed, so some kind of defragmentation is needed.
 
Krank Sep 14, 2008 07:03 PM
Quote, Originally Posted by Cold Warrior (Post 3724913)
It won't work that way. Open Disk Utility and click the Restore tab. As the source, choose the .dmg you created, and as the destination, drag your external drive from the left-hand pane to the Destination field. Now when you choose restore, it will use the .dmg to make a bootable system on the external.
Thanks, I'll go ahead and try that. How come this step is necessary though?
 
tooki Sep 15, 2008 01:04 AM
Because a disk image is a file, not a disk. The actual boot files are then hidden inside that dmg file, instead of right inside the disk where the boot ROM can find them.

I think somehow there was some confusion between using Disk Utility to make a clone vs using it to make a disk image. That said, to defragment by copying back, either way should work fine.
 
tooki Sep 15, 2008 01:05 AM
Quote, Originally Posted by Krank (Post 3725069)
Well, BootCamp can't proceed, so some kind of defragmentation is needed.
Specifically, a free-space defragmentation. During normal use, even if none of the files are fragmented, all the free space on the disk becomes broken up into a zillion pieces. I imagine that's what causes Boot Camp fits.
 
Krank Sep 15, 2008 04:02 AM
Quote, Originally Posted by tooki (Post 3725149)
Because a disk image is a file, not a disk. The actual boot files are then hidden inside that dmg file, instead of right inside the disk where the boot ROM can find them.

I think somehow there was some confusion between using Disk Utility to make a clone vs using it to make a disk image. That said, to defragment by copying back, either way should work fine.
Thanks again - great to have that clarified.
 
Krank Sep 21, 2008 07:46 AM
Sorry - still having trouble. I've tried to 'restore' repeatedly, but each time get an error message at the end (after hours of seemingly copying just fine).

Could it be because I've used the internal drive a bit after making the disk image, so it's not an exact clone anymore?

Should I erase (wipe) the internal drive first?
 
Krank Sep 23, 2008 06:59 AM
bump
 
Krank Sep 23, 2008 03:18 PM
Oh, and does it make a difference if the disk image is compressed?
 
itistoday Sep 24, 2008 01:04 PM
Quote, Originally Posted by tooki (Post 3724617)
OK, so there are two kinds of Restore: file copy and block copy. File copy is much like making Finder copies, and does defragment in the process, but takes a while. Block copy is true disk cloning, where all fragmentation, etc is preserved, but it's faster. Block copy is triggered by selecting "erase disk" in the Restore part of Disk Utility.
That's why it took 6 HOURS to copy all my crap back over! Haha! I just did this yesterday after installing a new hard drive in my MBP.

I did click "erase disk" at first though, and it gave me some error... Oh well, at least all my stuff is defragged now. Just a warning to those that are going to do this, prepare to find something else to do for the rest of the day!
 
Maflynn Sep 24, 2008 01:29 PM
If you wanted your drive defragged why not just use idefrag, it only costs 35 bucks and for a defragmentation program it seems to be highly regarded.
 
Simon Sep 25, 2008 03:13 AM
I highly doubt wasting six hours is worth the minute gains you might observe after defragmenting in addition to what OS X already does by itself.
 
Maflynn Sep 25, 2008 07:51 AM
Not only six hours a couple of weeks to figure it out, which is why I mentioned idefrag. While the debate over defragging in osx rages on the. The fact remains (at least in my twisted brain) that buying an application that does this instead of backing up/formatting/restoring is much more efficient.
 
asmartin88 Sep 26, 2008 06:05 PM
I'd like to make an image file copy of my boot drive and store it on one of my other two 1TB internal drives. Both of those drives have only one partition with plenty of space, and one of the drives is my Time Machine drive.

Am I correct that as long as I don't check "Erase destination", I get an image file copy?
Must the destination be "wiped" prior to the copy, or can I copy to a disk that has other files on it?
Is it recommended to create another partition on either of these disks to better protect the copy?
What utility do I use to do the partitioning?
 
CharlesS Sep 26, 2008 06:10 PM
Quote, Originally Posted by Maflynn (Post 3731000)
Not only six hours a couple of weeks to figure it out, which is why I mentioned idefrag. While the debate over defragging in osx rages on the. The fact remains (at least in my twisted brain) that buying an application that does this instead of backing up/formatting/restoring is much more efficient.
Well, you want to back up first before running any defrag utility anyway, so you're really only saving yourself the restore phase.
 
Maflynn Sep 26, 2008 06:25 PM
Quote, Originally Posted by CharlesS (Post 3731845)
Well, you want to back up first before running any defrag utility anyway, so you're really only saving yourself the restore phase.
With TM, you really don't need to take that extra step, so again, you're not buying anything by going the backup/restore approach.
 
All times are GMT -4. The time now is 10:06 AM.

Copyright © 2005-2007 MacNN. All rights reserved.
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2016, vBulletin Solutions, Inc.


Content Relevant URLs by vBSEO 3.3.2