Developers Documentation

×

Warning

301 error for file:https://clearos.com/dokuwiki2/lib/exe/css.php?t=dokuwiki&tseed=82873f9c9a1f5784b951644363f20ef8

User Tools

Site Tools


Custom Partitioning Guide for ClearOS 6.x

ClearOS 6 may not configure your partitions automatically in a way that you want if you simply choose the default geometry when you initially install. This guide can help you manipulate the partitions during the initial install to reflect what we consider to be good practices for ClearOS. If you have completed the installation and are not happy with the way you've laid out the paritions, ClearOS uses LVM and you can still manipulate many aspects to optimize your use of storage.

Installation

Create Custom Layout

During the installation you will be presented with the ability to choose a custom partitioning scheme, select this option (Create Custom Layout).

Select: Create Custom Layout

Create Partitions

At the disk provisioning wizard, select Create.

https://clearos.com/dokuwiki2/lib/exe/fetch.php?w=550&tok=8b03a9&media=omedia:custom_partition_2.png

For single drive systems, select Standard Partition and choose Create. For multiple drive systems, you will choose RAID Partition because you will want your /boot partition spread across all devices.

https://clearos.com/dokuwiki2/lib/exe/fetch.php?w=550&tok=d05527&media=omedia:custom_partition_3.png

You will specify the following for the options:

  • Mount Point
    • /boot
  • File System Type
    • ext4
  • Size (MB)
    • 500
  • Additional Size Options
    • Fixed Size
  • Force to be a primary partition
    • Checked
  • Encrypt
    • Unchecked

Click OK.

https://clearos.com/dokuwiki2/lib/exe/fetch.php?w=550&tok=feca80&media=omedia:custom_partition_4.png

We will create the last two partitions as LVM Physical Volumes. Select Create, choose LVM Physical Volume and then click Create.

https://clearos.com/dokuwiki2/lib/exe/fetch.php?w=550&tok=d3d2c2&media=omedia:custom_partition_5.png

Make the first volume 51200 in size and click OK. (You can make it bigger but the OS aspects of ClearOS should not exceed 50 GB. If it does, you are doing it wrong.

https://clearos.com/dokuwiki2/lib/exe/fetch.php?w=550&tok=d8a6ab&media=omedia:custom_partition_6.png

Do the same for the next partition but set the size to 20480. Don't worry about the extra space right now. LVM is EASY to make bigger. It is harder to make partitions smaller though. At the end your partitions structure should look like this:

https://clearos.com/dokuwiki2/lib/exe/fetch.php?w=550&tok=e9d64d&media=omedia:custom_partition_7.png

LVM Volume Groups and Logical Volumes

All the rest of the partitions will reside under the LVM structure. We will set up the core OS on the first LVM partition and we will reserve entire last LVM partition for user data (Flexshares, home directories, websites, databases, mail directories, proxy cache and others)

Highlight the first LVM partition and select Create. Select LVM Volume Group and click Create.

https://clearos.com/dokuwiki2/lib/exe/fetch.php?w=550&tok=233be1&media=omedia:custom_partition_8.png

Call the volume group 'main' and select ONLY the first device (in this case sda2, the one that is 51200.00 MB in size.) Deselect any others. Click Add and we will make our first Logical Volume within this volume group called 'main'. Set the following options:

root
  • Mount Point
    • /
  • File System Type
    • ext4
  • Logical Volume Name
    • root
  • Size (MB)
    • 5120
  • Encrypt
    • Leave unchecked (unless you want to encrypt)

https://clearos.com/dokuwiki2/lib/exe/fetch.php?w=550&tok=dcde18&media=omedia:custom_partition_9.png

Click OK. Repeat the process by clicking Add until all the Logical Volumes for this Volume Group are added:

var
  • Mount Point
    • /var
  • File System Type
    • ext4
  • Logical Volume Name
    • var
  • Size (MB)
    • 20480
  • Encrypt
    • Leave unchecked (unless you want to encrypt)
logs
  • Mount Point
    • /var/log
  • File System Type
    • ext4
  • Logical Volume Name
    • logs
  • Size (MB)
    • 8192
  • Encrypt
    • Leave unchecked (unless you want to encrypt)
swap
  • Mount Point
    • (This will deselect once you choose the next option)
  • File System Type
    • swap
  • Logical Volume Name
    • swap
  • Size (MB)
    • 2048
  • Encrypt
    • Leave unchecked (unless you want to encrypt)

https://clearos.com/dokuwiki2/lib/exe/fetch.php?w=550&tok=a3a847&media=omedia:custom_partition_10.png

Once you are done adding all the Logical Volumes, your layout should look like this:

https://clearos.com/dokuwiki2/lib/exe/fetch.php?w=550&tok=00ebd0&media=omedia:custom_partition_11.png

Click OK. The overview should look like this:

https://clearos.com/dokuwiki2/lib/exe/fetch.php?w=550&tok=337eb2&media=omedia:custom_partition_12.png

Time to make the last Volume Group for the user data. Click Create then select LVM Volume Group and click Create.

https://clearos.com/dokuwiki2/lib/exe/fetch.php?w=550&tok=17942b&media=omedia:custom_partition_13.png

There should be only one Physical Volume left and it should be checked. Name the Volume Group 'data0' (data0 is the reserved name for the user data partition on ClearOS that is LOCAL to the machine). In the logical volume section Add a new Logical Volume with these options:

data0
  • Mount Point
    • /store/data0
  • File System Type
    • ext4
  • Logical Volume Name
    • data0
  • Size (MB)
    • 10240
  • Encrypt
    • Leave unchecked (unless you want to encrypt)

https://clearos.com/dokuwiki2/lib/exe/fetch.php?w=550&tok=3028d9&media=omedia:custom_partition_14.png

Your final layout should look like this:

https://clearos.com/dokuwiki2/lib/exe/fetch.php?w=550&tok=7c2c15&media=omedia:custom_partition_15.png

Click Next and you should get a warning about formating the drive and a prompt to “Write changes to disk”. Click Format and Write changes to disk:

https://clearos.com/dokuwiki2/lib/exe/fetch.php?w=550&tok=36f26e&media=omedia:custom_partition_16.png

https://clearos.com/dokuwiki2/lib/exe/fetch.php?w=550&tok=a10665&media=omedia:custom_partition_17.png

Finish off by installing the boot loader to /dev/sda. It should look like this:

https://clearos.com/dokuwiki2/lib/exe/fetch.php?w=550&tok=ce9cc9&media=omedia:custom_partition_18.png

Finishing up

From here the server will continue the install. As you add apps from the Marketplace, you will want to set the data partition to be the volume which contains the user data. This will prevent your OS disk from filling up. More importantly, if you need to reinstall you system, you can reformat all the drives EXCEPT the user data volume group. You'll thank me later.

content/en_us/kb_bestpractices_custom_partitioning_guide_for_clearos_6.x.txt · Last modified: 2015/03/01 14:26 (external edit)

https://clearos.com/dokuwiki2/lib/exe/indexer.php?id=content%3Aen_us%3Akb_bestpractices_custom_partitioning_guide_for_clearos_6.x&1710838444