I want to backup my partitions by shrinking it my issue is like
I want to create a new disk copy from only the used blocks I my current image.
How would I redirect the output of resize2fs to new disk and dd the current
partition so that I can boot my new image without issues and also without touching my current image and copying over of only the required data.
I understand that I can copy the entire disk and then resize the cloned disk but this seems inefficient as not all my disk is being used.
I dont want to hinder the current working disk manipulations on this should be avoided as I dont have any other backup.
So suppose I have a 2TB disk of which only 100GB is being used I need only these 100GB in the new disk. Is there any way of copying the used blocks in the existing filesystem to the new filesystem ?
Any pointer or clear ideas would be really useful. I appreciate this if I get some list of commands or steps and doing this without any software
Resizing only works in place. I'd just create a new filesystem and copy files into it.
To get it to boot though, you'll need to install grub on the new drive. This can be done from a linux livecd. Be sure to back up your grub configuration files in case installing grub stomps over them.
Last edited by Corona688; 10-08-2010 at 07:46 PM..
Thanks for the reply
Would it be efficient to copy entire data, is there any way to just copy over the blocks and adjust them according to the newly created filesystem ?
Would tar be able to handle the corrupted data like dd can handle since dd does a blind copy. Is there a way of like creating another sparse image file of 2TB then copying over only required data blocks there which will exclude the empty blocks and then resizing the sparse image to 200GB.
Thanks for the reply
Would it be efficient to copy entire data, is there any way to just copy over the blocks and adjust them according to the newly created filesystem ?
If I knew of any I'd have told you so the first time you asked.
Quote:
Would tar be able to handle the corrupted data like dd can handle since dd does a blind copy.
You can't safely shrink a disk that might be failing -- disk metadata might be corrupted, not just files, making any rearrangement very hazardous to data integrity. You might get a useless hash, or nothing at all. Either make a blind copy, or don't.
There are ways to shrink a blind copy -- compression, or a sparse file -- but none of them leave the resulting image bootable. There's no such thing as a sparse partition, after all, just sparse files. If you're content with having your backup not be bootable, this would work, I wrote sparsecat to help do this. It creates sparse files with a brute-force approach, making sections full of NULLs sparse, meaning it won't screw up because of a trashed sector but might not make everything that COULD be sparse actually sparse. (I don't guarantee its safety or applicability or portability however, it's just a hack I wrote for my own use.)
Quote:
Is there a way of like creating another sparse image file of 2TB ... then copying over only required data blocks there which will exclude the empty blocks and then resizing the sparse image to 200GB.
If the disk is failing, you can't reliably know which blocks are occupied.
Last edited by Corona688; 10-10-2010 at 02:38 AM..
Hello All,
I have a Red Hat Linux 5.9 Server installed with one hard disk & 2 Partitions created on it as follows,
/boot - Linux Partition & another is
LVM - One VG & under that 5-6 Logical volumes(var,opt,home etc).
Here my requirement is to take out 1GB of space from LVM ( Any logical... (5 Replies)
Hello,
I am a new member of the forum.
I need an idea on how to partition the disk.
My situation is as follows:
I have two 3TB disks ognuno.In 6TB total then, but I have to do to force a RAID 1 so my space will be 3TB. I'll have to force install RedHat 5.8 and liquids is to be taken in... (4 Replies)
Hi Guys,
when performing a disk partition, can any file system other than root be giving to slice 0 or must slice0 hold only root? I am confused about this.
Any clarification will be greatly appreciated.
Thanks Guys (4 Replies)
I want to skip the first cylinder (first 1 MB infact) while I partition my disk using fdisk as it is required that the disk partition to be used (for Oracle RAC Installation) must skip the first 1Mb to avoid overwriting the disk VTOC. The way I am using is:
Command (m for help): n
Command... (2 Replies)
hi guys,
I've got a strange issue, may be one of you has experienced this.
SunOS 5.10 Generic_118833-33 sun4u sparc SUNW,Sun-Fire-V440
everything is mirrored.
My issue is that I have a umpty directory but seems to have data on. Let me show you
# df -h /data
Filesystem size used... (10 Replies)
I have 3 disks to partition in following file system.
c1t1d0 = 72gb
/prod1
/prod2
/prod3
/prod4
/prod5
I am first time using "format" command to do this. How can i name with specified size.
-Adeel (1 Reply)
Have a solaris x86 running solaris 9.
Root disk - logical - mirrored.
I added 2 more disks today - and I have mirrored them using array configuration utility.
I did a reconfiguration boot - and now I can see the logical disk using format:
I then partitioned this the way I wanted (I hope)... (4 Replies)
Hi All,
While my LINUX SERVER installed we didnt' used all the space for partitions. with what tool I can create a new partition or mount point to use the free space.
I tried the command fdisk and diskdruid. They are not working.
Thanks in advance
With Best regards,
Varma. (2 Replies)