LVM with loopback
Can someone please give me, or point me to some help using LVM with loopback filesystems. I would like to test it out some before I use it on my systems, and I haven't been able to get it to work right. Thanks!
Mark
Mark,
This is the patch I use to get LVM working with the loopback like device in user mode linux. It's possible you just need the last hunk. Please don't use this on a production system.
- Joe
tools/lib/lvm_check_dev.c +1 -0
@@ -121,6 +121,7 @@#ifdef DASD_MAJOR DASD_MAJOR , #endif +98 ,/* UBD device for user mode linux */ -1 };
tools/lib/lvm_dir_cache.c +4 -2
@@ -63,6 +63,7 @@char blocks[20 ] = {0 , };char devname[30 ] = {0 , };static char *devdir[] = { +"/dev/ubd" ,"/dev/ida" ,"/dev/ide/hd" ,"/dev/loop" ,
@@ -83,7 +84,7 @@ ret = -LVM_EPARAM ; goto lvm_dir_cache_end; } - +#if 0 if ( ( proc =fopen ("/proc/partitions" ,"r" )) !=NULL ) {while ( !feof ( proc)) {fgets ( line,511 , proc);
@@ -96,7 +97,8 @@ }fclose ( proc); } -if ( cache_size ==0 &&lvm_check_devfs () == FALSE) { +#endif +if ( cache_size ==0 ) {/* && lvm_check_devfs() == FALSE) {*/ for ( d =0 ; devdir[d] !=NULL ; d++) { dirname = devdir[d];#ifdef DEBUG
tools/lib/pv_get_size.c +1 -1
@@ -48,7 +48,7 @@#include <liblvm.h> -#ifndef __alpha__ +#if 0 int pv_get_size (char *dev_name,struct partition *part_ptr) {int i =0 ;int dir_cache_count =0 ;
Quoted 3 lines · Mark D. Leistner
Can someone please give me, or point me to some help using LVM with loopback filesystems. I would like to test it out some before I use it on my systems, and I haven't been able to get it to work right. Thanks!
Mark