Does Disk Utility defragment files during clone?

Scenario:
Boot from OS X (10.6) install disc > run Disk Utility > format a second drive (internal SATA) using HFS+ (Journaled) > Restore tab > Erase and Restore function
Question:
Does the above procedure actually defragment file clusters or just remove fragmented free space during the 'clone' process?
Thanks in advance for knowledge.
Note - this question was prompted by a post regarding fragmented Aperture library databases but I realized this is probably a better place to raise the question.

No. When you clone to a freshly formatted drive the result is by definition defragmented. That is because the destination's sector blocks are sequential. Fragmentation only occurs when a file is changed and requires more space than was used by the previous version. If there isn't a contiguous block of space available then the OS uses any available block elsewhere. This results in the file not being saved in a contiguous block of space - hence fragmentation.
Therefore, when you clone a drive to a newly formatted drive the result is a fully defragmented drive. This is the fastest and safest way to defragment a drive: clone it to a newly formatted drive, erase the fragmented drive, then clone back.
Fragmentation is unlikely to occur unless files over 20 MBs are being frequently changed and re-written to a drive that hasn't enough free space to continuously change large files that are growing. These files can no longer be saved into a contiguous block of space - hence they become fragmented. Otherwise OS X automatically defragments files under 20 MBs on the fly. Typically rapid drive fragmentation is more a problem from small files than very large ones.

Similar Messages

  • Does disk utility repair delete any files on external hard drive?

    Does disk utility repair disk delete any files on the external hard drive?

    diskutil list
    Last login: Sun Dec 21 16:07:46 on console
    Justins-MacBook-Pro:~ justinmontoya$ diskutil list
    /dev/disk0
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:      GUID_partition_scheme                        *750.2 GB   disk0
       1:                        EFI EFI                     209.7 MB   disk0s1
       2:          Apple_CoreStorage                         749.3 GB   disk0s2
       3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
    /dev/disk1
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:                  Apple_HFS Macintosh HD           *748.9 GB   disk1
                                     Logical Volume on disk0s2
                                     4A646B29-3794-4A34-AC98-C0FB505D402B
                                     Unlocked Encrypted
    /dev/disk2
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:     FDisk_partition_scheme                        *500.1 GB   disk2
       1:                 DOS_FAT_32 500HDD WD               500.1 GB   disk2s1
    Justins-MacBook-Pro:~ justinmontoya$

  • How does disk utility decide which optical drive to use for burn?

    This is a somewhat daft question and purely out of interest.
    How does disk utility decide which optical drive bay to open for burning?
    I have two drives in a MacPro and both have the same capabilities (DVD-RW). Why does it sometimes open the lower one, and sometimes the top one?

    Grant Bennet-Alder wrote:
    The estimate is based on how long it already took to do how many blocks, and how many blocks are left to do. If you told it to overwrite 35 times, it will be a long, long time before it completes.
    The estimate is made grossly large by the presence of Bad Blocks that need to be Read during the test (not the case with Erase and Write Zeroes).
    Each Block is written with some redundancy bits, so that small errors can be corrected on reading. A Bad Block causes the drive to re-read. and re-read, and re-read, in hopes of getting correctable data the next time. This should NOT be an issue in writing. But if the drive stops responding (which can and does happen with a bad drive) the Erase function will just sit there, thinking it is making progress, and stretching out the time.
    Thanks, Grant.
    If I read your reply correctly, Erase and Zero Out free space shouldn't elongate the process, because there's no read occurring.
    The drive will not be Mounted while Disk Utility works on it, so it will not be on the Desktop. But ask Apple System Profiler \[ About this Mac > More Info > Serial ATA ] if the drive is still THERE . If it cannot be seen, you have your answer -- the drive dropped out of sight while being tested -- Bad Drive.
    Well, now I am confused. It's a FW800 drive. It's on the Desktop. And it appears under FireWire in System Profiler. AND Disk Utility shows a mount point. But the Unmount and Eject buttons are grayed out.
    Will the drive be mounted if it fails to respond to Disk Utility? That doesn't seem to make sense.
    How do I determine its status? It appears to be stuck at "1 day, 5 hours" but it'll take an hour for that to change. I think it's been that long since I first noticed the time.
    Harv

  • Disk Utility permissions - file does not exist ?

    I did just do a complete erase and re install.
    While in the rebuilding process`s i have noticed that when it comes to doing the update in the cycle of events, java updates will do one and then the updater will pause and check again install another java update and pause, blank screen , weird behavior. i just wait with patience while the system does it`s thing.
    I have built up to where there is no more updates available and as usual i do run the Disk Utility after each sequence of updates that the updater provides. I am running Disk Utility from the Machine and not from the upgrade to 10.5 CD or install 1 CD. I have seen that running D U from the CD does not give as full a report in comparison to what the machine does.
    Disk Utility shows this:
    Jul 23 20:42:17 Macintosh Disk Utility[164]: Permissions differ on "Library/Internet Plug-Ins/JavaPluginCocoa.bundle/Contents/CodeResources", should be -rw-rw-r-- , they are lrw-rw-r-- .
    when i go into the terminal to get a closer look with:
    $ ls -l Library/Internet Plug-Ins/JavaPluginCocoa.bundle/Contents/CodeResources
    ls: Library/Internet: No such file or directory
    ls: Plug-Ins/JavaPluginCocoa.bundle/Contents/CodeResources: No such file or directory
    and then this:
    $ ls -l /Library
    drwxrwxr-x 13 root admin 442 Jul 23 19:10 Internet Plug-Ins
    shows that it does exist.
    yet when i try:
    $ ls /Internet Plug-Ins
    ls: /Internet: No such file or directory
    ls: Plug-Ins: No such file or directory
    or
    $ ls -l /InternetPlug-Ins
    ls: /InternetPlug-Ins: No such file or directory
    Question: ? is a question mark, what do i do, what can i do ?.
    any feed back on this puppy ?.
    Thank you

    -rw-rw-r-- , they are lrw-rw-r--
    That's because you have updates installed that are more recent than the repair permissions data. Ignore it.
    ls -l Library/Internet Plug-Ins/JavaPluginCocoa.bundle/Contents/CodeResources
    You omitted the first / in the path, and you didn't escape the space. The correct command is:
    ls -l '/Library/Internet Plug-Ins/JavaPluginCocoa.bundle/Contents/CodeResources'
    or:
    ls -l /Library/Internet\ Plug-Ins/JavaPluginCocoa.bundle/Contents/CodeResources
    (52936)

  • Using Disk Utility Restore function to clone external hard drives

    Hi all,
    I have a WD 3Tb My Book external hard drive which I want to use as a replacement for an older WD 1Tb My Book external hard drive. I would like to use Disk Utility's built-in Restore function to clone my old external hard drive onto my new external hard drive. Unfortunately, Disk Utility will not allow me to drag the new drive to the "Destination" box; I can drag the old drive to the "Source" box just fine. Why is this? Am I doing something wrong?
    It might be important to note that my old external drive is formated to FAT32, whereas the new drive came pre-formatted to NTFS. Do I need to reformat the new drive to FAT32 before dragging the disk to the "Destination" box? In other words, do the source and destination drives need to be the same format in order to use Disk Utility's Restore function?
    Thanks very much in advance.

    Are these drives being used on Windows machines? If so then you will need to create a new partition from the Partition Scheme dropdown menu after which you can set the scheme to MBR. If the drives are being used only on the Mac then you have to prep the new drive as follows:
    Drive Preparation
    1. Open Disk Utility in your Utilities folder.
    2. After DU loads select your hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Click on the Partition tab in the DU main window.
    3. Under the Volume Scheme heading set the number of partitions from the drop down menu to one. Set the format type to Mac OS Extended (Journaled.) Click on the Options button, set the partition scheme to GUID (for Intel Macs) or APM (for PPC Macs) then click on the OK button. Click on the Partition button and wait until the process has completed.
    4. Select the volume you just created (this is the sub-entry under the drive entry) from the left side list. Click on the Erase tab in the DU main window.
    5. Set the format type to Mac OS Extended (Journaled.) Click on the Options button, check the button for Zero Data and click on OK to return to the Erase window.
    6. Click on the Erase button. The format process can take up to several hours depending upon the drive size.
    After you copy your files from the old drive to the new one you want to repartition and reformat the old drive in the same way as outlined immediately above.

  • Help! Can I recover Disk Utility erased files?

    Hi guys,
    Yesterday I was trying to install Leopard because I had software problem that made my ibook get stuck on the loading screen.
    Anyway, I was on my last step before it started to install when I got a message saying that I didn't have enough disk space to install the CD. I had just 2.7 GB available and the system required 11 GB. After trying to figure out what to do, I saw the Installer Menu Bar, clicked Open *Disk Utility*, clicked on Erase window, then clicked on one of the drives I saw on the left window. I didn't choose the 27.9 GB TOSHIBA disk, but the one under.
    Then from the Volume Format drop-down menu, I selected Mac OS Extended, and selected security option: "Don't Erase Data". Finally, on the right pane of the Disk Utility window, I clicked the Erase tab., and suddenly I had 27 GB available
    I thought that this “Erase” option just deleted previous deleted files, but not my whole hard disk.
    Then I went back to the install window, and clicked “Install"...knowing that I maybe lost all my data.
    I have tried to find my pictures and documents, but they are no where to find.
    Have I lost all my data? Is it possible to get it recovered?
    Please help me!
    Thanks in advance!

    sorry, but you are too far into this in order to be able to recover much. Data Rescue II or File Salvage are 2 decent utilities but you then installed software on top of your drive. This is assuring that a huge chunk of that drive is gone forever.
    what disk utility meant was that it wouldn't securly delete the data - that is write stuff on top of it. you did just a basic delete / format which deletes the info containing pointers to the files, not the actual files themselves.
    but installing OS X after that is going to permanatley delete 11GBs or so of data.
    you will need an external drive to even begin this process & there's no garuntee it will work. you can try data rescue for free to see if it finds anything, as file salvage does too.
    at this point, it's a shot in the dark.
    ALWAYS keep backups & NEVER erase a drive with such important info.
    http://subrosasoft.com/OSXSoftware/index.php?mainpage=product_info&productsid=1
    http://www.prosofteng.com/products/data_rescue.php
    Message was edited by: kmac1036

  • How does Disk Utility estimate completion time?

    I'm sending an external drive back to the vendor for troubleshooting, and want to make it more difficult for a curious tech to examine the data there. So I told Disk Utility to Zero Out Data and Erase Free Space. The drive was just initialized, so it's all free space. Did I mention it's a 2 TB FW800 drive?
    Anyway, when I started this yesterday, the time estimate was 14 hours. (No hissing please.) Sleep is only enabled for the display: computer and HDs are set to "Never" sleep.
    When I checked this afternoon (about 24 hours later) the estimate was "1 day, 5 hours."
    How is this estimate calculated?
    Thanks,
    harv47

    Grant Bennet-Alder wrote:
    The estimate is based on how long it already took to do how many blocks, and how many blocks are left to do. If you told it to overwrite 35 times, it will be a long, long time before it completes.
    The estimate is made grossly large by the presence of Bad Blocks that need to be Read during the test (not the case with Erase and Write Zeroes).
    Each Block is written with some redundancy bits, so that small errors can be corrected on reading. A Bad Block causes the drive to re-read. and re-read, and re-read, in hopes of getting correctable data the next time. This should NOT be an issue in writing. But if the drive stops responding (which can and does happen with a bad drive) the Erase function will just sit there, thinking it is making progress, and stretching out the time.
    Thanks, Grant.
    If I read your reply correctly, Erase and Zero Out free space shouldn't elongate the process, because there's no read occurring.
    The drive will not be Mounted while Disk Utility works on it, so it will not be on the Desktop. But ask Apple System Profiler \[ About this Mac > More Info > Serial ATA ] if the drive is still THERE . If it cannot be seen, you have your answer -- the drive dropped out of sight while being tested -- Bad Drive.
    Well, now I am confused. It's a FW800 drive. It's on the Desktop. And it appears under FireWire in System Profiler. AND Disk Utility shows a mount point. But the Unmount and Eject buttons are grayed out.
    Will the drive be mounted if it fails to respond to Disk Utility? That doesn't seem to make sense.
    How do I determine its status? It appears to be stuck at "1 day, 5 hours" but it'll take an hour for that to change. I think it's been that long since I first noticed the time.
    Harv

  • Why Does Disk Utility Say "This Partition Can Not Be Modified"

    I've got an external drive with three partitions. I want to expand the first partition. (It's a backup of my internal drive and it isn't big enough anymore.)
    All partitions are Journaled. All verify okay. The disk's partition map is GUID.
    Disk utility will change the size of the 2nd and 3rd partition, but when I click on the first partition, the one I want to expand, it says "This partition can not be modified."
    I've tried making another partition smaller, but that doesn't help.
    Does anyone know why? Or what I can do about it? (Can I delete that partition, make another one smaller and then create a new bigger one?)
    Many thanks in advance.
    Steve

    Thanks, guys.
    I ended up taking one of the existing partitions, making it smaller and then adding a partition of the size I needed -- created out of the space freed up. I also erased the original partition that I couldn't change and Disk Utility now says I can make it smaller, but not bigger.
    Bottom line in my case -- all partitions except the first could be made smaller. But none could be made larger. (Maybe the first one couldn't be made smaller because it was full?). That caveat -- 'you can make 'em smaller but not larger' -- is not mentioned in the help file, but that's what I saw.
    Make sense?
    Thanks again,
    Steve

  • Does disk utility damage the Hybrid MBR

    I have a dual boot system for Mac X 10.8 and Windows 8 and there are 5 partitions on my internal HD (EFI, Mac OS X, HD Recovery, Mac HFS Data, NTFS Windows 8). I created a custom Hybrid MBR that allows dual boot to partitions 2 and 5 and protects the remaining partitions. The MBR shows 4 partitions (max allowed) so it does not precisely agree with the GPT. This all worked fine in conjuction with rEFIt for booting.
    Recently after using Disk Utility to check and repair my internal HD the custom MBR was apparently compromised because I was unable to boot into Windows. My question is then, "Can Disk Utility damage the MBR that I carefullly customised?" I could rebuild the MBR using gdisk in terminal but I don't want to have to repeat this unnecessarily. If not Disk Utility, do other programs mess with this area of the disk? I also use Carbon Copy Cloner to make a periodic clone of my start-up partition.

    diskutil list
    Last login: Sun Dec 21 16:07:46 on console
    Justins-MacBook-Pro:~ justinmontoya$ diskutil list
    /dev/disk0
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:      GUID_partition_scheme                        *750.2 GB   disk0
       1:                        EFI EFI                     209.7 MB   disk0s1
       2:          Apple_CoreStorage                         749.3 GB   disk0s2
       3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
    /dev/disk1
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:                  Apple_HFS Macintosh HD           *748.9 GB   disk1
                                     Logical Volume on disk0s2
                                     4A646B29-3794-4A34-AC98-C0FB505D402B
                                     Unlocked Encrypted
    /dev/disk2
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:     FDisk_partition_scheme                        *500.1 GB   disk2
       1:                 DOS_FAT_32 500HDD WD               500.1 GB   disk2s1
    Justins-MacBook-Pro:~ justinmontoya$

  • Where does Disk Utility define NFS mounts?

    Hi, I used to use Disk Utility to define a NFS mount point for my Drobo, but then I sold the Drobo and deleted the mount point from Disk Utility.  However, my system.log file shows that rpc.statd is trying to find the Drobo once every hour still.  I double checked and there is nothing listed in auto_master, so the only place I can think of that Disk Utility defines the mounts within is Directory Services but I can't find where.  Does anyone know where Disk Utility defines NFS mounts and how I can clear it out?

    Mountain Lion NFS Mounts Missing In...: Apple Support Communities

  • Disk Utility: Defrag and Scandisk

    Hey all!
    I was looking into running a disk defrag on my computer but apparently defrag runs in the background all the time.
    I dropped the macbook while it was on today and I am afraid of a head crash. Is there any utility to run such as scan disk to check for any disk errors?

    Open Disk Utility in your Utilities folder. Select the hard drive entry (mfgr.'s ID and drive size) from the left side list. Click on the First Aid tab. In the DU status are look for the SMART info. If it does not say "Verified" then the drive has failed. Otherwise, click on Verify Disk button. If no errors are reported the drive is OK. If errors are reported then you will need to boot from your OS X Installer Disc and run Disk Utility from the installer's Utilities menu. Select your startup volume then click on First Aid tab. Click on the Repair Disk button. If errors are reported that are fixed, then re-run Repair Disk until no errors are reported.

  • Does Disk Utility work in FireWire Target Disk Mode?

    I have the dreaded "overlapped extent allocation" disk error on my PowerBook G4 FW800, which I discovered when attempting to install Tiger. I can still boot into 10.3.9.
    My question: Can I run Disk Utility from my G4 PowerMac (Tiger10.4.7) with my PowerBook in Target Disk Mode? I have seen this mentioned in some discussion threads, but others say it won't work.
    Alternatively, is there another way (e.g. ethernet) to connect the two to fix the problem?
    PowerBook G4 15" 1GHz FW800   Mac OS X (10.3.9)  

    Thank you.
    I ran Disk Utility via TDM and it repaired the problem. Luckily, the corrupted files were not important.
    PowerBook G4 15" 1GHz FW800   Mac OS X (10.3.9)  

  • Disk Utility -- SUID FILES "will not be repaired"

    Last night I ran Disk Utility.
    After repair I received this message --
    Warning: SUID file "usr/liveecec/load_hdi" had been modified and will not be repaired.
    There is a list of nine similar SUID errors illustrated in screen snap shot at this link:
    http://homepage.mac.com/boot321/Permission/PhotoAlbum12.html
    I've recently upgraded to 10.5.1
    Discovering nine problems that cannot be "repaired" by disk utility gives me concern.
    I run a fairly conservative series of applications on my G5. Can anyone advise on what may be needed here?
    thank you,
    Mike

    boot321 wrote:
    On the link from Michael Conniff suggesting I read the article that Mac posted saying "not a cause for concern" -- there is only ONE Warning that is illustrated. Since I had a total of NINE, I thought that may have consequence....
    Yes, the article appeared just after Leopard was released, when there was only one such message. The others appeared with 10.5.1.
    Maybe this will all go away in 10.5.2
    There has always been a lag between strange messages appearing and a KB article to explain them. In 10.2.2, we started seeing messages saying "We are using special permissions for the file or directory …". Initially there was just one: by 10.4.4, there were almost too many to count. In 10.4.5, Apple suppressed these messages because all they did was spread alarm around this and other forums.
    I have no doubt we'll see the same happen with these SUID messages. If you're interested in what happened before, look at the links in this FAQ: Permissions Issues.

  • What does disk utility really do ?

    I downloaded a lion 10.8 dmg from internet and wanted to make a installation portable disk.
    And when I loaded the dmg, and used the 'disk utility' to restore installation files to one of my disk partitions, it just failed. And what is real annoying is that I got my disk partitions after the partition lost. And I can't get my important files back.
    Maybe the 'disk utility' want to change the partition to be bootable and made the partition tables damaged.
    Hope someone can help me to repair the disk and make the disk utility more secure !

    varjak paw wrote:
    There is no DMG of Lion, at least not anything legal. From where did you get this file?
    Well there is a DMG of both Lion and Mt Lion. But it is included in the Lion/Mt Lion OS X Install.app package files and can be copied out.
    But that is Not the Operating System. It is the Install files for the operating system. Restoring that DMG would, supposedly, give you bootable media for installing the OS on a drive.
    To the OP I have found that the Restore feature/function in Disk Utility doesn't always work as expected. Best thing to do is use this program for creating a Dual Layer DVD or USB thumb of the Mt Lion install files. It works every time.
    Make the USB thumb as most of the, Not So, Superdrives can't really write to Dual Layer DVDs. You will be very lucky if you have a Superdrive that will actually write to Dual Layer DVDs.

  • What does Disk Utility mean by saying the back up disk cannot be unmounted?

    Disk utility has been giving me that error and I get about the same message when Time Machine attempts to do a back up as well. What does it mean?

    Hi! When you try to do a repair on a disk it "unmounts" (removes it from the desktop) (which locks the directory) so it can be repaired. Unmounting also is required for an erase. Time Machine shouldn't be trying to unmount it for a backup in fact it could write to it if it unmounts. Tom

Maybe you are looking for