[SOLVED] HDD Shrink help?

hotwired007

Member
Sep 19, 2011
533
7
16
UK
I've successfully managed to do a P2V using Physical to ESXi, then ESXi to Proxmox using clonezilla.

Unfortunately the Server had a 160GB drive with 2 partitions. One partition is 12GB (boot) the other was the remainder of the drive. It has 3GB of used data and has no real need for the partition to be over 18GB, so i shrunk it using Parted Magic. This worked fine and the server has 2 partitions 12GB and 18GB.

i built a new VM and have used clonezilla to transfer the 2 partitions to the VM HDD. The data is on the two partitions but i cannot get the machine to boot. I have used the recovery console and had no joy using fixmbr or fixboot.

on the old (working machine) the boot partition is on an extended partiton - do i need to do this too?

does anyone have any advice/suggestions?
 
Last edited:
Re: HDD Shrink help?

i have cloned both partitions using clonezilla and set the correct partition to active, but i'm now getting:

A disk read error occurred
Press Ctrl+ALt+Del to restart

I've tried using windows recovery consolne and that wont fix it. The MPT and MBR look right (checked with partedmagic and trinity recovery)

any suggestions?
 
Re: HDD Shrink help?

start with recovery console and launch a check disk with automatic repair.
 
Re: HDD Shrink help?

it a curious situation, the machine i'm cloning the HDD from has 4 partitions:

sda1 - 32mb - fat16 - diag
sda2 - 18GB - ntfs - boot
sda3 - 12GB - extended - lba
sda5 - 12GB - ntfs

i have recreated this on the new machine and server 2003 now boots although it doesnt seem to boot correctly as it will not allow me to log in and doesnt appear to load correctly, as there are some monitoring apps that load as the machine boots in before login and these do not load on the cloned machine.

also the ntldr, ntdetect.com and boot.ini are on the D: drive not the C: drive (thats why the 18GB partition is marked as boot and the 12GB (C:) isnt.
 
Re: HDD Shrink help?

I've successfully managed to do a P2V using Physical to ESXi, then ESXi to Proxmox using clonezilla.

Unfortunately the Server had a 160GB drive with 2 partitions. One partition is 12GB (boot) the other was the remainder of the drive. It has 3GB of used data and has no real need for the partition to be over 18GB, so i shrunk it using Parted Magic. This worked fine and the server has 2 partitions 12GB and 18GB.

i built a new VM and have used clonezilla to transfer the 2 partitions to the VM HDD. The data is on the two partitions but i cannot get the machine to boot. I have used the recovery console and had no joy using fixmbr or fixboot.

on the old (working machine) the boot partition is on an extended partiton - do i need to do this too?

does anyone have any advice/suggestions?

Hi,
what's happens if you simply use dd (of the first 32GB). Look here: http://pve.proxmox.com/wiki/Migrati...s_physical_machine_to_a_VM_raw_file_using_SSH

If you use an defined 32GB lvm-disk as output, your transfer will stop after 32GB written.

Udo
 
Re: HDD Shrink help?

Sorted it.

Pretty much followed this: http://geekyprojects.com/storage/how-to-clone-hard-drive-to-smaller-drive/ although i used the pmagic live CD (http://partedmagic.com/doku.php?id=start) which has clonezilla included and use a NFS share instead of a USB HDD

I had to move the last partition as there was a 130GB unpartitioned data in between sda2 and sda3/5.

i had been imaging the partitions individually but doing them in one image and then restoring it seems to have made it work.

I also had to manually recreate all partitions on the VMs disk i was copying the image to.

Thanks for all your help.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!