Proxmox Software Raid – My Way or The highway :D

Not: software raid 10 ustune proxmox ve 2.x kurmak istiyordum ne zamandir.
bir kac farkli tutoriali inceledikten sonra bu asagidaki tutorialda karar kildim.
Su anda durum iyi gozukuyor bakalim..
 
orjinal link: http://forum.proxmox.com/threads/9468-Is-possible-to-make-raid-software-in-Proxmox-VE-2-x

Proxmox Software Raid

This is how we installed Proxmox with RAID10 to our test lab.
Change the device filenames according to your hardware setup.

All systems have 4 disks.

– start the debian squeeze installer
– activate the console ALT+F2
– create partitions on /dev/sda, /dev/sdb, /dev/sdc and /dev/sdd

Code:
Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0003b8e5

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          61      489951   fd  Linux raid autodetect
/dev/sda2              62       38913   312078690   fd  Linux raid autodetect

– create /dev/md0 as RAID1 with 4 disks and a size of 100MB

Code:
mdadm --create /dev/md0 --level=1 --raid-devices=4 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1

– create /dev/md1 and /dev/md2 as RAID1 with 2 disks each and the remaining space

Code:
mdadm --create /dev/md1 --level=1 --raid-devices=2 /dev/sda2 /dev/sdb2
mdadm --create /dev/md2 --level=1 --raid-devices=2 /dev/sdc2 /dev/sdd2

– create the volumegroup pve and the logical volumes root, data and swap; don’t use the whole remaining diskspace for data. You need some Gigs for LVM snapshots.

Code:
pvcreate /dev/md1
pvcreate /dev/md2
vgcreate pve /dev/md1 /dev/md2
lvcreate -i 2 -L 16G -n swap pve
lvcreate -i 2 -L 100G -n root pve
lvcreate -i 2 -L 450G -n data pve

– create filesystems on it (we saw best performance with ext3)

Code:
mkfs.ext3 -E stride=32,stripe-width=64 /dev/pve/root
mkfs.ext3 -E stride=32,stripe-width=64 /dev/pve/data

– proceed with the installer, set the mountpoints:
RAID1 md0 -> /boot
LVM VG swap -> swap
LVM VG root -> /
LVM VG data -> /var/lib/vz

– after reboot install Proxmox as described here
http://pve.proxmox.com/wiki/Install_…Debian_Squeeze

After the Proxmox installation edit /usr/share/perl5/PVE/Storage.pm, /usr/share/perl5/PVE/VZDump/QemuServer.pm and /usr/share/perl5/PVE/VZDump/OpenVZ.pm and add the options “–stripes 2” to every “lvcreate” command.
You have to to this last step every time you update Proxmox.

notlarim:

1- bu %100 software raid 10 degil

yaptigimiz 4 diskde md0 da raid 1 boot

md1 ve md2 de de 2 ayri disk ile 2 ayri  raid 1 yapip

lvm ile riad 10 yapmak

degisik bi kafa

ben olsaydim boyle yapmazdim

ama bu amca guzel yapmis

2- debian kurulduktan sonra sabit ip ayarlamak gerek

nano /etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#allow-hotplug eth0
#iface eth0 inet dhcp
auto eth0
iface eth0 inet static
        address 192.168.0.100
        netmask 255.255.255.0
        network 192.168.0.0
        broadcast 192.168.0.255
        gateway 192.168.0.1

ornegin

3- standart debian /etc/hosts dosyasi nanik yapiyor kurulumda onuda su sekilde degistirmeli
127.0.0.1       localhost
192.168.0.100    vm4.shukko.com        vm4
4- son bir sey daha vardi yazicaktim
unuttum
neyse salla gitsin 🙂