* 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-07 3:59 Andreas Dilger
@ 2000-09-07 16:19 ` Heinz J. Mauelshagen
2000-09-07 17:27 ` Andreas Dilger
0 siblings, 1 reply; 7+ messages in thread
From: Heinz J. Mauelshagen @ 2000-09-07 16:19 UTC (permalink / raw)
To: Andreas Dilger; +Cc: linux-lvm
On Wed, Sep 06, 2000 at 09:59:26PM -0600, Andreas Dilger wrote:
> 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.
It does this since 0.8final.
_But_ in case a partiton is used to set up a Physical Volume it additionally
checks the partition type identifier to avoid accidents like overwriting
a native Linux partition.
If /proc/partitions would provide a Partition Type Identifier as well,
some of the problem causing LVM library code could be dropped.
>
> Cheers, Andreas
--
Regards,
Heinz -- The LVM guy --
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Heinz Mauelshagen Sistina Software Inc.
Senior Consultant/Developer Bartningstr. 12
64289 Darmstadt
Germany
Mauelshagen@Sistina.com +49 6151 7103 86
FAX 7103 96
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-lvm] LVM and I2O
2000-09-07 16:19 ` Heinz J. Mauelshagen
@ 2000-09-07 17:27 ` Andreas Dilger
2000-09-07 22:42 ` Heinz J. Mauelshagen
0 siblings, 1 reply; 7+ messages in thread
From: Andreas Dilger @ 2000-09-07 17:27 UTC (permalink / raw)
To: Linux LVM mailing list
Heinz, you write:
> _But_ in case a partiton is used to set up a Physical Volume it additionally
> checks the partition type identifier to avoid accidents like overwriting
> a native Linux partition.
This is "overly safe" and adds complexity to LVM. There is no such safety
check for mkfs or mkswap or fdisk or any number of other ways to destroy
your disk...
Cheers, Andreas
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-lvm] LVM and I2O
2000-09-07 17:27 ` Andreas Dilger
@ 2000-09-07 22:42 ` Heinz J. Mauelshagen
2000-09-08 7:13 ` Jan Niehusmann
0 siblings, 1 reply; 7+ messages in thread
From: Heinz J. Mauelshagen @ 2000-09-07 22:42 UTC (permalink / raw)
To: Andreas Dilger; +Cc: mge, linux-lvm
On Thu, Sep 07, 2000 at 11:27:59AM -0600, Andreas Dilger wrote:
> Heinz, you write:
> > _But_ in case a partiton is used to set up a Physical Volume it additionally
> > checks the partition type identifier to avoid accidents like overwriting
> > a native Linux partition.
>
> This is "overly safe" and adds complexity to LVM. There is no such safety
> check for mkfs or mkswap or fdisk or any number of other ways to destroy
> your disk...
That's obviously right ;-{(
If we drop the safety code in the LVM we will still have our officially
registered 0x8E LVM partiton type identifier which could even be missleading,
because the partition might be used for different purposes than beeing used
by LVM.
Other opinions?
--
Regards,
Heinz -- The LVM guy --
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Heinz Mauelshagen Sistina Software Inc.
Senior Consultant/Developer Bartningstr. 12
64289 Darmstadt
Germany
Mauelshagen@Sistina.com +49 6151 7103 86
FAX 7103 96
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-lvm] LVM and I2O
2000-09-07 22:42 ` Heinz J. Mauelshagen
@ 2000-09-08 7:13 ` Jan Niehusmann
0 siblings, 0 replies; 7+ messages in thread
From: Jan Niehusmann @ 2000-09-08 7:13 UTC (permalink / raw)
To: linux-lvm
On Thu, Sep 07, 2000 at 10:42:23PM +0000, Heinz J. Mauelshagen wrote:
> On Thu, Sep 07, 2000 at 11:27:59AM -0600, Andreas Dilger wrote:
> > This is "overly safe" and adds complexity to LVM. There is no such safety
> > check for mkfs or mkswap or fdisk or any number of other ways to destroy
> > your disk...
But mkfs and mkswap are tools that are normally only called manually by an
administrator who should know what he does.
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.
> If we drop the safety code in the LVM we will still have our officially
> registered 0x8E LVM partiton type identifier which could even be missleading,
> because the partition might be used for different purposes than beeing used
> by LVM.
What about making it a command line option? I can see three possible
behaviours:
- no checking of partition types at all
- use /proc/partitions, but do the partition type check wherever possible.
If we don't know where the partition table for a given partition is, try
to use the partition
- require valid partition type, as we currently do. If we don't know how to
find the partition type, don't use the partition.
I think the second mode could be the default. The first one is not too usefull,
but we may have some kind of --force option that skips the checks, some people
want to be able to shoot themselves in the foot.
Jan
^ 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
* Re: [linux-lvm] LVM and I2O
2000-09-08 17:07 [linux-lvm] LVM and I2O Andreas Dilger
@ 2000-09-08 18:28 ` Jan Niehusmann
0 siblings, 0 replies; 7+ messages in thread
From: Jan Niehusmann @ 2000-09-08 18:28 UTC (permalink / raw)
To: Andreas Dilger; +Cc: Linux LVM mailing list
On Fri, Sep 08, 2000 at 11:07:52AM -0600, Andreas Dilger wrote:
> 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.
Sorry, I didn't check which tools actually had problems with unknown partition
types. pvcreate, of course, is similar enough to mkfs to share the same checks.
Jan
^ 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-08 17:07 [linux-lvm] LVM and I2O Andreas Dilger
2000-09-08 18:28 ` Jan Niehusmann
-- strict thread matches above, loose matches on Subject: below --
2000-09-07 3:59 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
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.