NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/54591: lvm drops volumes on initial start



The following reply was made to PR bin/54591; it has been noted by GNATS.

From: mlelstv%serpens.de@localhost (Michael van Elst)
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: bin/54591: lvm drops volumes on initial start
Date: Wed, 2 Oct 2019 08:43:01 -0000 (UTC)

 neitzel%hackett.marshlabs.gaertner.de@localhost writes:
 
 >During NetBSD installation, I defined a disklabel(8) partition /dev/rwd0e to
 >hold the space for an LVM physical volume:
 
 Rare, but possible. 
 
 >       /root 9 # dmsetup table
 >       vg0-local: 0 4194304 linear /dev/wd0e 384
 >       vg0-pkg: 0 2097152 linear /dev/wd0e 4194688
 >       vg0-src: 0 8388608 linear /dev/wd0e 6291840
 
 Weird, there is only one PV, one LVM label and it should define
 all volumes.
 
 
 >Revover by restarting the LVM service.  In separate steps:
 >       /root 11 # /etc/rc.d/lvm onestop
 >       Unconfiguring lvm devices.
 >         Shutting Down logical volume: vg0/local
 >         Command failed with status code 5.
 >         Shutting Down logical volume: vg0/pkg
 
 >Obviously the "stop" runs into inconsistent information, and a bit
 >of debris is left;  the "dm" kernel module stays loaded:
 
 The LVM tools usually report verbosely but /etc/rc.d/lvm redirects
 their output to /dev/null. You can manually shut down the volume group
 with
 
 lvm vgchange -a n vg0
 
 add one or more -v to get tons of debug information.
 
 
 For starting LVM manually:
 
 - load the dm module with dmsetup
 - lvm pvscan            -> searches devices for LVM labels
 - lvm vgscan --mknodes  -> searches PV devices for volume groups and volumes
 - lvm vgchange -a y     -> generates the /dev/mapper links
 
 Again, with one or more -v you get debug information.
 
 
 >This may well be a category "kern" instead of "bin" bug.  
 
 The kernel only handles the mapper tables. Everything else is
 in userland, in particular the list of volumes is just from
 reading and parsing the labels, the dm driver is not involved 
 until that information is converted into tables and loaded
 into the kernel.
  
 I have fixed some LVM bugs in my local tree, but I don't remember
 anything related. 
 
 -- 
 -- 
                                 Michael van Elst
 Internet: mlelstv%serpens.de@localhost
                                 "A potential Snark may lurk in every tree."
 


Home | Main Index | Thread Index | Old Index