All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [linux-lvm] LVM and I2O
@ 2000-09-07  3:59 Andreas Dilger
  2000-09-07 16:19 ` Heinz J. Mauelshagen
  0 siblings, 1 reply; 7+ messages in thread
From: Andreas Dilger @ 2000-09-07  3:59 UTC (permalink / raw)
  To: Linux LVM mailing list; +Cc: j.strohbehn

Jan Strohbehn writes:
> I'm trying to get the newest lvm working on I2O-devices, but it seems
> that the LVM-tools aren't able to recognize them. Has anyone a hint
> are an idea why this problem appears ???

That's because LVM was coded to do all of the device/partition searching
itself.  This is a holdover from 2.0 days when /proc/partitions did not
exist.

> Are there any workarounds ???

What you need to do is go into the LVM user tools (tools/lib/lvm_dir_cache.c)
and add /dev/i2o (or whatever the base of the device name is) to the list of
"valid" LVM devices.  You also need to add the block major(s) to at least
lvm_check_dev.c, lvm_check_partitioned_dev.c.

The issue of LVM handling partitions/devices/etc itself has caused problems
in the past, and will probably cause problems in the future.  The solution
is to have LVM allow anything in /proc/partitions, and only fall back on
its internal checks if /proc/partitions doesn't exist.

Cheers, Andreas

^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: [linux-lvm] LVM and I2O
@ 2000-09-08 17:07 Andreas Dilger
  2000-09-08 18:28 ` Jan Niehusmann
  0 siblings, 1 reply; 7+ messages in thread
From: Andreas Dilger @ 2000-09-08 17:07 UTC (permalink / raw)
  To: Linux LVM mailing list

Jan Niehusmann writes:
> But mkfs and mkswap are tools that are normally only called manually by an
> administrator who should know what he does.

And pvcreate _won't_ be called by the same person?  I don't see any
difference between overwriting your disk with mkfs, fdisk, or pvcreate.
I agree it may be a good idea to verify that a disk isn't mounted before
doing a pvcreate, but IMHO it is a wasted effort to make your code more
complex when trying to prevent people from shooting themselves in the foot.
In the end they will just get a different gun... and learn a bit.

> Some lvm tools are called automatically from startup scripts, and if the
> partition tables or other config have been changed they may try to access
> the wrong partition, so some additional checks may be reasonable.

I hope nobody is calling pvcreate in an rc script...  From what Heinz
said about LVM 0.9, it will finally implement UUID support, so LVM
will be able to identify a PV no matter what device it is on.

> What about making it a command line option? I can see three possible 
> behaviours: 

> no checking of partition types at all

This is my opinion - remove all the code that does this and "solve" the
problems that have appeared on this list in the last few months.  With
Linux 2.4, it supports DOS, BSD, Sun, SGI, Mac, Windows, etc. partitions.
We don't want LVM to re-do all of this again.

> we may have some kind of --force option that skips the checks, some people
> want to be able to shoot themselves in the foot.

As long as we don't erase a mounted filesystem, then IMHO this is the best
we can do without jumping through too many hoops.

Cheers, Andreas

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2000-09-08 18:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-09-07  3:59 [linux-lvm] LVM and I2O Andreas Dilger
2000-09-07 16:19 ` Heinz J. Mauelshagen
2000-09-07 17:27   ` Andreas Dilger
2000-09-07 22:42     ` Heinz J. Mauelshagen
2000-09-08  7:13       ` Jan Niehusmann
  -- strict thread matches above, loose matches on Subject: below --
2000-09-08 17:07 Andreas Dilger
2000-09-08 18:28 ` Jan Niehusmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.