<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 5.00.3103.1000" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002>Hi All,</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002>1) I'm using NBD and LVM . I have mounted the
remote device </SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002>using NBD(version 2.4.27). When I do pvcreate on
mounted disk,it is successful.</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002>#pvcreate /dev/nb0</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002>pvcreate -- physical volume "/dev/nb0" successfully
created</SPAN></FONT></DIV></SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002>But when we try out other commands such as pvdisplay,
vgcreate etc. it gives the</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002>following error. </SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002> #pvdisplay /dev/nb0<BR>pvdisplay -- ERROR
"pv_read(): pv_create_name_from_kdev_t" no VALID physical volume
"/d<BR>ev/nb0"</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002># ./vgcreate /dev/nb0<BR>vgcreate -- please enter
physical volume name(s)</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002>pvcreate uses the information
from /proc/partitions. </SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002>It works although the /proc/partitions is not
updated with the remote device information.</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002>However the other LVM commands like "vgcreate",
"pvdisplay" look for remote device</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002>information in /proc/partition and as the entry is not
there in dir_cache, it fails.</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002>To make it run, I have added a entry for nb0 in the
file lvm_dir_cache.c in _noprocdir.</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002>/* devices *not* showing up in /proc/partitions must be
scanned anyway */<BR>static char *_noprocdir[] =
{<BR> LVM_DIR_PREFIX
"loop",<BR> LVM_DIR_PREFIX
"nb0",<BR>
NULL<BR>};</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002>After doing,I am able to do pvcreate, vgcreate and
so.Is it right way to do this?</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002>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</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002> and just modify this following check by
replacing _cache_size with '1'.Still pvcreate fails.And it gives the following
error.</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002>if(!_cache_size)<BR>
_scan_devs(
TRUE);<BR>
else<BR>
_scan_devs( FALSE);<BR>
}</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002> </SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002># pvcreate /dev/nb0</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002>"/dev/nb0 has a partition table"</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002>3) Is there any patch available to make NBD working
with LVM?</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002></SPAN></FONT> </DIV>
<DIV> </DIV>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002>Regards,</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002>Ashish</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002></SPAN></FONT> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><FONT color=#0000ff face="Trebuchet MS" size=2><SPAN
class=482470510-19032002> </SPAN></FONT></DIV></BODY></HTML>