safe to ru-run vgscan after mounting LV root?
Hi All,
First, let me say how impressed I am with LVM. I've just set up a 2.4.2 system with all filesystems in logical volumes, on an MD mirror. I am an experienced (i.e., "jaded") sysadmin, so please take my enthusiasm as a truly singular occurrence. Kudos to you.
Now for my question: The system above runs vgscan (and vgchange) from an initrd before mounting the root filesystem. After that, the /etc/lvmtab* files and directories need to be refreshed from the initrd. Instead of keeping the initrd hanging around until then, could vgscan simply be run again to recreate /etc/lvmtab*, even though PVs and LVs are active?
Thanks,
Mark.
Quoted 7 lines · Mark van Walraven
Hi All,
First, let me say how impressed I am with LVM. I've just set up a 2.4.2 system with all filesystems in logical volumes, on an MD mirror. I am an experienced (i.e., "jaded") sysadmin, so please take my enthusiasm as a truly singular occurrence. Kudos to you.
Quoted 5 lines
Now for my question: The system above runs vgscan (and vgchange) from an initrd before mounting the root filesystem. After that, the
/etc/lvmtab*files and directories need to be refreshed from the initrd. Instead of keeping the initrd hanging around until then, could vgscan simply be run again to recreate/etc/lvmtab*, even though PVs and LVs are active?
You can run vgscan as many times as you like. The main reason you wouldn't is the time it can take. But even that is small compared to the initialisation time of most SCSI cards so at bootup it shouldn't be a problem.
patrick
Just a warning. When I run vgscan on my system, it deletes my LV. I still don't know why. There seems to be a terrible bug in vgscan.
Be careful if you run it. You might have to do a vgcfgrestore to get your LV's back.
I am using the beta6 code, so I don't have old code.
Jay
Quoted 25 lines · Patrick Caulfield
Quoted 7 lines · Mark van Walraven
Hi All,
First, let me say how impressed I am with LVM. I've just set up a 2.4.2 system with all filesystems in logical volumes, on an MD mirror. I am an experienced (i.e., "jaded") sysadmin, so please take my enthusiasm as a truly singular occurrence. Kudos to you.
Quoted 5 lines
Now for my question: The system above runs vgscan (and vgchange) from an initrd before mounting the root filesystem. After that, the
/etc/lvmtab*files and directories need to be refreshed from the initrd. Instead of keeping the initrd hanging around until then, could vgscan simply be run again to recreate/etc/lvmtab*, even though PVs and LVs are active?You can run vgscan as many times as you like. The main reason you wouldn't is the time it can take. But even that is small compared to the initialisation time of most SCSI cards so at bootup it shouldn't be a problem.
patrick
_______________________________________________
linux-lvm mailing list
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm
Quoted 2 lines · Patrick Caulfield
You can run vgscan as many times as you like. The main reason you wouldn't is the time it can take. But even that is small compared to the initialisation time
Thanks for the feedback. That's what I figured, but ...
Quoted 2 lines · Jay Sissom
Just a warning. When I run vgscan on my system, it deletes my LV. I still don't know why. There seems to be a terrible bug in vgscan.
... this worries me.
Could anyone else comment on this, please? Is Jay's problem bizzare and irreproducable, or is there possibly a problem with replacing the lvmtab files from beneath the noses of the other tools?
Thanks,
Mark.
Quoted 10 lines · you
Quoted 3 lines · Patrick Caulfield
You can run vgscan as many times as you like. The main reason you wouldn't is the time it can take. But even that is small compared to the initialisation time
Thanks for the feedback. That's what I figured, but ...
Quoted 2 lines · Jay Sissom
Just a warning. When I run vgscan on my system, it deletes my LV. I still don't know why. There seems to be a terrible bug in vgscan.
What release of the utilities/patch? I had this problem with beta2, which is what ships with the kernel. Upgrading to beta6 fixed it _here_.
Quoted 1 line
... this worries me.
Me too... Here hoping that beta6 is the answer.
Quoted 3 lines
Could anyone else comment on this, please? Is Jay's problem bizzare and irreproducable, or is there possibly a problem with replacing the lvmtab files from beneath the noses of the other tools?
Ed Tomlinson
Nope, I am running kernel 2.4.2 with the beta6 patch and the beta6 utilities.
This started after I resized a LV. The answer from this list was, "don't run vgscan". Now people on the list say you can run it as many times as you like. If I run it once, all my LV's are gone. I'd like to figure out what the problem is, but don't know where to start looking.
Quoted 29 lines · Ed Tomlinson
Quoted 10 lines · you
Quoted 3 lines · Patrick Caulfield
You can run vgscan as many times as you like. The main reason you wouldn't is the time it can take. But even that is small compared to the initialisation time
Thanks for the feedback. That's what I figured, but ...
Quoted 2 lines · Jay Sissom
Just a warning. When I run vgscan on my system, it deletes my LV. I still don't know why. There seems to be a terrible bug in vgscan.
What release of the utilities/patch? I had this problem with beta2, which is what ships with the kernel. Upgrading to beta6 fixed it _here_.
Quoted 1 line
... this worries me.
Me too... Here hoping that beta6 is the answer.
Quoted 3 lines
Could anyone else comment on this, please? Is Jay's problem bizzare and irreproducable, or is there possibly a problem with replacing the lvmtab files from beneath the noses of the other tools?
Ed Tomlinson
_______________________________________________
linux-lvm mailing list
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm
Quoted 2 lines · Jay Sissom
Nope, I am running kernel 2.4.2 with the beta6 patch and the beta6 utilities.
OK, that's a bad sign.
Quoted 4 lines
This started after I resized a LV. The answer from this list was, "don't run vgscan". Now people on the list say you can run it as many times as you like. If I run it once, all my LV's are gone. I'd like to figure out what the problem is, but don't know where to start looking.
You _should_ be able to re-run vgscan, but in most cases (as you have seen) it is not _necessary_ to do so.
In any case, how to track down the problem - run "vgscan -v -d" and start going through the output with a fine-tooth comb. Basically, at some point you will start getting errors, and that is what is bad (it is OK to get error codes in a few places, like when checking if a partition/disk has an LVM header on it).
For a VG to be operative, you need all of the PVs in it to be OK. This seems to be a common source of problems. I have a modified pv_read_all_pv() and pv_read_all_pv_of_vg() which is a lot better in terms of reporting why a PV was discarded from the PV list. This may make finding the source of the problem easier (even obvious ;-).
You can find it in an email to the lvm-devel mailing list dated March 15 "Re: [lvm-devel] Extent list sorting considered buggy".
Cheers, Andreas
Signature · 3 lines
Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto,
\ would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- DogbertQuoted 7 lines · Mark van Walraven
Quoted 2 lines · Patrick Caulfield
You can run vgscan as many times as you like. The main reason you wouldn't is the time it can take. But even that is small compared to the initialisation time
Thanks for the feedback. That's what I figured, but ...
On Tue, Mar 27, 2001 at 11:01:50AM -0500, Jay Sissom wrote:
Quoted 8 lines
Quoted 2 lines
Just a warning. When I run vgscan on my system, it deletes my LV. I still don't know why. There seems to be a terrible bug in vgscan.
... this worries me.
Could anyone else comment on this, please? Is Jay's problem bizzare and irreproducable, or is there possibly a problem with replacing the lvmtab files from beneath the noses of the other tools?
I've never had vgscan do that to me, though I'm not denying that it happens. There certainly have been some odd vgscan reports on the list over the last few months. Most of them seem to be from systems that have been upgraded from 0.8 I don't know if it is true in this case.
There is no fundamental problem with replacing the lvmtab files under the noses of other tools because the LVM locking takes care of that. If stuff is getting corrupted then it's a bug of course.
patrick