Hi all, I've got an interesting issue with disk usage. I have a hard disk image (from dd) stored on a server, and it needs to be compressed it to make room for other data. The image is 160 GB, but I only have 30 GB of free space to work with; the data isn't compressible enough to fit in 30 GB in the meantime. I don't need the image right now and having only a compressed copy is perfectly fine. How can I compress the image while simultaneously deleting the old data? I can think of a way to do it using perl, dd, and some other tools, but I'd much prefer to do it the "right" way if there is one. Eric
Perhaps... 1. Copy off a chunk of it with a split-like tool (dd may do the trick with "seek") or some code. Make the chunk small enough such that the chunk copy and the compressed version of the chunk will fit in 30GB. 2. Compress the chunk. 3. Truncate the chunk off of the disk image. 4. Repeat. It's risky, though, since the original file gets altered. -Adam On 2/18/07, Eric Stein <eastein@wpi.edu> wrote:
Hi all,
I've got an interesting issue with disk usage. I have a hard disk image (from dd) stored on a server, and it needs to be compressed it to make room for other data. The image is 160 GB, but I only have 30 GB of free space to work with; the data isn't compressible enough to fit in 30 GB in the meantime. I don't need the image right now and having only a compressed copy is perfectly fine. How can I compress the image while simultaneously deleting the old data? I can think of a way to do it using perl, dd, and some other tools, but I'd much prefer to do it the "right" way if there is one.
Eric _______________________________________________ Wlug mailing list Wlug@mail.wlug.org http://mail.wlug.org/mailman/listinfo/wlug
-- -Adam
Eric Stein wrote, on Feb 18, 2007 at 20:18 EST:
Hi all,
I've got an interesting issue with disk usage. I have a hard disk image (from dd) stored on a server, and it needs to be compressed it to make room for other data. The image is 160 GB, but I only have 30 GB of free space to work with; the data isn't compressible enough to fit in 30 GB in the meantime. I don't need the image right now and having only a compressed copy is perfectly fine. How can I compress the image while simultaneously deleting the old data? I can think of a way to do it using perl, dd, and some other tools, but I'd much prefer to do it the "right" way if there is one.
Is the image completely full or is there free space within the image? i.e., might you be able to resize it smaller with ext2resize or somesuch? -- Aaron
It is mostly full. It's not possible to shrink it enough to make a difference. Interesting idea, though. I'm borrowing a 200GB drive from a friend so I can use it as scratch space, but the IDE to USB adapter is producing some interesting results in /var/log/messages... Feb 21 22:23:30 glamdring kernel: usb 1-2: new high speed USB device using ehci_hcd and address 6 Feb 21 22:23:31 glamdring kernel: usb 1-2: configuration #1 chosen from 1 choice Feb 21 22:23:31 glamdring kernel: scsi7 : SCSI emulation for USB Mass Storage devices Feb 21 22:23:41 glamdring kernel: usb 1-2: USB disconnect, address 6 Feb 21 22:23:41 glamdring kernel: scsi 7:0:0:0: scsi: Device offlined - not ready after error recovery Does anyone know what this means? Is the drive dead? Eric Aaron Haviland wrote:
Eric Stein wrote, on Feb 18, 2007 at 20:18 EST:
Hi all,
I've got an interesting issue with disk usage. I have a hard disk image (from dd) stored on a server, and it needs to be compressed it to make room for other data. The image is 160 GB, but I only have 30 GB of free space to work with; the data isn't compressible enough to fit in 30 GB in the meantime. I don't need the image right now and having only a compressed copy is perfectly fine. How can I compress the image while simultaneously deleting the old data? I can think of a way to do it using perl, dd, and some other tools, but I'd much prefer to do it the "right" way if there is one.
Is the image completely full or is there free space within the image? i.e., might you be able to resize it smaller with ext2resize or somesuch?
------------------------------------------------------------------------
_______________________________________________ Wlug mailing list Wlug@mail.wlug.org http://mail.wlug.org/mailman/listinfo/wlug
participants (3)
-
Aaron Haviland
-
Adam Keck
-
Eric Stein