<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jun 28, 2015 at 8:21 AM, Gili B <span dir="ltr"><<a href="mailto:gilib123@hotmail.com" target="_blank">gilib123@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div dir="ltr"> <br> <br>Thanks<span class="HOEnZb"><font color="#888888"><br>-gili<br>                                         </font></span></div></div>
<br>--<br>
dm-devel mailing list<br>
<a href="mailto:dm-devel@redhat.com">dm-devel@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/dm-devel" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/dm-devel</a><br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Doug Dumitru<br>EasyCo LLC<br></div>
</div></div>