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/.

Friday, May 9, 2008

Device-mapper driver

I want to explain in what state my driver is currently how to test etc.. 

Actually I have implemented 3 simple targets[1] inside NetBSD device-mapper. I can 
create virtual block device based on linear target(in linux LVM it is Logical volume).  
I can create file-system on it and mount it. 

For now I have to use this command to create file-system on my dm device

newfs -F -s {size} /dev/mapper/{char  device}

DIOWEDGEINFO and DIOCGDINFO ioctls are not implemented now and therefore 
newfs can find size of virtual block device. These ioctls are next on my task list.

Other more sophisticated targets like stripe, mirror, snapshot are not implemented but with help of reinoud@ I have added support for them in to C structures.  Structure layout can be found at [2].

Yesterday I have tried lvm2tools with my current driver and they mostly refuse work on NetBSD.  I will look at this next I want to finish this before coding period for SOC project starts. Because in summer I will have no time to work on device-mapper backend I will be busy with rewriting of interface to functional state.

[1]http://people.redhat.com/agk/talks/FOSDEM_2005/
[2]http://147.175.97.81:8080/dm/revision/file/8a70e9e68ab656befa48f3f58b08a6c65f9a2f9e/dm.h

Thursday, May 8, 2008

Monotone VSC

Monotone is distributed VCS with many interesting features. I use it for my projects daily.

Currently I use Monotone VCS to manage my projects. I have created monotone database where I keep my soc-project sources/history. This database is available at 
mtn://147.175.97.81. If you don't have monotone installed but you want to see my 
sources/history I have installed viewmtn for this purpose. viewmtn is available at 
http://147.175.97.81:8080. 

Because I use Monotone to manage my sources and not CVS I had to find way how 
to push sources from monotone directly to sf netbsd-soc CVS repository. Solution for 
this is net.venge.monotone.cvssync branch in monotone repository.  With monotone from this branch I can push, sync, takeover CVS repository. 

Friday, May 2, 2008

Welcome here!

This is my first post on my blog. I will use this blog to show my progress on my SOC project.