Bug#586104: fails to map extended partitions
martin f krafft
madduck at debian.org
Wed Jun 16 15:44:16 UTC 2010
also sprach Guido Günther <agx at sigxcpu.org> [2010.06.16.1708 +0200]:
> kpartx handles extended partitions nicely, we're using this on literally
> dozenzs of servers here - although not on loop but SAN devices.
>
> Is there anything in dmseg?
See below: yes. (dm-18 too small for target)
>
> The ioctl fails so I think the issue is with the kernel sine the "add
> map" commands all look sane or am I missing something?
>
> Could you check Squeeze's 2.6.32?
>
> Could you check if adding a map using dmsetup e.g. for loop0p7 works
> as expected?
piper:~|master|.tmp/cdt.YeESOF% dd if=/dev/zero of=disk.img bs=1M count=1 seek=511
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.0110016 s, 95.3 MB/s
piper:~|master|.tmp/cdt.YeESOF% sudo losetup -fv disk.img
Loop device is /dev/loop0
piper:~|master|.tmp/cdt.YeESOF% sudo sfdisk /dev/loop0 <<_eof
heredoc> # partition table of /dev/loop0
heredoc> unit: sectors
heredoc>
heredoc> /dev/loop0p1 : start= 63, size= 192717, Id=83
heredoc> /dev/loop0p2 : start= 192780, size= 192780, Id=83
heredoc> /dev/loop0p3 : start= 385560, size= 658665, Id= 5
heredoc> /dev/loop0p4 : start= 0, size= 0, Id= 0
heredoc> /dev/loop0p5 : start= 385623, size= 192717, Id=83
heredoc> /dev/loop0p6 : start= 578403, size= 192717, Id=83
heredoc> /dev/loop0p7 : start= 771183, size= 273042, Id=83
heredoc> _eof
Checking that no-one is using this disk right now ...
BLKRRPART: Invalid argument
OK
Disk /dev/loop0: cannot get geometry
Disk /dev/loop0: 65 cylinders, 255 heads, 63 sectors/track
Old situation:
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/loop0p1 0+ 11 12- 96358+ 83 Linux
/dev/loop0p2 12 23 12 96390 83 Linux
/dev/loop0p3 24 64 41 329332+ 5 Extended
/dev/loop0p4 0 - 0 0 0 Empty
/dev/loop0p5 24+ 35 12- 96358+ 83 Linux
/dev/loop0p6 36+ 47 12- 96358+ 83 Linux
/dev/loop0p7 48+ 64 17- 136521 83 Linux
New situation:
Units = sectors of 512 bytes, counting from 0
Device Boot Start End #sectors Id System
/dev/loop0p1 63 192779 192717 83 Linux
/dev/loop0p2 192780 385559 192780 83 Linux
/dev/loop0p3 385560 1044224 658665 5 Extended
/dev/loop0p4 0 - 0 0 Empty
/dev/loop0p5 385623 578339 192717 83 Linux
/dev/loop0p6 578403 771119 192717 83 Linux
/dev/loop0p7 771183 1044224 273042 83 Linux
Warning: no primary partition is marked bootable (active)
This does not matter for LILO, but the DOS MBR will not boot this disk.
Successfully wrote the new partition table
Re-reading the partition table ...
BLKRRPART: Invalid argument
If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)
piper:~|master|.tmp/cdt.YeESOF% sudo kpartx -av /dev/loop0
add map loop0p1 (253:16): 0 192717 linear /dev/loop0 63
add map loop0p2 (253:17): 0 192780 linear /dev/loop0 192780
add map loop0p3 (253:18): 0 658665 linear /dev/loop0 385560
add map loop0p5 : 0 192717 linear 253:18 385623
device-mapper: resume ioctl failed: Invalid argument
add map loop0p6 : 0 192717 linear 253:18 578403
device-mapper: resume ioctl failed: Invalid argument
add map loop0p7 : 0 273042 linear 253:18 771183
piper:~|master|.tmp/cdt.YeESOF% dmesg | grep device-mapper
[4582154.293100] device-mapper: table: 253:20: dm-18 too small for target: start=578403, len=192717, dev_size=658665
[4582154.304242] device-mapper: table: 253:20: dm-18 too small for target: start=771183, len=273042, dev_size=658665
The same happens with dmsetup.
Hth,
--
.''`. martin f. krafft <madduck at d.o> Related projects:
: :' : proud Debian developer http://debiansystem.info
`. `'` http://people.debian.org/~madduck http://vcs-pkg.org
`- Debian - when you have better things to do than fixing systems
"sailing is, after all, a kind of grace, a kind of magic."
-- phil berman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature (see http://martin-krafft.net/gpg/)
URL: <http://lists.alioth.debian.org/pipermail/pkg-lvm-maintainers/attachments/20100616/fe9ef6d8/attachment-0001.pgp>
More information about the pkg-lvm-maintainers
mailing list