Skip to contentSkip to conversation

bug in lvm tools 0.8i, 0.8final

linux-lvm Ryan Murray 2 participants 2 messages May 4, 2000

lore
Share & tools
lore
#0 lore raw

I've just come across a bug in lvm tools when not using /proc/partitions.

lvm_add_dir_cache adds an entry, but checks for duplicates with lvm_dir_cache_hit. The problem is simple:

lrwxrwxrwx 1 root root 9 May 8 1999 /dev/cdrom -> /dev/hdd

If you have that symbolic link around, it will show up in the cache as /dev/cdrom, so if you try to pvcreate /dev/hdd, /dev/hdd never makes it into the cache.

Either the duplicate mechanism should be taken out, or ignore symlinks and have things that check the cache dereference the symlinks...

Signature · 3 lines
Ryan Murray, ([email protected], [email protected])
Programmer, Stormix Technologies Inc.
The opinions expressed here are my own.
#1 lore raw
Quoted 10 lines

I've just come across a bug in lvm tools when not using /proc/partitions.

lvm_add_dir_cache adds an entry, but checks for duplicates with lvm_dir_cache_hit. The problem is simple:

lrwxrwxrwx 1 root root 9 May 8 1999 /dev/cdrom -> /dev/hdd

If you have that symbolic link around, it will show up in the cache as /dev/cdrom, so if you try to pvcreate /dev/hdd, /dev/hdd never makes it into the cache.

Thanks for pointing this out.

Quoted 4 lines

Either the duplicate mechanism should be taken out, or ignore symlinks and have things that check the cache dereference the symlinks...

Will check that...

Quoted 4 lines
Signature · 3 lines
Ryan Murray, ([email protected], [email protected])
Programmer, Stormix Technologies Inc.
The opinions expressed here are my own.

Regards,
Heinz

Signature · 11 lines
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Systemmanagement TS                              T-Nova
                                                 Entwicklungszentrum Darmstadt
Heinz Mauelshagen                                Otto-Roehm-Strasse 71c
Senior Systems Engineer                          Postfach 10 05 41
                                                 64205 Darmstadt
[email protected]                      Germany
                                                 +49 6151 886-425
                                                          FAX-386
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-