linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] Can't see /dev/hdk1
@ 1999-10-08 10:06 Bruce Hewitson
  0 siblings, 0 replies; 3+ messages in thread
From: Bruce Hewitson @ 1999-10-08 10:06 UTC (permalink / raw)
  To: linux-lvm


I'm new to LVM -- but have compiled, installed etc under linux 2.2.10, on
a system that was running md raid with 6 ide chains and 6 20Gig ATA
drives.

With LVM I can access /dev/hdi1, but not and identical /dev/hdk1.
pvcreate works fine, but when I do a vgcreate I get the following:

bud:~# vgcreate -v tst /dev/hdk1
vgcreate -- checking volume group name
vgcreate -- locking logical volume manager
vgcreate -- checking volume group "tst" existence
vgcreate -- counting all existing volume groups
vgcreate -- reading all physical volume data from disks
vgcreate -- checking if all given physical volumes in command line are new
vgcreate -- checking physical volumes name "/dev/hdk1"
vgcreate -- no valid physical volumes in command line

Any pointers as to what I've done wrong much appreciated.

- bruce

 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 | Dr. Bruce C. Hewitson                          Ph:  +27 21 650 2878 |
 | Dept. Environmental & Geographical Sc.         Fax: +27 21 650 3791 |
 | University of Cape Town, Private Bag, Rondebosch, South Africa 7701 |
 |      hewitson@egs.uct.ac.za          http://www.egs.uct.ac.za       |
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 

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

* Re: [linux-lvm] Can't see /dev/hdk1
@ 1999-10-12 20:55 Heinz Mauelshagen
  0 siblings, 0 replies; 3+ messages in thread
From: Heinz Mauelshagen @ 1999-10-12 20:55 UTC (permalink / raw)
  To: linux-lvm

> 
> Michael -- many thanks for the bug fix -- all works really well and I'm
> migrating a number of our disk towers to LVM! Your time much appreciated!
> I guess this will make it into the next release?

Yes.

It's in 0.8.

Regards,
Heinz

> 
> - b
> 
> On Sun, 10 Oct 1999, Michael Marxmeier wrote:
> 
> > Hi Bruce.
> > 
> > > There is no physical hdj* device, as I have kept the disks to one per IDE
> > > channel.  (By the way, if it helps, all drives work fine as stand alone
> > > ext2fs devices, and under md raid).
> > 
> > And that triggers a bug in pv_read_all_pv(). To opmize scan time for 
> > the cluttered /dev directory, pv_read_all_pv() tries to skip all
> > partitions for devices which don't exist.
> > Hover it's done in a wrong way ...
> > 
> > As a quick fix, have a look at lib/pv_read_all_pv.c and
> > modify it as below. The current code tries to skip partitions
> > if the device does not exist. However it blindly skips over the
> > next 15 devices it has found in /dev.
> > 
> > The code should look like:
> > 
> >          if ( ( tst = open ( dev_name, O_RDONLY)) == -1) {
> >             continue;
> > #if 0
> >             if ( MAJOR ( dir_cache[n].st_rdev) != MD_MAJOR &&
> >                  MINOR ( dir_cache[n].st_rdev) % 16 == 0) {
> >                n += 15;
> >                continue;
> >             }
> > #endif
> >          } else close ( tst);
> > 
> > Does this fix your problem?
> > 
> > The correct solution would be to order the dir_cache in major/minor
> > order and skip based on major/minor.
> > 
> > 
> > Hope this helps
> > Michael
> > 
> > -- 
> > Michael Marxmeier           Marxmeier Software AG
> > E-Mail: mike@msede.com      Besenbruchstrasse 9
> > Phone : +49 202 2431440     42285 Wuppertal, Germany
> > Fax   : +49 202 2431420     http://www.msede.com/
> > 
> 
>  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>  | Dr. Bruce C. Hewitson                          Ph:  +27 21 650 2878 |
>  | Dept. Environmental & Geographical Sc.         Fax: +27 21 650 3791 |
>  | University of Cape Town, Private Bag, Rondebosch, South Africa 7701 |
>  |      hewitson@egs.uct.ac.za          http://www.egs.uct.ac.za       |
>  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
> 
> 


--

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Systemmanagement CS-TS                           T-Nova
                                                 Entwicklungszentrum Darmstadt
Heinz Mauelshagen                                Otto-Roehm-Strasse 71c
Senior Systems Engineer                          Postfach 10 05 41
                                                 64205 Darmstadt
mge@ez-darmstadt.telekom.de                      Germany
                                                 +49 6151 886-425
                                                          FAX-386
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

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

* Re: [linux-lvm] Can't see /dev/hdk1
       [not found] <Pine.WNT.4.05.9910081501230.-171375@socks.egs.uct.ac.za>
@ 1999-10-10 20:48 ` Michael Marxmeier
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Marxmeier @ 1999-10-10 20:48 UTC (permalink / raw)
  To: Bruce Hewitson; +Cc: Heinz Mauelshagen, linux-lvm

Hi Bruce.

> There is no physical hdj* device, as I have kept the disks to one per IDE
> channel.  (By the way, if it helps, all drives work fine as stand alone
> ext2fs devices, and under md raid).

And that triggers a bug in pv_read_all_pv(). To opmize scan time for 
the cluttered /dev directory, pv_read_all_pv() tries to skip all
partitions for devices which don't exist.
Hover it's done in a wrong way ...

As a quick fix, have a look at lib/pv_read_all_pv.c and
modify it as below. The current code tries to skip partitions
if the device does not exist. However it blindly skips over the
next 15 devices it has found in /dev.

The code should look like:

         if ( ( tst = open ( dev_name, O_RDONLY)) == -1) {
            continue;
#if 0
            if ( MAJOR ( dir_cache[n].st_rdev) != MD_MAJOR &&
                 MINOR ( dir_cache[n].st_rdev) % 16 == 0) {
               n += 15;
               continue;
            }
#endif
         } else close ( tst);

Does this fix your problem?

The correct solution would be to order the dir_cache in major/minor
order and skip based on major/minor.


Hope this helps
Michael

-- 
Michael Marxmeier           Marxmeier Software AG
E-Mail: mike@msede.com      Besenbruchstrasse 9
Phone : +49 202 2431440     42285 Wuppertal, Germany
Fax   : +49 202 2431420     http://www.msede.com/

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

end of thread, other threads:[~1999-10-12 20:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-10-08 10:06 [linux-lvm] Can't see /dev/hdk1 Bruce Hewitson
     [not found] <Pine.WNT.4.05.9910081501230.-171375@socks.egs.uct.ac.za>
1999-10-10 20:48 ` Michael Marxmeier
1999-10-12 20:55 Heinz Mauelshagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).