tux3 setup introduction

OGAWA Hirofumi hirofumi at mail.parknet.co.jp
Sat Jul 7 05:32:04 PDT 2012


Hi all,

Here is current state of tux3 of kernel porting, and tux3 setup by using KVM.

Now, we can mount the tux3, and can commit the snapshot of dirty cache
into storage atomicity. There are so many unimplemented POSIX features
and planing features though.

So, starting to test tux3 driver, this is example setup sequence.

Latest tux3 source can get from git://github.com/OGAWAHirofumi/tux3.git.
And latest kernel porting is in "temp-atomic-commit" branch.

So, you can get the source by,

$ git clone git://github.com/OGAWAHirofumi/tux3.git
$ cd tux3
$ git checkout temp-atomic-commit
$ cd user
$ make

[Kernel setup]
1) Get 3.4.4 linux kernel
ftp://ftp.kernel.org/pub/linux/kernel/v3.x/linux-3.4.4.tar.xz

2) Patch kernel
$ cd linux
$ patch -p1 < ../tux3-kernel.patch

To compile tux3, for now, you have to modify kernel like the attached patch.

3) Add symlink to tux3
$ cd linux/fs
$ ln -s ../../tux3/usr/kernel tux3

This means, create the symlink to tux3/user/kernel as linux/fs/tux3.

3) Compile kernel
You will need enable CONFIG_TUX3. I attached the example of .config.


[KVM setup]
1) Get distribution installer
Here is debian installer from http://www.debian.org/devel/debian-installer/

E.g. wget http://cdimage.debian.org/cdimage/wheezy_di_alpha1/amd64/iso-cd/debian-wheezy-DI-a1-amd64-netinst.iso

2) Create the disk image
$ qemu-img create -f qcow2 hdd.img 4G

kvm has the command to create the disk image. This example creates 4GB
disk image with qcow2 format. (qcow2 is supporting snapshot and copy-on-write)

3) Install distribution
$ kvm -boot d -cdrom debian-wheezy-DI-a1-amd64-netinst.iso -hda hdd.img

Use dhcp to get IP in guest OS. By default (-net user) configuration,
it provides dhcp server and firewall like NAT server by parsing packet
and redirect to socket in userland.  So, you can just use dhcp on
installation process, and you don't need additional network
configuration on host side.

4) Create the disk image for tux3
$ qemu-img create -f raw tux3.img 4G
$ ../tux3/usr/tux3 mkfs -b 512 tux3.img

This creates tux3 disk image with raw format. The raw format is simply
regular file, so it would be easy to use/debug from host side.

5) Boot tux3 kernel
$ kvm -kernel linux/arch/x86/boot/bzImage -append "root=/dev/sda1 ro" -hda hdd.img -hdb tux3.img

kvm can boot "bzImage" directly by "-kernel", and can pass boot
parameter by "-append". 

Now you should be able to mount tux3 on kvm.

$ mount -t tux3 /dev/sdb /mnt


Enjoy. :)
-- 
OGAWA Hirofumi <hirofumi at mail.parknet.co.jp>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config
Type: application/octet-stream
Size: 54840 bytes
Desc: not available
URL: <http://phunq.net/pipermail/tux3/attachments/20120707/5ddf5611/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tux3-kernel.patch
Type: text/x-diff
Size: 1472 bytes
Desc: not available
URL: <http://phunq.net/pipermail/tux3/attachments/20120707/5ddf5611/attachment-0002.patch>


More information about the Tux3 mailing list