* [linux-lvm] WebMin LVM module development
@ 2000-12-06 9:43 Michael Boman
2000-12-06 14:20 ` Heinz J. Mauelshagen
2000-12-06 18:49 ` [linux-lvm] " Luca Berra
0 siblings, 2 replies; 5+ messages in thread
From: Michael Boman @ 2000-12-06 9:43 UTC (permalink / raw)
To: linux-lvm, WebMin List, linux-raid; +Cc: Laurence Liew
[-- Attachment #1: Type: text/plain, Size: 1991 bytes --]
Hi,
for the past week I've been working on a WebMin (http://www.webmin.com)
module for LVM.
I have a few questions I need to get answered as well as I seek people
that is willing to try the LVM module out.
My questions are:
- How can I check what PV's are availble to use with a VG. I know the
pvscan command, but it takes quite a long while to complete and I wonder
if there is any shortcuts to find what PV's that is free to use with a
VG.
- I have problem using MD as a PV of my VG, any hints what it can be?
<output>
mike:/mnt# vgextend vg_test /dev/md0
vgextend -- INFO: maximum logical volume size is 255.99 Gigabyte
vgextend -- ERROR: no physical volumes usable to extend volume group
"vg_test"
</output>
Seeking bug-hunters and feedback:
I'd like to offer the oppertunity for you guy's (and gal's) that are
living on the edge to try out my WebMin LVM module. It's not fully
operational yet (Can only display VG's and assosiated info as well as
create VG's), but I am hoping that a early beta release will provide me
with enuff feedback to make this a good and useful module to WebMin.
The code is under GNU GPL License version 2 or later, and currently
given out on a per-request basis. I nor the company I work for offers no
garranty that it wont eat your data etc.. #include <std/disclaimer.txt>
as per usual.
Jargon file for the uninformed:
MD = Multiple Devices, software raid.
PV = Physical Volume
PE = Physical Extent
LV = Logical Volume
VG = Volume Group
Best regards
Michael Boman
PS
Sorry for cross-posting here, but I wanted to make sure all relivant
parties got informed.
DS
--
"eLINUX --- Enabling the Net Economy on Linux"
----------------------------------------------------------
Michael Boman eLinux Pte Ltd
Technical Consultant http://www.elinux.com.sg
michael@elinux.com.sg Tel: (65) 227 6180
Fax: (65) 227 5808
----------------------------------------------------------
[-- Attachment #2: Card for Michael Boman --]
[-- Type: text/x-vcard, Size: 394 bytes --]
begin:vcard
n:Boman;Michael
tel;cell:+65 9855 1734
tel;fax:+65 227 5808
tel;work:+65 227 6180
x-mozilla-html:FALSE
url:http://www.elinux.com.sg
org:eLinux Pte Ltd;Technical Division
version:2.1
email;internet:michael@elinux.com.sg
title:Technical Consultant
adr;quoted-printable:;;3 Shenton Way=0D=0A#22-09 Shenton House;Singapore;;068805;Singapore
x-mozilla-cpt:;0
fn:Michael Boman
end:vcard
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] WebMin LVM module development
2000-12-06 9:43 [linux-lvm] WebMin LVM module development Michael Boman
@ 2000-12-06 14:20 ` Heinz J. Mauelshagen
2000-12-06 18:49 ` [linux-lvm] " Luca Berra
1 sibling, 0 replies; 5+ messages in thread
From: Heinz J. Mauelshagen @ 2000-12-06 14:20 UTC (permalink / raw)
To: linux-lvm; +Cc: mge
On Wed, Dec 06, 2000 at 05:43:55PM +0800, Michael Boman wrote:
> Hi,
>
> for the past week I've been working on a WebMin (http://www.webmin.com)
> module for LVM.
>
> I have a few questions I need to get answered as well as I seek people
> that is willing to try the LVM module out.
>
> My questions are:
> - How can I check what PV's are availble to use with a VG. I know the
> pvscan command, but it takes quite a long while to complete and I wonder
> if there is any shortcuts to find what PV's that is free to use with a
> VG.
No. pvscan's purpose is to do that.
You probably saw the "-n" option to search for free PVs?
>
> - I have problem using MD as a PV of my VG, any hints what it can be?
> <output>
> mike:/mnt# vgextend vg_test /dev/md0
> vgextend -- INFO: maximum logical volume size is 255.99 Gigabyte
> vgextend -- ERROR: no physical volumes usable to extend volume group
> "vg_test"
> </output>
That's a bug which in 0.9.
There's a fix in 0.8.1 which probaly didn't make it.
0.9.1 should fix this again.
>
> Seeking bug-hunters and feedback:
> I'd like to offer the oppertunity for you guy's (and gal's) that are
> living on the edge to try out my WebMin LVM module. It's not fully
> operational yet (Can only display VG's and assosiated info as well as
> create VG's), but I am hoping that a early beta release will provide me
> with enuff feedback to make this a good and useful module to WebMin.
>
> The code is under GNU GPL License version 2 or later, and currently
> given out on a per-request basis. I nor the company I work for offers no
> garranty that it wont eat your data etc.. #include <std/disclaimer.txt>
> as per usual.
>
> Jargon file for the uninformed:
> MD = Multiple Devices, software raid.
> PV = Physical Volume
> PE = Physical Extent
> LV = Logical Volume
> VG = Volume Group
>
> Best regards
> Michael Boman
>
> PS
> Sorry for cross-posting here, but I wanted to make sure all relivant
> parties got informed.
> DS
>
> --
> "eLINUX --- Enabling the Net Economy on Linux"
> ----------------------------------------------------------
> Michael Boman eLinux Pte Ltd
> Technical Consultant http://www.elinux.com.sg
> michael@elinux.com.sg Tel: (65) 227 6180
> Fax: (65) 227 5808
> ----------------------------------------------------------
Content-Description: Card for Michael Boman
--
Regards,
Heinz -- The LVM guy --
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Heinz Mauelshagen Sistina Software Inc.
Senior Consultant/Developer Bartningstr. 12
64289 Darmstadt
Germany
Mauelshagen@Sistina.com +49 6151 7103 86
FAX 7103 96
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 5+ messages in thread
* [linux-lvm] Re: WebMin LVM module development
2000-12-06 9:43 [linux-lvm] WebMin LVM module development Michael Boman
2000-12-06 14:20 ` Heinz J. Mauelshagen
@ 2000-12-06 18:49 ` Luca Berra
2000-12-06 19:02 ` Steven Lembark
2000-12-07 17:21 ` [linux-lvm] lvm 0.9 + raid (Was: WebMin LVM module development) Luca Berra
1 sibling, 2 replies; 5+ messages in thread
From: Luca Berra @ 2000-12-06 18:49 UTC (permalink / raw)
To: Michael Boman; +Cc: linux-lvm, linux-raid
On Wed, Dec 06, 2000 at 05:43:55PM +0800, Michael Boman wrote:
>
> - I have problem using MD as a PV of my VG, any hints what it can be?
> <output>
> mike:/mnt# vgextend vg_test /dev/md0
> vgextend -- INFO: maximum logical volume size is 255.99 Gigabyte
> vgextend -- ERROR: no physical volumes usable to extend volume group
> "vg_test"
> </output>
It's a known problem,
LVM 0.8final does not work
LVM 0.8.1 does work
LVM 0.9 does not again
Tomorrow is holiday in Milan, so i will try to give it a look
Regards,
L.
--
Luca Berra -- bluca@comedia.it
Communication Media & Services S.r.l.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] Re: WebMin LVM module development
2000-12-06 18:49 ` [linux-lvm] " Luca Berra
@ 2000-12-06 19:02 ` Steven Lembark
2000-12-07 17:21 ` [linux-lvm] lvm 0.9 + raid (Was: WebMin LVM module development) Luca Berra
1 sibling, 0 replies; 5+ messages in thread
From: Steven Lembark @ 2000-12-06 19:02 UTC (permalink / raw)
To: linux-lvm
> Tomorrow is holiday in Milan, so i will try to give it a look
hey, what else would you want to do on your holiday :-)
--
Steven Lembark 2930 W. Palmer St.
Chicago, IL 60647
lembark@wrkhors.com 800-762-1582
^ permalink raw reply [flat|nested] 5+ messages in thread
* [linux-lvm] lvm 0.9 + raid (Was: WebMin LVM module development)
2000-12-06 18:49 ` [linux-lvm] " Luca Berra
2000-12-06 19:02 ` Steven Lembark
@ 2000-12-07 17:21 ` Luca Berra
1 sibling, 0 replies; 5+ messages in thread
From: Luca Berra @ 2000-12-07 17:21 UTC (permalink / raw)
To: Michael Boman, linux-lvm, linux-raid, lvm-devel
[-- Attachment #1: Type: text/plain, Size: 1317 bytes --]
On Wed, Dec 06, 2000 at 07:49:35PM +0100, Luca Berra wrote:
> On Wed, Dec 06, 2000 at 05:43:55PM +0800, Michael Boman wrote:
> >
> > - I have problem using MD as a PV of my VG, any hints what it can be?
...
> Tomorrow is holiday in Milan, so i will try to give it a look
here it is, or so i hope...
i dinna give it thorough testing, but it seems to work for me
comments on the patch:
Makefile.in: just put a version number in the library,
so i can have different versions installed
pv_get_size.c: squashed an old bug that reappeared
vg_read_from_pv.c: it would have failed if pv_read said it was an MD, i also
catch LVM_EPV_READ_PV_EXPORTED, since this is done in other
places also
pv_read_uuidlist.c: same as above, this seems the right thing to me, but now
lvm 0.8 tools dont' work anymore on this vg, 0.8.1 seems to
work ok (?!?)
liblvm.h and vg_remove_dir_and_group_and_nodes.c: this is to work around a probable
kernel bug with lvm and devfs, if the dev/vgXX directory was removed
it was the impossible to fill it again with devices.
I also believe that the kernel should create the lvm devices with devfs
but it doesn't.
Regards
L.
--
Luca Berra -- bluca@comedia.it
Communication Media & Services S.r.l.
[-- Attachment #2: lvm_0.9.bluca.diff --]
[-- Type: text/plain, Size: 5490 bytes --]
--- LVM/0.9/tools/lib/pv_get_size.c.bluca.orig Mon Nov 13 01:20:11 2000
+++ LVM/0.9/tools/lib/pv_get_size.c Sun Nov 26 10:53:09 2000
@@ -87,6 +87,7 @@
goto pv_get_size_end;
}
+ memset ( disk_dev_name, 0, sizeof ( disk_dev_name));
if ( ( cache_entry = lvm_dir_cache_find ( dev_name)) != NULL) {
if ( lvm_check_partitioned_dev ( cache_entry->st_rdev) == TRUE) {
st_rdev = cache_entry->st_rdev -
@@ -96,14 +97,14 @@
if ( dir_cache[i].st_rdev == st_rdev)
break;
}
- }
+ strncpy ( disk_dev_name, dir_cache[i].dev_name, sizeof ( disk_dev_name) - 1);
+ } else {
+ strncpy ( disk_dev_name, dev_name, sizeof ( disk_dev_name) - 1);
+ }
} else {
ret = -LVM_EPV_GET_SIZE_LVM_DIR_CACHE;
goto pv_get_size_end;
}
-
- memset ( disk_dev_name, 0, sizeof ( disk_dev_name));
- strncpy ( disk_dev_name, dir_cache[i].dev_name, sizeof ( disk_dev_name) - 1);
first = 1;
if ( ( pv_handle = open ( disk_dev_name, O_RDONLY)) == -1) {
--- LVM/0.9/tools/lib/Makefile.in.bluca.orig Sun Nov 12 19:52:12 2000
+++ LVM/0.9/tools/lib/Makefile.in Sun Nov 26 19:49:22 2000
@@ -32,9 +32,11 @@
include ../tools_and_lib.make.tmpl
ARCHIVE = liblvm.a
+SOV = liblvm.so.0.9.0
+SOM = liblvm.so.0.9
SO = liblvm.so
-ALL_RM = $(ALL_OBJECTS) $(ARCHIVE) $(SO)
+ALL_RM = $(ALL_OBJECTS) $(ARCHIVE) $(SO) $(SOM) $(SOV)
all_this: $(ARCHIVE) $(SO) Makefile
@echo ""
@@ -43,15 +45,17 @@
install_this:
@echo "*** Installing $(ARCHIVE) and $(SO) in ${prefix}/lib ***"
- @rm -f ${libdir}/${SO} ${libdir}/$(ARCHIVE);
+ @rm -f ${libdir}/${SO} ${libdir}/${SOV} ${libdir}/${SOM} ${libdir}/$(ARCHIVE);
@INSTALL@ -d ${libdir}
- @INSTALL@ $(ARCHIVE) $(SO) ${libdir}
+ @INSTALL@ $(ARCHIVE) $(SOV) ${libdir}
chmod 444 ${libdir}/$(ARCHIVE)
- chmod 555 ${libdir}/$(SO)
+ chmod 555 ${libdir}/$(SOV)
+ ln -s $(SOV) ${libdir}/${SO}
+ ln -s $(SOV) ${libdir}/${SOM}
remove_this:
@echo "*** Removing $(ARCHIVE) and $(SO) in ${prefix}/lib ***"
- @rm -f ${libdir}/${SO} ${libdir}/$(ARCHIVE);
+ @rm -f ${libdir}/${SO} ${libdir}/${SOV} ${libdir}/${SOM} ${libdir}/$(ARCHIVE);
$(ALL_SOURCES): liblvm.h $(OTHER_DEP)
@@ -64,7 +68,9 @@
ranlib $@
$(SO): $(ALL_OBJECTS)
- ld -shared -o $(SO) $(ALL_OBJECTS)
+ gcc -shared -Wl,-soname,$(SOM) -o $(SOV) $(ALL_OBJECTS)
+ ln -sf $(SOV) $(SOM)
+ ln -sf $(SOV) $(SO)
clean_this:
rm -f $(ALL_RM)
--- LVM/0.9/tools/lib/vg_read_from_pv.c.bluca.orig Mon Nov 13 01:26:33 2000
+++ LVM/0.9/tools/lib/vg_read_from_pv.c Thu Dec 7 11:38:54 2000
@@ -45,7 +45,9 @@
goto vg_read_from_pv_end;
}
- if ( pv_read ( pv_name, &pv_this_ptr, NULL) == 0) {
+ if ( ( ret = pv_read ( pv_name, &pv_this_ptr, NULL)) == 0 ||
+ ret == -LVM_EPV_READ_MD_DEVICE ||
+ ret == -LVM_EPV_READ_PV_EXPORTED) {
/* read the VG info */
if ( ( pv_handle = open ( pv_name, O_RDONLY)) == -1)
ret = -LVM_EVG_READ_OPEN;
@@ -53,6 +55,7 @@
pv_this_ptr->vg_on_disk.base) ret = -LVM_EVG_READ_LSEEK;
else if ( read ( pv_handle, &vg_this, sizeof ( vg_this)) != \
sizeof ( vg_this)) ret = -LVM_EVG_READ_READ;
+ else ret = 0;
if ( pv_handle != -1) close ( pv_handle);
if ( ret == 0) {
--- LVM/0.9/tools/lib/liblvm.h.bluca.orig Tue Nov 14 23:20:24 2000
+++ LVM/0.9/tools/lib/liblvm.h Thu Dec 7 13:06:39 2000
@@ -108,6 +108,7 @@
#define LVMTAB_DIR "/etc/lvmtab.d" /* storage dir VG data */
#define LVMTAB_MINSIZE ( sizeof ( vg_t) + sizeof ( lv_t) + sizeof ( pv_t))
#define LVM_DEV "/dev/lvm"
+#define DEVFS_DEV ".devfsd"
#define VG_BACKUP_DIR "/etc/lvmconf"
#define DISK_NAME_LEN 8
#define LV_MIN_NAME_LEN 5
--- LVM/0.9/tools/lib/pv_read_uuidlist.c.bluca.orig Mon Nov 20 03:14:51 2000
+++ LVM/0.9/tools/lib/pv_read_uuidlist.c Thu Dec 7 11:44:16 2000
@@ -61,7 +61,9 @@
pv_uuidlist == NULL) {
ret = -LVM_EPARAM;
} else {
- if ( ( ret = pv_read ( pv_name, &pv_this_ptr, NULL)) == 0) {
+ if ( ( ret = pv_read ( pv_name, &pv_this_ptr, NULL)) == 0 ||
+ ret == -LVM_EPV_READ_MD_DEVICE ||
+ ret == -LVM_EPV_READ_PV_EXPORTED) {
if ( ( pv_handle = open ( pv_name, O_RDONLY)) == -1)
ret = -LVM_EPV_READ_UUIDLIST_OPEN;
else if ( lseek ( pv_handle,
@@ -89,6 +91,7 @@
memset ( ptr, 0, NAME_LEN);
}
}
+ ret = 0;
}
for ( i = 0; i < ABS_MAX_PV - 1; i++) {
ptr = this_pv_uuidlist + i * NAME_LEN;
--- LVM/0.9/tools/lib/vg_remove_dir_and_group_and_nodes.c.bluca.orig Mon Nov 13 01:20:11 2000
+++ LVM/0.9/tools/lib/vg_remove_dir_and_group_and_nodes.c Thu Dec 7 13:24:58 2000
@@ -43,11 +43,14 @@
debug_enter ( "vg_remove_dir_and_group_and_nodes -- CALLED\n");
#endif
- if ( vg_name != NULL && vg_check_name ( vg_name) == 0) {
+ if ( vg_name == NULL || vg_check_name ( vg_name) < 0) ret = -LVM_EPARAM;
+ /* should be a warning, but i would have to catch it */
+ else if ( access ( LVM_DIR_PREFIX "/" DEVFS_DEV, F_OK) == 0 ) ret = 0;
+ else {
/* remove the volume group directory */
sprintf ( buffer, LVM_DIR_PREFIX "%s%c", vg_name, 0);
ret = lvm_remove_recursive ( buffer);
- } else ret = -LVM_EPARAM;
+ }
#ifdef DEBUG
debug_leave ( "vg_remove_dir_and_group_and_nodes -- LEAVING with ret: %d\n",
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2000-12-07 17:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-12-06 9:43 [linux-lvm] WebMin LVM module development Michael Boman
2000-12-06 14:20 ` Heinz J. Mauelshagen
2000-12-06 18:49 ` [linux-lvm] " Luca Berra
2000-12-06 19:02 ` Steven Lembark
2000-12-07 17:21 ` [linux-lvm] lvm 0.9 + raid (Was: WebMin LVM module development) Luca Berra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox