Monday, May 26, 2008

LVM2tools and libdevmapper update

After two of my university exams I spent this weekend with porting lvm2tools and libdevmapper to NetBSD. If you ask "Why you said that they already work before", 
I have to say that they worked with to many hacks and workarounds such as:

dependency on mounted procfs with -o linux option.

I have rewritten some lvm2tools/lib/filter/filter.c file to use NetBSD sysctl kern.drivers 
knob instead of linux /proc/devices file. I have to say that get data with sysctl is much more easier than parsing text files from procfs .

With all these changes in lvm2tools I can now use pv* and vg* commands to manipulate volume groups, physical volumes. There are some issues with lv* 
commands. Problem is located somewhere in libdevmapper I have to 
investigate this further.

In my local branch I have also propagated changes in versiom  2.02.34-cvs (2008-01-31) of lvm2tools to my org.netbsd.haad.dm.lvm2 branch. I have to fix some conflicts 
and I will push this update to public repo.

In libdevmapper I have changed lib/ioctl/libdm_iface.c: get_proc_major to use sysctl again and not to use procfs. 

All changes can be seen here http://147.175.97.81:8080/dm/.

No comments: