<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi<BR>I didnt receive the email below, so I've copied and pasted it from the archive , sory .<BR> <BR>Thanks for the reply ..<BR>I have a few followup quesions:<BR>1) If I use a special signature to identify disks, like in mdraid, why must I have a user space tool to discover disks?<BR>If I want all volumes up and ready during a reboot, I prefer that the module do it when it loads.<BR>A user space program will start too late in the boot process.<BR>2)Can you point me to some guide on how to export stuff in proc ?<BR> <BR>Thanks<BR>-gili<BR> <BR> On Sun, Jun 28, 2015 at 8:21 AM, Gili B <span dir="ltr"><<a href="mailto:gilib123%20hotmail%20com" target="_blank" rel="nofollow">gilib123 hotmail com</a>></span> wrote:<br><BR><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;"><div><div dir="ltr">hi<br>We are starting working on a new device mapper module which has targets similar<br>to the ones in thin module (pool and thin),  but it adds some additional features.<br>The user should be able to create and use file systems on the thin volumes.<br>I wanted to know what is the recommended  way to make the configuration with dmsetup<br>persistent ?<br></div></div></blockquote><div><br><div class="gmail_default" style="font-family: arial,helvetica,sans-serif; font-size: small; display: inline;">​You should probably use mdraid as an inspiration.  Put a signature block on every member device.  You can then write a user-space tool to scan devices and find the collections.  Be sure to use a good "signature" for your type of device, plus a good UUID signature so that different generations can be identified.<br>​</div> </div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;"><div><div dir="ltr">We want that all file systems will be available after reboot.<br></div></div></blockquote><div><br><div class="gmail_default" style="font-family: arial,helvetica,sans-serif; font-size: small; display: inline;">​If you get the device running early enough, then fstab should be able to mount file systems.<br>​</div> </div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;"><div><div dir="ltr">Should we write our own configuration tool?  should we add special configuration files?<br></div></div></blockquote><div><br><div class="gmail_default" style="font-family: arial,helvetica,sans-serif; font-size: small; display: inline;">​You will probably need a user-space tool.  You can probably get away with no configuration file, but you should again use mdraid as inspiration so that your user-space tool gets limits of where to look for member pieces.<br>​</div> </div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;"><div><div dir="ltr">Should the kernel module we write , automatically discover all the configration and initialize accordingly?<br> <br> <br>Regarding debug - Is there a generic way to run dmsetup for example that<br>prints some inside details on the targets? (for example number of outstanding ios, memory used etc)<br></div></div></blockquote><div><br><div class="gmail_default" style="font-family: arial,helvetica,sans-serif; font-size: small; display: inline;">​You can do this three ways.  1)  build in IOCTL into your module that can query stuff.  2) export stuff in /sys.  3) export stuff in /proc.  I personally like exporting debug stuff into /proc.  Remember that printk is your friend.  I have even created "command" file in proc that then dump debug information with printk.  If you use /proc, you need to handle multiple instances of your mapper.  I use /proc/{my_project_name}/{instance_name}/...<br></div></div><div><div class="gmail_default" style="font-family: arial,helvetica,sans-serif; font-size: small; display: inline;"> </div></div><div><div class="gmail_default" style="font-family: arial,helvetica,sans-serif; font-size: small; display: inline;"> </div></div>                                          </div></body>
</html>