From: Luca Berra <bluca@comedia.it>
To: linux-lvm@sistina.com
Subject: Re: [linux-lvm] vgcreate not working
Date: Tue Mar 12 13:22:01 2002 [thread overview]
Message-ID: <20020312192251.GD30057@colombina.comedia.it> (raw)
In-Reply-To: <20020311162953.C13418@sistina.com>
[-- Attachment #1: Type: text/plain, Size: 617 bytes --]
On Mon, Mar 11, 2002 at 04:29:53PM +0100, Heinz J . Mauelshagen wrote:
> > just tried using the long devfs names, as printed above and it works fine!
> > argggh. thats me being dumb.
>
> No, not really.
> Need to do something about it, so that LVM can cope with both dev pathes.
>
i had an idea some time back, but no time to code,
after an year i believe the idea is still sound, but never got around to try it
i'll repost part of the thread, volunteers???
L.
--
Luca Berra -- bluca@comedia.it
Communication Media & Services S.r.l.
/"\
\ / ASCII RIBBON CAMPAIGN
X AGAINST HTML MAIL
/ \
[-- Attachment #2: Type: message/rfc822, Size: 4410 bytes --]
From: Luca Berra <bluca@comedia.it>
To: linux-lvm@sistina.com
Cc: lvm-devel@sistina.com
Subject: Re: [linux-lvm] Problem with vgscan/ vgcfgrestore
Date: Tue, 13 Mar 2001 08:41:02 +0100
Message-ID: <20010313084102.A28227@colombina.comedia.it>
On Mon, Mar 12, 2001 at 05:59:54PM -0700, Andreas Dilger wrote:
> Daniel Whiker writes:
> > Thanks for helping. I did in fact have devfs compiled in and mounted to an
> > alternative path.
>
> Currently devfs and LVM don't work well together, especially if it is not
> mounted on /dev. My patch fixes a small part of this, but it is still
> safer to simply configure devfs out of the kernel when using LVM, until
> your system is working properly.
>
I believe the big problem is that when lvm is compiled in /proc/partitions
contains device names in devfs format, if devfs is not mounted the lvm dir
cache will get filled with devfs names, which do not exist.
Another problem with devfs is symlinks (eg: /dev/sda), the lvm dircache will
contain only the long name (/dev/scsi/....).
i have a couple of ideas, but no time to code (sorry)
1) using realpath in the tools to solve issue 2
2) checking if the devices mentioned in /proc/partition do really exist, else
switch the cache to "scan the dev directory mode"
but better than the above
3) add another structure to the cache which contains aliases to the device
we have in the cache, aliases are added dynamically when found on the command
line or in the VGDA of a PV. We use
alias[c].name=possible alias;
lstat(possible alias, &statbuf)
if (S_ISLNK(statbuf.st_mode)) {
alias[c].target=lvm_dir_cache_find(realpath(possible alias));
if !(alias[c].target) stat(realptah(possible alias), &statbuf)
}
if (S_ISBLK(statbuf.st_mode)) {
alias[c].target=lvm_dir_cache_find_dev(statbuf.st_dev>>8,statbuf.st_mode&((1<<8)-1));
/* the above function has to be written*/
}
if (!alias[c].target) complain(loudly);
c++;
then we modify lvm_dir_cache_find to loop also on alias[], before it starts searching th
cache.
regards,
L.
P.S. in case you did not notice the above is not real code :)
--
Luca Berra -- bluca@comedia.it
Communication Media & Services S.r.l.
/"\
\ / ASCII RIBBON CAMPAIGN
X AGAINST HTML MAIL
/ \
_______________________________________________
linux-lvm mailing list
linux-lvm@sistina.com
http://lists.sistina.com/mailman/listinfo/linux-lvm
[-- Attachment #3: Type: message/rfc822, Size: 4801 bytes --]
[-- Attachment #3.1.1: Type: text/plain, Size: 2025 bytes --]
On Tue, Mar 13, 2001 at 08:41:02AM +0100, Luca Berra wrote:
> i have a couple of ideas, but no time to code (sorry)
> 1) using realpath in the tools to solve issue 2
This should be done no matter what. I can't think of any good reason not to
have the tools follow sym-links.
> 2) checking if the devices mentioned in /proc/partition do really exist, else
> switch the cache to "scan the dev directory mode"
I believe this is the way it works at present
> but better than the above
> 3) add another structure to the cache which contains aliases to the device
> we have in the cache, aliases are added dynamically when found on the command
> line or in the VGDA of a PV. We use
> alias[c].name=possible alias;
> lstat(possible alias, &statbuf)
> if (S_ISLNK(statbuf.st_mode)) {
> alias[c].target=lvm_dir_cache_find(realpath(possible alias));
> if !(alias[c].target) stat(realptah(possible alias), &statbuf)
> }
> if (S_ISBLK(statbuf.st_mode)) {
> alias[c].target=lvm_dir_cache_find_dev(statbuf.st_dev>>8,statbuf.st_mode&((1<<8)-1));
> /* the above function has to be written*/
> }
> if (!alias[c].target) complain(loudly);
> c++;
>
> then we modify lvm_dir_cache_find to loop also on alias[], before it starts searching th
> cache.
This looks interesting...and could possibly help a lot as well.
Regards,
--
AJ Lewis
Sistina Software Inc. Voice: 612-379-3951
1313 5th St SE, Suite 111 Fax: 612-379-3952
Minneapolis, MN 55414 E-Mail: lewis@sistina.com
http://www.sistina.com
Current GPG fingerprint = 3B5F 6011 5216 76A5 2F6B 52A0 941E 1261 0029 2648
Get my key at: http://www.sistina.com/~lewis/gpgkey
(Unfortunately, the PKS-type keyservers do not work with multiple sub-keys)
-----Begin Obligatory Humorous Quote----------------------------------------
Life's short and hard, kind of like a bodybuilding elf
-----End Obligatory Humorous Quote------------------------------------------
[-- Attachment #3.1.2: Type: application/pgp-signature, Size: 232 bytes --]
next prev parent reply other threads:[~2002-03-12 13:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-10 9:04 [linux-lvm] vgcreate not working Vincent AE Scott
2002-03-10 9:16 ` Laurentiu Simion
2002-03-10 9:39 ` Vincent AE Scott
2002-03-11 9:32 ` Heinz J . Mauelshagen
2002-03-12 13:22 ` Luca Berra [this message]
2002-03-13 5:03 ` Heinz J . Mauelshagen
2002-03-11 9:31 ` Heinz J . Mauelshagen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020312192251.GD30057@colombina.comedia.it \
--to=bluca@comedia.it \
--cc=linux-lvm@sistina.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox