2.4.20 /proc/partitions corruption with many partitions
[resent with attachment this time]
Hi,
I'm finding it difficult to create more than, say 80, logical partitions on a server. The symptoms are that lvcreate keeps segfaulting. The reason is that /proc/partitions contains invalid data.
I initially wondered whether it might be the device naming convention since when we go above 26 logical paritions we start writing out lvm{, lvm}, lvm[ etc. so I added the following patch to write out the devices as digits but this didn't have any effect.
partitions/check.c 2003-06-03 14:43:19.000000000 +0100 renamed from partitions/check.c 2002-11-28 23:53:15.000000000 +0000 +1 -0
@@ -148,6 +148,7 @@ char *disk_name (struct gendisk *hd, int maj = "hd"; break; case MD_MAJOR: + case LVM_BLK_MAJOR: sprintf(buf, "%s%d", maj, unit); return buf; }
This is quite easy to replicate, just create many logical volumes until lvcreate fails e.g.
$ lvcreate -L 10M -n foo01 vol01 etc.
The attached file is simply the output of:
$ cat /proc/partitions >/root/foo.txt
Any thoughts ?
Regards,
Nick.
9 0 2048192 md0 0 0 0 0 0 0 0 0 0 0 0 9 1 31744320 md1 0 0 0 0 0 0 0 0 0 0 0 9 2 2048192 md2 0 0 0 0 0 0 0 0 0 0 0 8 0 35843686 sda 968 3528 34954 6130 6375 16193 134440 38890 0 13090 45020 8 1 2048256 sda1 918 3371 34312 4940 6066 8747 118912 38720 0 12770 43660 8 2 2048287 sda2 3 0 24 20 1 0 8 0 0 20 20 8 3 31744440 sda3 42 142 578 1160 308 7446 15520 170 0 290 1330 8 16 35843686 sdb 1011 2866 29606 5580 6375 16193 134440 42130 0 11810 47710 8 17 2048256 sdb1 958 2647 28822 4220 6066 8747 118912 41960 0 11470 46180 8 18 2048287 sdb2 3 0 24 30 1 0 8 0 0 30 30 8 19 31744440 sdb3 45 204 720 1310 308 7446 15520 170 0 340 1480