OpenVZ Forum


Home » General » Support » Partition Question
Partition Question [message #42567] Fri, 29 April 2011 16:38 Go to next message
domz is currently offline  domz
Messages: 9
Registered: April 2011
Junior Member
I got a new Centos Server and I am not sure how to partition it; I also can only access Rescue mode to do it since it's from leaseweb com
I got 4 HDD's, right now only one shows up when:
# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2             884G  1.8G  836G   1% /
/dev/sda3             2.0G   36M  1.9G   2% /tmp
/dev/sda1              99M   18M   77M  19% /boot
tmpfs                 7.9G     0  7.9G   0% /dev/shm

my /fstab
LABEL=/                 /                       ext3    defaults        1 1
LABEL=/tmp              /tmp                    ext3    defaults        1 2
LABEL=/boot             /boot                   ext3    defaults        1 2
tmpfs                   /dev/shm                tmpfs   size=1024m        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
LABEL=SWAP-sda5         swap                    swap    defaults        0 0



What's the next step? How can I partition them to look like this:
Partition	 Description	 Typical size
/	 24 Gb
swap	 Paging partition for the Linux operating system	 2 times RAM
/vz	 Partition to host OpenVZ templates and Virtual Private Servers	 all the remaining space on the hard disk

Re: Partition Question [message #42642 is a reply to message #42567] Sun, 08 May 2011 17:41 Go to previous message
mustardman is currently offline  mustardman
Messages: 91
Registered: October 2009
Member
The SWSoft user guide has some minimum recommendations.

Better yet read the Virtuozzo install guide. It's similar but more up to date.

Basically you want.

/boot
100-200MB ext3

/
Anywhere from 8-16GB on ext3 or ext 3 on top of LVM partition

swap
twice the amount of ram on swap or swap on top of LVM partition

/vz
remainder of HD space on ext3 or ext3 on top of LVM partition.

Using LVM partition is optional but recommended. With LVM you can create templates/backups of containers without the container having to go offline (a huge benefit IMHO). Also LVM allows you to dynamically adjust the size of the partitions later on without losing your data.

I use LVM with Software RAID 1 partitioned as explained above according to the Virtuozzo guide on all my nodes. Here is a sample of how it would look in Disk Druid. Go back a couple pages to see the steps involved. Just substitute the sizing and partition names above.

If you don't use LVM then there is no need to have the separate /boot partition although it certainly can't hurt.

[Updated on: Sun, 08 May 2011 18:22]

Report message to a moderator

Previous Topic: Updates are Broken
Next Topic: Shutdown sequence
Goto Forum:
  


Current Time: Thu Aug 22 22:15:39 GMT 2024

Total time taken to generate the page: 0.02950 seconds