Devfs and lvm problems
Hi,
I�ve built a kernel with lvm and devfs support and got some problems.
1.) devfsd doesn�t create /dev/vg00/group etc files, so vgchange -ay
fails
2.) vgscan fails with
vgscan -- found inactive volume group "vg00"
vgscan -- ERROR "lvm_remouverecursive(): opendir" removing volume group directory and special files vgscan -- ERROR "lvm_remouverecursive(): opendir" creating "/etc/lvmtab" and "/etc/lvmtab.d"
Is it possible to marry devfs and lvm ?
And what is the Right Way (tm)
Thanks in advance
Ingo
[email protected] wrote/schrieb/scribsit:
Quoted 8 lines
1.) devfsd doesn�t create
/dev/vg00/groupetc files, so vgchange -ay
fails2.) vgscan fails with
vgscan -- found inactive volume group "vg00"
vgscan -- ERROR "lvm_remouverecursive(): opendir" removing volume group directory and special files vgscan -- ERROR "lvm_remouverecursive(): opendir" creating "/etc/lvmtab" and "/etc/lvmtab.d"
The problem is that vgscan wants to recursively remove /dev/vg00 and its contents but mishandles the case that /dev/vg00 does not even exist anymore (since after a reboot a devfs is 'clean').
This is easy to fix, I'm attaching a patch.
Would the lvmtools maintainer consider this patch for inclusion into the tree?
Stefan
tools/lib/lvm_remove_recursive.c renamed from tools/lib/lvm_remove_recursive.c.orig +2 -2
@@ -33,9 +33,9 @@#ifdef DEBUG debug_enter ("lvm_remove_recursive -- CALLED with dir: %s\n" , dir);#endif -if ( dir !=NULL ) { +if ( (dir !=NULL ) && (lstat ( dir, &sb) ==0 ) ) {/* check beeing called with a file name */ -if (lstat ( dir, &sb) ==0 && !S_ISDIR ( sb.st_mode))unlink ( dir); +if ( !S_ISDIR ( sb.st_mode))unlink ( dir);else {/* open and read the directory */ if ( ( this_dir =opendir ( dir)) !=NULL ) {
Quoted 10 lines
[email protected] wrote/schrieb/scribsit:
Quoted 8 lines
1.) devfsd doesn´t create
/dev/vg00/groupetc files, so vgchange -ay
fails2.) vgscan fails with
vgscan -- found inactive volume group "vg00"
vgscan -- ERROR "lvm_remouverecursive(): opendir" removing volume group directory and special files vgscan -- ERROR "lvm_remouverecursive(): opendir" creating "/etc/lvmtab" and "/etc/lvmtab.d"
Quoted 7 lines
The problem is that vgscan wants to recursively remove
/dev/vg00and its contents but mishandles the case that/dev/vg00does not even exist anymore (since after a reboot a devfs is 'clean').This is easy to fix, I'm attaching a patch.
Would the lvmtools maintainer consider this patch for inclusion into the tree?
Sure, it will be included!
Heinz
Quoted 2 lines
Stefan
[Attachment, skipping...]
Signature · 11 lines
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Systemmanagement TS T-Nova
Entwicklungszentrum Darmstadt
Heinz Mauelshagen Otto-Roehm-Strasse 71c
Senior Systems Engineer Postfach 10 05 41
64205 Darmstadt
[email protected] Germany
+49 6151 886-425
FAX-386
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-