Set up DRBD Shrinking the default /dev/mapper/pve-data partition

  • Thread starter Thread starter gcrisaenz
  • Start date Start date
G

gcrisaenz

Guest
Hello i'm new with proxmox im triying to implement 2 servers with identical hardware with proxmox ve 1.5 and DRBD but i only have 1 Harddisk. i see your guides to do this but with secondary disk http://pve.proxmox.com/wiki/DRBD and the other option to do with lenny making custom partitions and use only one disk: http://pve.proxmox.com/wiki/Install_Proxmox_VE_on_Debian_Lenny, but unfortunally without support of proxmox team, is not posible get one alternative saying the comands to umount the /dev/mapper/pve-data shrinking and get a new partition for DRBD step by step?, i'll appreciate your answer.
 
I have done this by using this guide.

http://fedora64.org/Members/zcat/shrink-lvm-for-new-partition

Although written for Fedora, it is the same for Debian. You don't need to boot into rescue mode, but you must not have any VM's running. I highly suggest that you do this only on new installations or have complete backups, because shrinking is a very dangerous operation and very often leads to loss of data if not done properly.
 
Thanks for link i will use that, do you know how to use the complete /dev/mapper/pve-data with DRBD?, i read some but nobody explain how to do in new installation of proxmox ve (again only one disk in each server). my installation is new then i dont lose any information. thanks for your help guys.
 
Thanks for link i will use that, do you know how to use the complete /dev/mapper/pve-data with DRBD?, i read some but nobody explain how to do in new installation of proxmox ve (again only one disk in each server). my installation is new then i dont lose any information. thanks for your help guys.

You don't use /dev/mapper/pve-data with DRBD. You shrink the partition, containing that volume in order to free space for another partition. Here is my situation now:

Code:
proxmox1:~# fdisk -l /dev/sda
Disk /dev/sda: 1999.3 GB, 1999307276288 bytes
255 heads, 63 sectors/track, 243068 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000252d1
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          66      524288   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              66       40685   326275072+  8e  Linux LVM
/dev/sda3           40685      134056   750005427+  8e  Linux LVM
/dev/sda4          134057      243068   875638890   8e  Linux LVM

After completion of proxmox install I shrinked /dev/sda2 and created /dev/sda3 and /dev/sda4 which I use with DRBD. Be careful with shrinking /dev/sda2 and leave enough space as it contains the data, root and swap volumes of proxmox. Also OpenVZ cannot reside on DRBD.