[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[linux-lvm] Does LVM work with NBD?



Hi All,
 
1) I'm using NBD and LVM . I have mounted the remote device
using NBD(version 2.4.27). When I do pvcreate on mounted disk,it is successful.
 
#pvcreate /dev/nb0
pvcreate -- physical volume "/dev/nb0" successfully created
 
But when we try out other commands such as pvdisplay, vgcreate etc. it gives the
following error.
 
 #pvdisplay /dev/nb0
pvdisplay -- ERROR "pv_read(): pv_create_name_from_kdev_t" no VALID physical volume "/d
ev/nb0"
 
# ./vgcreate /dev/nb0
vgcreate -- please enter physical volume name(s)
 
pvcreate uses the information from /proc/partitions.
It  works although the /proc/partitions is not updated with the remote device information.
However the other LVM commands like "vgcreate", "pvdisplay" look for remote device
information in /proc/partition and as the entry is not there in dir_cache, it fails.
 
To make it run, I have added a entry for nb0 in the file lvm_dir_cache.c in _noprocdir.
/* devices *not* showing up in /proc/partitions must be scanned anyway */
static char *_noprocdir[] = {
        LVM_DIR_PREFIX "loop",
        LVM_DIR_PREFIX "nb0",
        NULL
};
 
After doing,I am able to do pvcreate, vgcreate and so.Is it right way to do this?
 
2)As per some mail in lvm-linux archieve, if I make an entry for nbd device in _devdir[] in file lvm_dir_cache.c
 and just modify this following check by replacing _cache_size with '1'.Still pvcreate fails.And it gives the following error.
 
if(!_cache_size)
                        _scan_devs( TRUE);
                else
                        _scan_devs( FALSE);
        }
 
 
# pvcreate /dev/nb0
"/dev/nb0 has a partition table"
 
 
3) Is there any patch available to make NBD working with LVM?
 
 
 
Regards,
Ashish
 
 
 
 
 
 
 
 
 
 

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]