1.7 Disk partitioning

Default partioning scheme

You can reinstall Calculate Linux without any parameters if your hard disk is partitioned like this:

/dev/sda1 swap
/dev/sda2 10-20Gb Linux (/)
/dev/sda3 10-20Gb Linux (/)
/dev/sda4 Extended
/dev/sda5 Linux (/home)
... (other disks and partitions)

If the system is booted from the sda2 partition the installer will offer ''sda3'' and vice versa. The installer stores the number of the partition which was used for installation and suggests to update in the other partition.

In the desktop version of the system, the swap partition doesn't need to exist if you have 2 Gb or more of RAM. In this case, the kernel will not use the swap partition on the hard disk, thus freeing some space.

  • protected data - user data being located on a separate partition, it will be preserved when reinstalling the system;
  • free space - you'll always have free space on the disk, since running out of space on a reserved partition, such as /boot, is very unlikely;
  • easier system updates - you can update your system while it's up-and-running;
  • reliability - you can always go back to the previous system if the new one is buggy.

Settings

If you need to mount additional partitions to the system, you should edit /etc/fstab.

To mount a new partition to /home you have to add something like this:

/dev/sda5   /home   ext4   noatime   0 0

In the example the sda5 partition with ext4 as the filesystem is mounted to the /home directory.

To activate the partition, run:

mount /home

It will be automatically mounted after reboot.

When you reinstall the system the installer will move mount points from /etc/fstab to the corresponding file within the new system.

Server partitioning

For Calculate Directory Server, we suggest the following scheme:

/dev/sda1 swap
/dev/sda2 20Gb Linux (/, ext4)
/dev/sda3 20Gb Linux (/, ext4)
/dev/sda4 Extended
/dev/sda5 Linux (/var/calculate, xfs)

The size of the swap disk has to be determined individually according to the amount of RAM and expected load. The general advice is to use twice the amount of RAM.

If needed, you can expand the volume of the root partition by adding new disks to the corresponding directory:

/dev/sdb1 Linux (/var/calculate/server-data, xfs)
/dev/sdc1 Linux (/var/calculate/server-data/samba/share, xfs)

Different file systems all have their advantages and disadvantages. Based on our experience we can say that ext4 is good choice for the root partition and xfs is ideal to store files and data, thanks to active utilization of the cache.

Desktop partitioning

To configure Calculate Linux Desktop as a client of CDS server we recommend the following hard disk partitioning:

/dev/sda1 swap
/dev/sda2 10Gb Linux (/, ext4)
/dev/sda3 10Gb Linux (/, ext4)
/dev/sda4 Extended
/dev/sda5 Linux (/var/calculate, ext4)

Note that the free partition is mounted at /var/calculate. The domain settings are therefore saved at a separate partition, thus simplifying system reinstall.

Your data in /home will not be lost when the system is reinstalled, since after joining the CDS domain directory /home is located in /var/calculate/home (mounted with the bind option). It may be wise to save the data only for caching.

System reinstall

Whatever your disk partitioning, it is better to keep archives with updates on a separate partition, for example in /home/calculate (if /home is located on a separate partition).

You can mount this disk by appending the following line to /etc/fstab:

/home/calculate /usr/calculate/share none bind 0 0

Thank you!