bug-parted
[Top][All Lists]
Advanced

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

Re: 512b vs. 2048b problems on IBM Power LPAR (Debian/PPC)


From: Frank Fegert
Subject: Re: 512b vs. 2048b problems on IBM Power LPAR (Debian/PPC)
Date: Wed, 13 Feb 2013 23:32:12 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

Hello all,

i dug around a bit more last night and copied over a strace binary into
the running d-i installer system. Running the failing find-partitions
command mentioned in my earlier post again with strace showed, that find-
partitions isn't really failing on a disk device, but rather on /dev/sr0
(see [1]).
So i wrote a quick'n'dirty patch (see [2]) to find-partitions to skip
all /dev/sr* devices and with this the d-i can now successfully finish
the install.
I didn't dive to deep into the code, but i still wonder why find-partitions
would consider /dev/srN or CD/DVD devices in the first place?
In this setup the disk devices sda and sdb refer to the same backend LUN
that is mapped to the LPAR via two Virtual I/O Server. The d-i ISO image
is mapped to the LPAR via one Virtual I/O Server as a virtual optical
device (see [3] and [4] page 14). So from inside the now installed Debian
system the storage devices look like this (see [5] for more disk related
output):

[    0.379011] scsi 0:0:1:0: Direct-Access     AIX      VDASD            0001 
PQ: 0 ANSI: 3
[    0.379271] scsi 0:0:2:0: CD-ROM            AIX      VOPTA                 
PQ: 0 ANSI: 4
[    0.398197] scsi 1:0:1:0: Direct-Access     AIX      VDASD            0001 
PQ: 0 ANSI: 3
...
[    2.738953] sd 0:0:1:0: Attached scsi generic sg0 type 0
[    2.739123] sr 0:0:2:0: Attached scsi generic sg1 type 5
[    2.739267] sd 1:0:1:0: Attached scsi generic sg2 type 0

Is the original find-partitions command failing here because of the way
the ISO image is mapped to the LPAR?

Thanks & best regards,

    Frank Fegert


# [1] Begin ###########################################################
...
open("/dev/mapper/vg00-swap", O_RDWR|O_LARGEFILE) = 3
mmap(NULL, 528384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xf7dda000
munmap(0xf7dda000, 528384)              = 0
mmap(NULL, 528384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xf7dda000
munmap(0xf7dda000, 528384)              = 0
mmap(NULL, 528384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xf7dda000
munmap(0xf7dda000, 528384)              = 0
mmap(NULL, 528384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xf7dda000
munmap(0xf7dda000, 528384)              = 0
mmap(NULL, 528384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xf7dda000
munmap(0xf7dda000, 528384)              = 0
mmap(NULL, 528384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xf7dda000
munmap(0xf7dda000, 528384)              = 0
fsync(3)                                = 0
close(3)                                = 0
open("/dev/sr0", O_RDWR|O_LARGEFILE)    = 3
fsync(3)                                = 0
close(3)                                = 0
open("/dev/sr0", O_RDWR|O_LARGEFILE)    = 3
write(2, "Warning: ", 9Warning: )                = 9
write(2, "The driver descriptor says the p"..., 98The driver descriptor says 
the physical block size is 512 bytes, but Linux says it is 2048 bytes.
) = 98
fsync(3)                                = 0
close(3)                                = 0
write(2, "A bug has been detected in GNU P"..., 299A bug has been detected in 
GNU Parted.  Refer to the web site of parted 
http://www.gnu.org/software/parted/parted.html for more information of what 
could be useful for bug submitting!  Please email a bug report to) and the 
following message:  ) = 299st the version (2.3--More-- 
write(2, "Assertion (disk != NULL) at ../."..., 102Assertion (disk != NULL) at 
../../libparted/disk.c:1548 in function ped_disk_next_partition() failed.
) = 102
rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
gettid()                                = 13874
tgkill(13874, 13874, SIGABRT)           = 0
--- SIGABRT (Aborted) @ 0 (0) ---
+++ killed by SIGABRT +++
# [1] End #############################################################

# [2] Begin ###########################################################
diff -uwir partconf.orig//find-parts.c partconf/find-parts.c
--- partconf.orig//find-parts.c 2012-11-08 22:04:58.000000000 +0100
+++ partconf/find-parts.c       2013-02-12 23:09:00.000000000 +0100
@@ -182,6 +182,8 @@
             continue;
         if (strstr(dev->path, "/dev/mtd") == dev->path)
             continue;
+        if (strstr(dev->path, "/dev/sr") == dev->path)
+            continue;
         if (!ped_disk_probe(dev))
             continue;
         disk = ped_disk_new(dev);
# [2] End #############################################################

[3] 
http://www.ibmsystemsmag.com/aix/tipstechniques/systemsmanagement/Using-File-Backed-Virtual-SCSI-Devices/?page=
[4] 
http://www.ibm.com/developerworks/wikis/download/attachments/53871900/Configuring+and+Using+File-Backed+Virtual+SCSI+Devices.pdf?version=1
 (Page 14)

# [5] Begin ###########################################################
[    0.359797] ibmvscsi 30000002: SRP_VERSION: 16.a
[    0.360323] scsi0 : IBM POWER Virtual SCSI Adapter 1.5.9
[    0.360844] ibmvscsi 30000002: partner initialization complete
[    0.360909] ibmvscsi 30000002: host srp version: 16.a, host partition 
vios1-p770-343 (1), OS 3, max io 262144
[    0.360984] ibmvscsi 30000002: Client reserve enabled
[    0.360998] ibmvscsi 30000002: sent SRP login
[    0.361139] ibmvscsi 30000002: SRP_LOGIN succeeded
[    0.377419] ibmvscsi 30000003: SRP_VERSION: 16.a
[    0.377657] scsi1 : IBM POWER Virtual SCSI Adapter 1.5.9
[    0.377922] ibmvscsi 30000003: partner initialization complete
[    0.377978] ibmvscsi 30000003: host srp version: 16.a, host partition 
vios2-p770-343 (2), OS 3, max io 262144
[    0.378055] ibmvscsi 30000003: Client reserve enabled
[    0.378065] ibmvscsi 30000003: sent SRP login
[    0.378161] ibmvscsi 30000003: SRP_LOGIN succeeded
[    0.379011] scsi 0:0:1:0: Direct-Access     AIX      VDASD            0001 
PQ: 0 ANSI: 3
[    0.379271] scsi 0:0:2:0: CD-ROM            AIX      VOPTA                 
PQ: 0 ANSI: 4
[    0.398197] scsi 1:0:1:0: Direct-Access     AIX      VDASD            0001 
PQ: 0 ANSI: 3
[    0.415684] sd 0:0:1:0: [sda] 75497472 512-byte logical blocks: (38.6 
GB/36.0 GiB)
[    0.415804] sd 0:0:1:0: [sda] Write Protect is off
[    0.415887] sd 0:0:1:0: [sda] Cache data unavailable
[    0.415898] sd 0:0:1:0: [sda] Assuming drive cache: write through
[    0.416460] sd 0:0:1:0: [sda] Cache data unavailable
[    0.416467] sd 0:0:1:0: [sda] Assuming drive cache: write through
[    0.416793]  sda: sda1 sda2 sda3
[    0.417551] sd 0:0:1:0: [sda] Cache data unavailable
[    0.417561] sd 0:0:1:0: [sda] Assuming drive cache: write through
[    0.417566] sd 0:0:1:0: [sda] Attached SCSI disk
[    0.435188] sd 1:0:1:0: [sdb] 75497472 512-byte logical blocks: (38.6 
GB/36.0 GiB)
[    0.435296] sd 1:0:1:0: [sdb] Write Protect is off
[    0.435382] sd 1:0:1:0: [sdb] Cache data unavailable
[    0.435391] sd 1:0:1:0: [sdb] Assuming drive cache: write through
[    0.435909] sd 1:0:1:0: [sdb] Cache data unavailable
[    0.435917] sd 1:0:1:0: [sdb] Assuming drive cache: write through
[    0.436132]  sdb: sdb1 sdb2 sdb3
[    0.436872] sd 1:0:1:0: [sdb] Cache data unavailable
[    0.436881] sd 1:0:1:0: [sdb] Assuming drive cache: write through
[    0.436888] sd 1:0:1:0: [sdb] Attached SCSI disk
...
[    2.705734] cdrom: Uniform CD-ROM driver Revision: 3.20
[    2.738953] sd 0:0:1:0: Attached scsi generic sg0 type 0
[    2.739123] sr 0:0:2:0: Attached scsi generic sg1 type 5
[    2.739267] sd 1:0:1:0: Attached scsi generic sg2 type 0
# [5] End #############################################################

On Mon, Jan 14, 2013 at 09:16:42AM +0100, Frank Fegert wrote:
> Hello all,
> 
> i'm having some trouble with the d-i (squeeze and wheezy [1], the lenny
> d-i used to work though) on IBM Power LPARs. On the yaboot installer
> step the d-i breaks with:
>   [!!] Install yaboot on a hard disk
>   No bootstrap partition found
>   No hard disks were found which have an "Apple_Bootstrap" partition.
>   You must create an 819200-byte partition with type "Apple_Bootstrap".
> 
> We've (see Debian Bug #350372, last entries) tracked this down to the
> call of "/usr/lib/partconf/find-partitions --flag prep" which drops
> out with the error:
>   ~ # /usr/lib/partconf/find-partitions --flag prep
>   Warning: The driver descriptor says the physical block size is 512 bytes,
>   but Linux says it is 2048 bytes.
> 
>   A bug has been detected in GNU Parted.  Refer to the web site of
>   parted http://www.gnu.org/software/parted/parted.html for more
>   information of what could be useful for bug submitting!  Please
>   email a bug report to address@hidden containing at least the
>   version (2.3) and the following message:  Assertion (disk != NULL)
>   at ../../libparted/disk.c:1548 in function ped_disk_next_partition()
>   failed.  Aborted
> 
> The setup is SAN-based disk -> dual VIOS -> LPAR (sda and sdb are one
> path for each VIOS to the same physical disk). The partition table looks
> like this:
>   ~ # parted /dev/sda unit s print free
>   Model: AIX VDASD (scsi)
>   Disk /dev/sda: 75497472s
>   Sector size (logical/physical): 512B/512B
>   Partition Table: msdos
>   Number  Start      End        Size       Type     File system  Flags
>           63s        2047s      1985s               Free Space
>    1      2048s      16383s     14336s     primary               boot, prep
>    2      16384s     3921919s   3905536s   primary  ext4
>    3      3921920s   75495423s  71573504s  primary               lvm
>           75495424s  75497471s  2048s               Free Space
> 
> Can someone please shed some light on as to why this is happening on
> Debian versions later then lenny? And/or can someone please assist me
> in further debugging and possibly resolving this issue?
> 
> Thanks & best regards,
> 
>     Frank Fegert
> 
> 
> [1] "Debian GNU/Linux testing _Wheezy_ - Official Snapshot powerpc NETINST 
> Binary-1 20130112-15:23"





reply via email to

[Prev in Thread] Current Thread [Next in Thread]