About Linux Partitions and Volumes
Page Tags: linux partition, linux volumes, installing linux partition, linux format, linux format partition, linux partitions, linux volume, Linux Software Tutorial
LINUX PARTITIONS AND VOLUMES
Prior to installing Linux, you should carefully plan you partition strategy. If you are not careful, you might finish off the installation with a single partition that holds all system and user files. A more efficient strategy is to create multiple partitions based on the types of files held on the partition and the user access needs to the data. In addition to planning which partitions you need and which files they will contain, you should also consider the mount options for each volume.
Following are some guidelines to follow to create an efficient partition scheme:
• For multi-boot systems, create a boot partition. Normally, this will hold the files necessary to boot the system. When using LILO, you must put this partition in the first 1024 blocks on the disk. It is recommended that the boot partition be a primary partition.
• Keep the root partition as small as possible. Include only those directories that are needed during boot. Necessary directories include:
o / (the root directory)
o /bin
o /boot (if not included as its own partition)
o /dev
o /etc
o /initrd
o /lib
o /proc
o /root
o /sbin
o /sys
• The partition holding the root directory should be on a primary partition and must be formatted with a Linux filesystem.
• Linux can use either a swap file or a swap partition for the swap area. Whenever possible, create a separate swap partition. The recommended size of the swap partition is twice the amount of RAM, up to a maximum of 2 GB on PC computers. To improve performance, you can even put multiple swap areas on multiple disks.
• Consider creating separate partitions for the following directories. Set mount options based on the type of files in the directory.
o /tmp mount noexec,nosuid
o /var mount noexec,nosuid
o /usr mount ro
o /home mount nosuid
• Create additional partitions for other operating systems. If your computer already has an operating system (such as Windows) that takes up most of the available drive space, use the FIPS utility to split the existing partition and make room for new partitions (FIPS only resizes existing partitions by splitting them). Use a third party utility to resize partitions. Do not use fdisk, as this will destroy existing data.
• Select the appropriate filesystem for each partition to support the operating system or provide necessary features.