OpenVZ Forum


Home » General » Support » Installing CTs in their own LVM device
Installing CTs in their own LVM device [message #48871] Mon, 24 December 2012 00:08 Go to next message
syncmaster4 is currently offline  syncmaster4
Messages: 14
Registered: March 2007
Junior Member
So sorry for this question, I know I'm missing something really simple but I'm not an LVM expert. My google-fu is not working for this issue!

How do you create a CT on it's own lvm device? I've been running openvz for years but I've always used the default file system setup, not lvm devices. I'd appreciate any guidance from some of you experts out there.

Here's what I've tried unsuccessfully.

lvcreate -L20G -n 101 vol_data
mkfs.ext4 /dev/vol_data/101
mkdir /vz/private/101
mount /dev/vol_data/101 /vz/private/101

The device is successfully created

[root@dhn4 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/md1 12G 1.3G 10G 12% /
tmpfs 1.9G 0 1.9G 0% /dev/shm
/dev/md0 194M 64M 121M 35% /boot
/dev/mapper/vol_data-101
20G 172M 19G 1% /vz/private/101

When trying to create a CT I get the following error.

[root@dhn4 ~]# vzctl create 101
Private area already exists in /vz/private/101
Creation of container private area failed

Thanks for any insight you can provide!
-- Syncmaster4
Re: Installing CTs in their own LVM device [message #48875 is a reply to message #48871] Tue, 25 December 2012 23:38 Go to previous message
syncmaster4 is currently offline  syncmaster4
Messages: 14
Registered: March 2007
Junior Member
Unfortunately I'm still struggling with this. I did find the following information at http://www.iiitmk.ac.in/wiki/index.php/Systems/How_to_setup_ a_server_with_RAID,LVM_and_Virtualization/OPENVZ_Virtualizat ion/Issues_Faced_and_Implemented_Solution.

It's still not working but from what I understand in this article they create a separate LV for "root" and "private", to me it makes sense to have one LV for each CT that will contain both "root" and "private", but I still haven't figured out how to make this work with LVM.

Any pointers or suggestions are appreciated!
-- Syncmaster4
Previous Topic: yum kernel/vkernel conflict
Next Topic: Openvz 64bit host with guest running 32bit memory limits
Goto Forum:
  


Current Time: Mon Aug 05 08:18:08 GMT 2024

Total time taken to generate the page: 0.03046 seconds