Longina Przybyszewska
2009-Mar-09 12:56 UTC
[Xen-users] iscsi initiator on PV DomU problem
Hi, I have got 300gb iscsi target ( residence on SAN ) which should be directly bound to domU. (DomU: PV Ubuntu Hardy Linux 2.6.24-19-xen, Dom0: UbuntuHardy Linux 2.6-24-22-xen). It comes up as 500gb block device! I use open-iscsi version 2.0-865. SAN admin checked twice that target''s size on windows2007 server - which shows the size of 300gb when attached. I get a lot of fails in log: =======attempt to access beyond end of device sda: rw=0, want=976639545, limit=629147647 ======= cfdisk /dev/sda : "Fatal Error: Bad primary partition 0: Partition ends after end-of-disk" cfdisk /dev/sda1 : "Disk Driver /dev/sda1, size 500,0 Gb free space" Then I kan make primary paritions assigned name /dev/sda1p1, /dev/sda1p2. I have anather iscsi 100gb target on Dom0 - shows right size. Any idea? Am I missing something? cheers Longina -- -- Longina Przybyszewska, system programmer IT@Naturvidenskab IMADA, Department of Mathematics and Computer Science University of Southern Denmark, Odense Campusvej 55,DK-5230 Odense M, Denmark tel: +45 6550 2359 - http://www.imada.sdu.dk email: longina@imada.sdu.dk -- _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Mon, Mar 9, 2009 at 7:56 PM, Longina Przybyszewska <longina@imada.sdu.dk> wrote:> I have got 300gb iscsi target ( residence on SAN ) which should be directly > bound to domU. > (DomU: PV Ubuntu Hardy Linux 2.6.24-19-xen, Dom0: UbuntuHardy Linux > 2.6-24-22-xen).First of all, I believe you''d get better performance if the initiator is on dom0 instead of domU.> > It comes up as 500gb block device!> =======> attempt to access beyond end of device > sda: rw=0, want=976639545, limit=629147647 > =======It means domU correctly recognize the block device as 629147647 sectors of 512-bytes long (300GB), but it was asked to get sector number 976639545.> > cfdisk /dev/sda : "Fatal Error: Bad primary partition 0: Partition ends > after end-of-disk" > > cfdisk /dev/sda1 : "Disk Driver /dev/sda1, size 500,0 Gb free space" > Then I kan make primary paritions assigned name /dev/sda1p1, /dev/sda1p2. >Probably because there''s already a partition table on that block device, and it''s messed up (maybe because the block the device was used previously, and then shrinked). What does "cat /proc/partitions" and "fdisk -l /dev/sda" shows? If it is indeed messed up partition table, you can use fdisk''s extra functionality to change the number of heads, sectors/tracks, or cylinders. If it''s a blank target with MBR partition, zeroing the first 512-byte of the disk (with dd or whatever) should erase existing partition table and let fdisk work out reasonable parameters. If it''s GPT parition though things can get a little more complicated :) Regards, Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Mar 9, 2009, at 6:30, "Fajar A. Nugraha" <fajar@fajar.net> wrote:> On Mon, Mar 9, 2009 at 7:56 PM, Longina Przybyszewska > <longina@imada.sdu.dk> wrote: >> I have got 300gb iscsi target ( residence on SAN ) which should be >> directly >> bound to domU. >> (DomU: PV Ubuntu Hardy Linux 2.6.24-19-xen, Dom0: UbuntuHardy Linux >> 2.6-24-22-xen). > > First of all, I believe you''d get better performance if the initiator > is on dom0 instead of domU. > >> >> It comes up as 500gb block device! > >> =======>> attempt to access beyond end of device >> sda: rw=0, want=976639545, limit=629147647 >> =======> > It means domU correctly recognize the block device as 629147647 > sectors of 512-bytes long (300GB), but it was asked to get sector > number 976639545. > >> >> cfdisk /dev/sda : "Fatal Error: Bad primary partition 0: Partition >> ends >> after end-of-disk" >> >> cfdisk /dev/sda1 : "Disk Driver /dev/sda1, size 500,0 Gb free space" >> Then I kan make primary paritions assigned name /dev/sda1p1, /dev/ >> sda1p2. >> > > Probably because there''s already a partition table on that block > device, and it''s messed up (maybe because the block the device was > used previously, and then shrinked). > > What does "cat /proc/partitions" and "fdisk -l /dev/sda" shows? > > If it is indeed messed up partition table, you can use fdisk''s extra > functionality to change the number of heads, sectors/tracks, or > cylinders. > > If it''s a blank target with MBR partition, zeroing the first 512-byte > of the disk (with dd or whatever) should erase existing partition > table and let fdisk work out reasonable parameters. If it''s GPT > parition though things can get a little more complicated :)I''ve had success with parted, using it to write a msdos label, then zeroing it out. It appears to be smart enough to seek out and destroy rogue gpt superblocks.> > > Regards, > > Fajar > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Longina Przybyszewska
2009-Mar-09 15:38 UTC
Re: [Xen-users] iscsi initiator on PV DomU problem
On Mon, 9 Mar 2009, Fajar A. Nugraha wrote:> On Mon, Mar 9, 2009 at 7:56 PM, Longina Przybyszewska > <longina@imada.sdu.dk> wrote: >> I have got 300gb iscsi target ( residence on SAN ) which should be directly >> bound to domU. >> (DomU: PV Ubuntu Hardy Linux 2.6.24-19-xen, Dom0: UbuntuHardy Linux >> 2.6-24-22-xen). > > First of all, I believe you''d get better performance if the initiator > is on dom0 instead of domU. >It seems that management could be easier if there are multiple iscsi targets. My iscsi targets get their own PVM and they access it through bonding interface with vlan and transparent bridge on top of it - IP address is set first for PVM.>> >> It comes up as 500gb block device! > >> =======>> attempt to access beyond end of device >> sda: rw=0, want=976639545, limit=629147647 >> =======> > It means domU correctly recognize the block device as 629147647 > sectors of 512-bytes long (300GB), but it was asked to get sector > number 976639545. > >> >> cfdisk /dev/sda : "Fatal Error: Bad primary partition 0: Partition ends >> after end-of-disk" >> >> cfdisk /dev/sda1 : "Disk Driver /dev/sda1, size 500,0 Gb free space" >> Then I kan make primary paritions assigned name /dev/sda1p1, /dev/sda1p2. >> > > Probably because there''s already a partition table on that block > device, and it''s messed up (maybe because the block the device was > used previously, and then shrinked).This is probably what happened - how could be this avoided?> > What does "cat /proc/partitions" and "fdisk -l /dev/sda" shows?cat /proc/partitions: 8 0 314573823 sda 8 1 488319741 sda1 fdisk -l /dev/sda: Disk /dev/sda: 322.1 Gb 322123595264 bytes 255 heads, 63 sectors/track, 39162 cylinders Units = cylinders of 16085 * 512 = 8225280 bytes Disk identifier: 0x00000001 Device Boot Start End Blocks Id System /dev/sda1 1 60783 488319741 83 Linux> > If it is indeed messed up partition table, you can use fdisk''s extra > functionality to change the number of heads, sectors/tracks, or > cylinders.Is it that one - "use it if you know what are you doing ?" :) How can I find out about the target''s type -> > If it''s a blank target with MBR partition, zeroing the first 512-byte > of the disk (with dd or whatever) should erase existing partition > table and let fdisk work out reasonable parameters. If it''s GPT > parition though things can get a little more complicated :)How kan I find it out ? cheers Longina> > Regards, > > Fajar > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >-- -- Longina Przybyszewska, system programmer IT@Naturvidenskab IMADA, Department of Mathematics and Computer Science University of Southern Denmark, Odense Campusvej 55,DK-5230 Odense M, Denmark tel: +45 6550 2359 - http://www.imada.sdu.dk email: longina@imada.sdu.dk -- _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Mon, Mar 9, 2009 at 10:38 PM, Longina Przybyszewska <longina@imada.sdu.dk> wrote:>> First of all, I believe you''d get better performance if the initiator >> is on dom0 instead of domU. >> > > It seems that management could be easier if there are multiple iscsi > targets. > > My iscsi targets get their own PVM and they access it through bonding > interface with vlan and transparent bridge on top of it - IP address is set > first for PVM.Sometime ago on this list (check the archive) a user said iscsi on domU was slow, and moving the target to dom0 improved performance greatly. But it seems like you know what you''re doing, along with its consequences :)>> Probably because there''s already a partition table on that block >> device, and it''s messed up (maybe because the block the device was >> used previously, and then shrinked). > > This is probably what happened - how could be this avoided?By using a "fresh" SAN :) Traditional SAN might present "garbage" data (in your case the partition table) if the target was previoulsy used on another host. zfs-based SAN/NAS (like the new SUN 7000-series) is somewhat unique in that each time you create a volume (zvol) it will be blank (no data from previous use). You could always write all zeroes to it with dd and get a similar result :)> >> >> What does "cat /proc/partitions" and "fdisk -l /dev/sda" shows? > > > cat /proc/partitions: > > 8 0 314573823 sda > 8 1 488319741 sda1 >Just to make sure: you onlye have ONE disk, right? Not two disk, one mapped as sda and another as sda1 (which is possible when using xen)?> fdisk -l /dev/sda: > > Disk /dev/sda: 322.1 Gb 322123595264 bytes > 255 heads, 63 sectors/track, 39162 cylinders > Units = cylinders of 16085 * 512 = 8225280 bytes > Disk identifier: 0x00000001 > > Device Boot Start End Blocks Id System > /dev/sda1 1 60783 488319741 83 Linux >If you only have one disk, this is a mess. Your disk has 39162 cylinders, but the first partition uses 60783 cylinders.>> >> If it is indeed messed up partition table, you can use fdisk''s extra >> functionality to change the number of heads, sectors/tracks, or >> cylinders. > > Is it that one - "use it if you know what are you doing ?" :)Yup :)> How can I find out about the target''s type -Your setup seems to be simpler though, since sda is correct and only sda1 is messed up. If this is an empty (new) disk I believe you can simply use fdisk to delete the first partition and create another one. Regards, Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Mon, Mar 9, 2009 at 10:38 PM, Longina Przybyszewska <longina@imada.sdu.dk> wrote:>> First of all, I believe you''d get better performance if the initiator >> is on dom0 instead of domU. >> > > It seems that management could be easier if there are multiple iscsi > targets. > > My iscsi targets get their own PVM and they access it through bonding > interface with vlan and transparent bridge on top of it - IP address is set > first for PVM.Sometime ago on this list (check the archive) a user said iscsi on domU was slow, and moving the target to dom0 improved performance greatly. But it seems like you know what you''re doing, along with its consequences :)>> Probably because there''s already a partition table on that block >> device, and it''s messed up (maybe because the block the device was >> used previously, and then shrinked). > > This is probably what happened - how could be this avoided?By using a "fresh" SAN :) Traditional SAN might present "garbage" data (in your case the partition table) if the target was previoulsy used on another host. zfs-based SAN/NAS (like the new SUN 7000-series) is somewhat unique in that each time you create a volume (zvol) it will be blank (no data from previous use). You could always write all zeroes to it with dd and get a similar result :)> >> >> What does "cat /proc/partitions" and "fdisk -l /dev/sda" shows? > > > cat /proc/partitions: > > 8 0 314573823 sda > 8 1 488319741 sda1 >Just to make sure: you onlye have ONE disk, right? Not two disk, one mapped as sda and another as sda1 (which is possible when using xen)?> fdisk -l /dev/sda: > > Disk /dev/sda: 322.1 Gb 322123595264 bytes > 255 heads, 63 sectors/track, 39162 cylinders > Units = cylinders of 16085 * 512 = 8225280 bytes > Disk identifier: 0x00000001 > > Device Boot Start End Blocks Id System > /dev/sda1 1 60783 488319741 83 Linux >If you only have one disk, this is a mess. Your disk has 39162 cylinders, but the first partition uses 60783 cylinders.>> >> If it is indeed messed up partition table, you can use fdisk''s extra >> functionality to change the number of heads, sectors/tracks, or >> cylinders. > > Is it that one - "use it if you know what are you doing ?" :)Yup :)> How can I find out about the target''s type -Your setup seems to be simpler though, since sda is correct and only sda1 is messed up. If this is an empty (new) disk I believe you can simply use fdisk to delete the first partition and create another one. Regards, Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Longina Przybyszewska
2009-Mar-09 16:48 UTC
Re: [Xen-users] iscsi initiator on PV DomU problem
On Mon, 9 Mar 2009, Fajar A. Nugraha wrote:> On Mon, Mar 9, 2009 at 10:38 PM, Longina Przybyszewska > <longina@imada.sdu.dk> wrote:>>> >>> >>> If it is indeed messed up partition table, you can use fdisk''s extra >>> functionality to change the number of heads, sectors/tracks, or >>> cylinders. >> >> Is it that one - "use it if you know what are you doing ?" :) > > Yup :) > >> How can I find out about the target''s type - > > Your setup seems to be simpler though, since sda is correct and only > sda1 is messed up. > If this is an empty (new) disk I believe you can simply use fdisk to > delete the first partition and create another one.Thanks, that''s it! Can you explain, why Windows could be immune about the messed up partition table on disk? regards Longina -- -- Longina Przybyszewska, system programmer IT@Naturvidenskab IMADA, Department of Mathematics and Computer Science University of Southern Denmark, Odense Campusvej 55,DK-5230 Odense M, Denmark tel: +45 6550 2359 - http://www.imada.sdu.dk email: longina@imada.sdu.dk -- _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha wrote:>Sometime ago on this list (check the archive) a user said iscsi on >domU was slow, and moving the target to dom0 improved performance >greatly.Could be a thread I started. I got terrible performance with iSCSI on the DomU, but quite acceptable performance after moving the iSCSI stuff to Dom0 at the suggestion of people on this list - had to wait until I could beg another hand-me-down server to test it on though :-( That''s with Debian Lenny in Dom0 and DomU, iSCSI box is a Dell AX100i.>You could always write all zeroes to it with dd and get a similar result :)If you have the patience ! I nearly suggested that earlier in the thread. Still, our iSCSI box has just taken 8 days to add a drive to an array - good job it can do it with the volumes online. -- Simon Hobson Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed author Gladys Hobson. Novels - poetry - short stories - ideal as Christmas stocking fillers. Some available as e-books. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
2009/3/9 Longina Przybyszewska <longina@imada.sdu.dk>:>> If this is an empty (new) disk I believe you can simply use fdisk to >> delete the first partition and create another one. > > Thanks, that''s it! > Can you explain, why Windows could be immune about the messed up partition table on disk?I''m not sure. Here''s a possibility: a long time ago there was an option in the BIOS where you could change a disk''s CHS mapping, basically doubling the number of heads so that the number of cylinders can be halved. Maybe Windows is doing a similar thing, doubling your target''s cylinder so that the partition table made sense. Another possiblity (most likely) is that when windows sees a partition beyond the end of disk it simply ignores it. Regards, Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users