[linux-lvm] RAID, LVM and dm_crypt, please confirm setup

Sisko cisco66 at gmx.de
Sun Nov 21 12:19:27 UTC 2004


Hello group !

I would really appreciate it, if someone with more knowledge than me could 
confirm, if my setup is ok.

I have (at home) the following setup for my data discs:

2x 40  GB RAID1 --> /dev/md0
2x 80  GB RAID1 --> /dev/md1
2x160 GB RAID1 --> /dev/md2

These are part of volume group vg00, consisting of 9 logical volumes 
lv00...lv09

Now i set up crypt devices with cryptsetup and named these crypt devices 
clv00...clv09.

So my directory /dev/mapper looks like:
brw-r-----   1 root root 253, 10 2004-11-18 22:54 clv00
brw-r-----   1 root root 253, 11 2004-11-18 22:54 clv01
brw-r-----   1 root root 253, 12 2004-11-18 22:54 clv02
brw-r-----   1 root root 253, 13 2004-11-18 22:54 clv03
brw-r-----   1 root root 253, 14 2004-11-18 22:54 clv04
brw-r-----   1 root root 253, 15 2004-11-18 22:54 clv05
brw-r-----   1 root root 253, 16 2004-11-18 22:54 clv06
brw-r-----   1 root root 253, 17 2004-11-18 22:54 clv07
brw-r-----   1 root root 253, 18 2004-11-18 22:54 clv08
brw-r-----   1 root root 253, 19 2004-11-18 22:54 clv09
crw-------   1 root root  10, 63 2004-06-24 17:42 control
brw-r-----   1 root root 253, 20 2004-11-18 22:54 swap0
brw-r-----   1 root root 253, 21 2004-11-18 22:54 swap1
brw-------   1 root root 253,  0 2004-11-18 22:53 vg00-lv00
brw-------   1 root root 253,  1 2004-11-18 22:53 vg00-lv01
brw-------   1 root root 253,  2 2004-11-18 22:53 vg00-lv02
brw-------   1 root root 253,  3 2004-11-18 22:53 vg00-lv03
brw-------   1 root root 253,  4 2004-11-18 22:53 vg00-lv04
brw-------   1 root root 253,  5 2004-11-18 22:53 vg00-lv05
brw-------   1 root root 253,  6 2004-11-18 22:53 vg00-lv06
brw-------   1 root root 253,  7 2004-11-18 22:53 vg00-lv07
brw-------   1 root root 253,  8 2004-11-18 22:53 vg00-lv08
brw-------   1 root root 253,  9 2004-11-18 22:53 vg00-lv09

These crypt devices are mounted and presented via Samba.
In fact, everything is working fine and out of the box.

The "problem" is:

When i try to extend one logical volume, i have to do it this way:

1) unmount the device on server and client side
2) stop samba
3)  lvextend -L+5G /dev/vg00/lv00    # not clv00 !
4) e2fsck resize2fs /dev/mapper/clv00-f /dev/mapper/clv00         # now the 
crypto device !
5) resize2fs /dev/mapper/clv00 # again the crypto device
6) mount 
7) finish

What i'm a bit afraid of is the fact that i once have to touch the crypto 
device and once the "normal" logical volume. It is working and i have now 
problems, but is this really the right way and supported ?

I could imagine that other people find this configuration interesting too, so 
maybe this could be an item for the LVM-HOWTO (ie under item 13, recipes) or 
so.

Thanks in advance !

Kernel 2.6.9 vanilla
~# lvm version
  LVM version:     2.00.24 (2004-09-16)
  Library version: 1.00.17-ioctl (2004-04-19)
  Driver version:  4.1.0
~# dmsetup --version
Library version:   1.00.17-ioctl (2004-04-19)
Driver version:    4.1.0




More information about the linux-lvm mailing list