Skip to contentSkip to conversation

2.4.20 /proc/partitions corruption with many partitions

PATCH Nick Burrett 1 participant 1 message Jun 3, 2003

lore
Share & tools
lore
#0 lore raw

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.