3.8 Setting Up Disk Partitions

In most cases, YaST proposes a reasonable partitioning scheme that can be accepted without change. You can also use YaST to customize the partitioning.

OES 24.4 supports both btrfs and xfs file systems by default.

Volume / or root with btrfs file system.

Volume /var/opt/novell/eDirectory with xfs file system.

By selecting Expert Partitioner, customers can use any file system or partitioning scheme they like. The important thing is to create a separate volume for /var/opt/novell/eDirectory with the xfs file system with a minimum hard disk space of 1GB.

3.8.1 Guidelines

Table 3-1 presents guidelines for setting up disk partitions on your OES server. For more information, see Installation Settings in the SLES 15 SP4 Deployment Guide.

Table 3-1 Partition Guidelines

Partition to Create

Other Considerations

/boot

Depending on the hardware, it might be useful to create a boot partition (/boot) to hold the boot mechanism and the Linux kernel.

You should create this partition at the start of the disk and make it at least 8 MB or 1 cylinder. As a rule of thumb, always create such a partition if it was included in the YaST original proposal. If you are unsure about this, create a boot partition to be on the safe side.

swap

This should normally be twice the size of the RAM installed on your server. If you create a /boot partition, create the swap partition second. Otherwise, create the swap partition first.

/

Define this partition as 3 GB or more. In all cases, create this partition after you create the swap partition. Keep in mind that this root (/) partition contains all of the partitions listed below that you don’t specifically create.

/var

This contains system logs and should therefore be a separate partition to avoid impacting system and service stability because of a disk-full condition.

Define this partition as 4 GB or more.

/opt

Some (mostly commercial) programs install their data in /opt.

Define this partition as 4 GB or more.

/usr

Creating this as a separate partition makes updating the server easier if you need to reinstall the system from the beginning because you can keep the partition intact.

Define this partition as 4 GB or more.

/srv

This contains the web and FTP servers.

Consider making this a separate partition to avoid having someone flood the disk by accident or on purpose, which impacts system and service stability.

/home

User Home directories go here.

Consider making this a separate partition to avoid having someone flood the disk by accident or on purpose, which impacts system and service stability.

You can allocate the rest of the disk space to this partition.

/tmp

Creating this as a separate partition is optional. However, because it is writable by everyone, best practices suggest creating a separate partition to avoid having someone flood the disk by accident or on purpose, which impacts system and service stability.

 

Place application-specific files on a separate partition.

 

If you are building a mail server, note where the mail spools reside because they can grow quite large, and you need to anticipate this when you are defining partition sizes.

3.8.2 NSS on the System Disk

For OES, Novell Storage Services (NSS) volumes can be used only as data volumes, not as system volumes.

Additionally, they cannot be created as part of the install process.

However, you must consider whether you will be creating them in the future on the storage device where you are installing Linux. (Creating NSS volumes on storage devices that don’t contain Linux system partitions requires no special handling.)

The default volume manager for Linux POSIX volumes on SUSE Linux is LVM (Linux Volume Manager).

3.8.3 Security Flag Recommendations

The following table indicates the recommended security flags for each partition. A question mark indicates that some software might not work if this flag is set.

Mount Point

Mount Options

/

 

/var

nosuid

/tmp

nosuid

/home

nosuid, nodev, noexec?

/srv

nosuid?, nodev?, noexec?, ro? (after installation)

/usr/local

nosuid?, nodev?, ro? (after installation)

IMPORTANT:Proprietary software installations might fail if executables in /tmp cannot run as the file owner (suid), and devices might not work in /usr/local, etc. In such cases, remount those partitions temporarily with security deactivated.

3.8.4 Partitioning X86 Machines

  • There can be a maximum of four primary partitions or three primary partitions and one extended partition. An extended partition can hold 15 (SCSI) or 63 (IDE) logical partitions.

  • Each partition is assigned a partition type, depending on the file system planned for the partition.

  • Each partition holds its own file system.

  • Partitions are mounted into the file system tree at mount points. The content of the partition is visible to users with sufficient access privileges below the mount point.

  • One of the partitions must hold the root (/) file system. Other partitions can be integrated into the root file system by using the mount command.

  • The /etc/fstab file holds partition and mount point information to allow automatic mounting at boot time.

  • Device files in the device (/dev) partition are used to represent and address partitions; for example:

    /dev/hda

    Master disk on the first IDE channel

    /dev/hda1

    First primary partition on the IDE channel disk

    /dev/hda5

    First logical partition within the extended partition on that disk

    /dev/sdb

    Second SCSI disk

    /dev/sdb3

    Third primary partition on the second SCSI disk

3.8.5 Disk Partition Statistics

Use the following commands to get information about system storage usage:

df

Displays information about partitions

df -h

Displays information in megabytes or gigabytes as applicable (human readable format)

du

Displays disk usage

du /dirA

Displays the size of each file and directory in dirA

du -sh

Prints a summary of information in megabytes or gigabytes

3.8.6 Combining Hard Disk Partitions

  • Partitions from two or more hard disks can be combined by using the logical volume manager (LVM).

  • Partitions (physical volumes) can be combined into a volume group, which in turn can be divided into logical volumes that contain their own file systems.

Doing this increases flexibility because physical volumes can be easily added to the volume group if more storage space is needed. Logical volumes can be added while the machine is up and running.