Re: [PATCH] Partitioned loop devices, support for 127 Partitions on SATA, IDE and SCSI

From: Alexander E. Patrakov
Date: Thu Nov 11 2004 - 08:55:42 EST

On Thursday 11 November 2004 09:54, Carl-Daniel Hailfinger wrote:
> Alexander E. Patrakov schrieb:
> > Carl-Daniel Hailfinger wrote:
> >>Hi,
> >>
> >>having seen the problems people have when switching from traditional IDE
> >>drivers to libata if they have more than 15 partitions, I decided to do
> >>something against it. With this patch (and recreating /dev/loop* nodes)
> >>it is possible to support up to 127 partitions per loop device
> >>regardless what the underlying device supports. It works for me
> >>and has the added bonus that it will be in compatibility mode as long
> >>as you don't specify the max_part parameter.
> >
> > Why not just use EVMS? Partition code is supposed to be moved to
> > userspace anyway.
> Because my solution works fine with userspace partitioning code (I tested
> with partx from util-linux) and has the big advantage that partitions
> actually appear at the right place in /sys/block/loopN/loopNpM. Most
> other solutions for many partitions per device failed to make the
> relationship between parent device and partition visible in sysfs.
> I haven't checked yet how EVMS handles this. Could you post
> find /sys/block/$SOME_EVMS_DISK/ -type d
> for a normal disk which is completely managed by EVMS so I can verify
> whether that would be satisfactory. Thanks.

That is not satisfactory since this relation is not expressed in sysfs at all
(device-mapper issue, discuss it on dm-devel if you want). EVMS is using
normal dm devices (like LVM2 does), so, although there are subdirectories
of /sys/block/hdc, they correspond only to normal ("obsolete", kernel-space,
unusable together with EVMS) partitions.

patrakov@lfs:~$ find /sys/block/hdc/ -type d
and so on

(The last two entries correspond to unusable devices)

Real block devices with filesystems on them devices are there:
patrakov@lfs:~$ find /sys/block/dm* -type d

EVMS installation is non-intrusive if you want to use it just for loop devices
(just enable device mapper in vanilla linux-2.6.9 and install userspace
tools), so you can try it without any risk.

Alexander E. Patrakov
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at