tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
HEADS UP NetBSD lvm support
Hi folks,
Today I have committed couple of changes to haad-dm branch. With these
latest changes I was able to use lvremove, lvextend, lvreduce etc..
I believe that haad-dm is currently in a good shape and it only needs
more testing to fix all possible outstanding bugs. for all brave testers
I have created new chapter in NetBSD Guide about lvm support [1].
Instructions how to test lvm:
1) update src/sys and src/external to haad-dm branch.
2) if you kernel supports new modules build new module in src/sys/
modules/dm or
build new kernel with this line pseudo-device dm line. Load
module/ reboot new kernel.
3) build lvm2tools and libdevmapper in src/external/gpl2/ and install
them.
4) use tools lvm to manage your lvm devices.
lvm pvcreate /dev/raw_disk_device # create Physical Volume *
lvm vgcreate vg00 /dev/raw_disk_device #create Volume Group-> pool
of available disk space.
lvm lvcreate -L20M -n lv1 vg00 # create Logical volume aka Logical
disk device
newfs -F -s 20M /dev/vg00/rlv1 # newfs without -F and -s doesn't
work
mount /dev/vg00/lv1 /mnt # Enjoy
After reboot you can activate all existing LV in system with
command.
lvm vgchange -a y
You can use
lvm lvdisplay vgdisplay pvdisplay to see at status of your LVM
devices.
You can also use lvm lvextend/lvreduce to change size of LV.
I haven't tested my driver on SMP system there are probably some
bugs in locking
so be aware of it :) and do not try to extend/reduce partition
during IO
(something bad can happend).
TODO:
1) review locking I will probably allow only one ioctl call to be
inside dm driver
at time.
2) Write snapshot driver only skeleton was written yet.
3) Add ioctls needed to correct newfs functionality. I tried to
implement them
in device-mapper.c::dmgetdisklabel but it doesn't work still.
4) Write lvm rc.d script to enable LVM before disk mount so we can
use lvm for
system partitions.
* If you are using disklabel partition a as raw_disk_device it MUST
start after disklabel
blocks. Offset of a partition should be 65s.
P.S. I will not be able to answer any bug mails till sunday.
[1]http://www.netbsd.org/~haad/lvm_doc.diff
Regards
Adam.
Home |
Main Index |
Thread Index |
Old Index