Find the answer to your Linux question:
Results 1 to 6 of 6
I want to take an image of my OS hard drive. I'll be using Clonezilla. I know its useful to use "cleaner" that zeros out free disk space. But is ...
  1. #1
    Just Joined!
    Join Date
    Jun 2006
    Posts
    19

    Hard drive compacting software?

    I want to take an image of my OS hard drive. I'll be using Clonezilla. I know its useful to use "cleaner" that zeros out free disk space. But is it useful to compact the drive - to do away with gaps between files?

    If so, what software exists to do that. I know of several for Windows, but none for Linux (I have CentOS 6 on a 40 GB drive).

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,975
    I'm not 100% sure how Clonezilla works; however, from reading the "about" page at clonezilla.org, I think it basically makes a bit-image backup of a drive, which will not defragment the drive, per se, which I think is what you are getting at in essence. I perform regular bit-image backups of my system drive in case of some sort of disaster, such as my regular system drive going tits-up. I keep an identical drive available in case that happens which I can restore the last image to and get my system back online in a relatively short period. It still takes about an hour to restore a 320GB drive, but that's acceptable when compared to days or weeks of manual restoration...
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,975
    BTW, you really don't need to worry about defraging/compressing Linux file systems normally, unlike Windows file systems.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  4. #4
    Just Joined!
    Join Date
    Jun 2006
    Posts
    19
    Quote Originally Posted by Rubberman View Post
    BTW, you really don't need to worry about defraging/compressing Linux file systems normally, unlike Windows file systems.
    I'm not so much talking about de-fragmenting - placing all parts of a file in sequential disk access order. De-fragmenting can speed up execution.

    On the other hand, compacting moves bits to the beginning, middle, or end of the drive. Having bits at the beginning of the drive, doesn't change the image size, but may well allow the image to be recovered into a smaller partition than it was originally taken from.

    In any case, I gather from the replies to my post that compacting is not often done.

  5. #5
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,975
    Defragging often serves both purposes. In any case, the only way I know to "compact" a file system on Linux is to copy the files to another partition/drive, reformat the source partition, and then copy back to the source partition. Alternatively, you can make a bit image of the partition to another drive/partition, mount the image, reformat the source partition, and copy the files back to the source. The second method may be faster, depending upon how big the partition was in the first place. There are probably tools that can do an in-situ compression (which would also defrag the drive), but I'm not familiar with them. In this case, Google may be your best friend...
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  6. #6
    Just Joined!
    Join Date
    Jun 2006
    Posts
    19
    Quote Originally Posted by Rubberman View Post
    Defragging often serves both purposes. In any case, the only way I know to "compact" a file system on Linux is to copy the files to another partition/drive, reformat the source partition, and then copy back to the source partition. Alternatively, you can make a bit image of the partition to another drive/partition, mount the image, reformat the source partition, and copy the files back to the source. The second method may be faster, depending upon how big the partition was in the first place. There are probably tools that can do an in-situ compression (which would also defrag the drive), but I'm not familiar with them. In this case, Google may be your best friend...
    I tried Google. No luck so far. But thanks for trying.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...