[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] migrate from physical disk problems in xen



Hi,

Just a quick hint: Make sure the iscsi blocksize is the same as on the original 
devices.
We once had a similar problem when we migrated from physical to iscsi. It 
turned out windows 2003 couldn't cope with the 4k blocksize we wanted to use 
for the targets. We fell back to 512bytes (I think) and everything was fine.

Check there: /sys/block/<device>/queue/physical_block_size

regards,
- peter.

On 2013-01-19 07:00:32 Adam Goryachev wrote:
> Paul Stimpson <paul@xxxxxxxxxxxxxxxxxxxx> wrote:
> 
> >Hi Adam,
> >
> >On 18/01/13 18:31, Adam Goryachev wrote:
> >> I've been trying to migrate a win nt 4 machine to a xen domu for the
> >past few months with no success. However, on my current attempt, the
> >original hardware no longer boots, so I'm trying to resolve the issues
> >with xen properly, or else take a long holiday...
> >
> >On one of our Windows XP installs in a far off place, we found that the
> >
> >HAL that shipped on our Windows disc wasn't virtualisation-friendly. 
> >This was on VMWare (not Xen) so it may not apply but we had to get a 
> >special version of XP with a different HAL.
> 
> It isn't the HAL, since the OS boots up, I've had HAL problems before (can be 
> fixed by tweaking the xen config file usually)...
> 
> >> Anyway, the physical machine had a 9G drive (OS drive), a 147 G drive
> >(not in use) and a 300G drive (all SCSI Ultra320 on the same SCSI
> >controller)
> >
> > From here on it, I will call the 9GB drive "sda", the 147GB "sdb" and 
> >the 300GB "sdc" - Please adjust anything I say if your system is
> >different.
> >
> >> Everytime, I've booted linux, used dd to image the original 2 drives
> >(ignored the 147G drive), and written each image with dd to an LV
> >
> >Are you dd-ing the Windows partition or the whole drive into the 
> >container file? I think you will get better results with the whole
> >drive.
> 
> I did something like this:
> dd if=/dev/sda of=/mnt/sda.img bs=8M
> dd if=/dev/sdc of=/mnt/sdc.img bs=8M
> Then, I moved /mnt drive to another machine and did:
> dd if=/mnt/sda.img of=/dev/vg0/machine_d1 bs=8M
> dd if=/mnt/sdc.img of=/dev/vg0/machine_d2 bs=8M
> 
> >> This is exported by iscsi to xen
> >>
> >> The c: works fine, and I can boot properly in VGA mode (safe mode)
> >but the 300G drive always shows as corrupt. I've now upgraded to
> >win2000 in the VM, and win2000 reports the drive as healthy (hardware)
> >but blank with no filesystem on it.
> >
> >What are you passing to the VM in the "disk=[]" line please?
> 
> disk = [ 
> 'phy:/dev/disk/by-path/ip-1.2.3.4:3260-iscsi-iqn.2011-06.domain:machine_d1-lun-0,hda,w',
>  
> 'phy:/dev/disk/by-path/ip-1.2.3.4:3260-iscsi-iqn.2011-06.domain:machine_d2-lun-0,hdb,w',
> 'file:/mnt/blah.iso:ioemu:hdc:cdrom,r' ]
> 
> >Whatever you pass will be interpreted by Windows as a raw drive, so it 
> >can't just be a partition, it has to have a partition table and MBR
> >too. 
> >If you just pass a partition, you are likely to see some strange 
> >partitioning arrangement in Windows Disk management (random size 
> >partitions/free space chunks) and, in the file manager, you will see no
> >files.
> >
> >The disk line should probably pass sdc, rather than sdc1, or you need
> >to make a partition table and a partition in it using parted.
> 
> Yep, I'm copying the entire drive, and windows does actually see the 
> partition table correctly (as does linux from the domu and dom0).
> 
> >
> >> However, on the xen machine, I can use fdisk to see the partition
> >table, kpartx -a to add the partition device in /dev/mapper, and I can
> >even mount the drive in Linux and see all of it's contents.
> >
> >I would recommend you don't use fdisk in Linux on this kind of task. 
> >Fdisk has a nasty habit of imposing its own default CHS geometry on 
> >disks. Like, the other day, it told me the appropriate start sector for
> >the first partition on my virtual disc was 2048 when it really should 
> >have been 63). This can lead to things not matching and may be stopping
> >your VM from mounting the machine.
> 
> I didn't use fdisk to create or modify anything, just fdisk -l to view the 
> partition table....
> 
> >> I suspect the problem is the way windows translates the CHS values of
> >the drive, and so can't see things the same way that NT could on the
> >physical hardware.
> >
> >May well be due to what Linux fdisk did... I would recommend you try 
> >parted instead.
> >
> >> I'm at a complete loss on how to resolve this issue, or what to
> >try/look at. If all else fails I figured to try and create a new 300G
> >drive, format it from win2k, and then somehow transfer the files from
> >Linux into win2k, without losing any of the permissions / etc which I
> >guess will be somewhat challenging.
> >>
> 
> Thanks for your response, I am fairly sure it isn't a partition issue though. 
> If you have any other ideas, I'd really appreciate it.
> 
> 
> Regards,
> Adam
> 
> --
> Adam Goryachev
> Website Managers
> www.websitemanagers.com.au
> 
> _______________________________________________
> Xen-users mailing list
> Xen-users@xxxxxxxxxxxxx
> http://lists.xen.org/xen-users
> 

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.