Create Physical Disk Partitions

Cockpit administrators can use the Storage page to partition storage regions of a new or an existing physical disk device (for example, hard drive, solid state drive, RAID device, a disk device that's part of an existing volume group, and so on).

Creating a disk partition involves:
  1. Creating a new partition table – The Initialize Drive dialog in Cockpit defines the partitioning format and erases all existing data on the drive. The newly created partition table tracks the size and location of each partition on the drive.
  2. Creating a new partition - The Create New Partition dialog in Cockpit enables you to define the partition size, file system type, and properties for mounting and encrypting a partition. Free space must be available on the drive to perform this operation.

What Do You Need?

Steps

Using the Cockpit web console, follow these steps to create disk partitions on a host disk device.

  1. In Cockpit navigation pane, click Storage.

    The Storage page appears.

  2. In the Storage page, perform one of the following:
    • To partition a new disk device, select the device from the Devices table. The Storage [device name] page appears. Proceed to Step 3.
    • To repartition an existing disk, select the device from the Drives table. The Storage [device name] page appears. Proceed to Step 3.
    • To add a new partition to disk device and using existing partition table, select the device from the Drives table. The Storage [device name] page appears. Proceed to Step 4.
  3. In the Storage [device name] page, perform the following:
    1. Click Create New Partition Table and specify the following properties:
      Partitioning In the Partitioning drop-down list box, select the appropriate partitioning format for creating and organizing disk partitions.
      Overwrite Select or clear the Overwrite checkbox. When selected, the deleted data is overwritten with zeros, making the deleted data unrecoverable.
    2. Review the change summary.
    3. Click Initialize to prepare the disk device with a new partitioning format. All data is removed on the disk device at this time.
    4. Upon completing the disk initialization, proceed to Step 4 to create partition.
  4. In the Storage [device name] page, perform the following:
    1. Navigate to the table below the device information and then find and click the option to Create a new partition.

      Important:

      The table title on this page might appear with a Partition heading or Content heading. The option to Create a new partition appears only when free space is available on the device to support the creation a new partition.
    2. In the Create new partition dialog, specify the following properties:
      Size Specify the size of the new partition.

      Note:

      For LVM configurations, consider creating a single partition of the whole disk and label it as an LVM physical volume. Tracking system hardware is easier if each real disk only appears once.
      Type In the Type drop-down box, select a file system format type, for example:
      • XFS (recommended). The default high performance scalable file system format for Oracle Linux systems disk devices.

        This file system type caters to large logical volumes, switching physical drives online without outage, and growing an existing file system.

      • EXT4. A scalable extension of the ext3 file system.

        This file system caters to logical volumes, switching physical drives online without outage, growing and shrinking an existing file system.

      • No File system. Creates a partition without creating a file system.
      Overwrite data Perform one of the following:
      • Clear the Overwrite checkbox. This option doesn't overwrite existing data, it only overwrites the header.

        Note:

        Overwriting the header only is considered a faster process but less secure because the deleted data might be recoverable.
      • Select the Overwrite checkbox. When selected, the deleted data is overwritten with zeros, making the deleted data unrecoverable.

        Note:

        The Overwrite process is slower but is considered a more secure option as all the deleted data is overwritten with zeros.
      Mount point and options Specify the appropriate mount point directory and applicable options for when to mount the partition.
      Encryption (if option is available for this storage device configuration) In the Encryption drop-down list box, select the appropriate encryption option.

      For more details, see Encrypt Block Devices With LUKS.

    3. Click Create.

      Formatting a partition with a new file system can take several minutes and depends on the partition size and format type selected. When complete, the new partition is available for system use (per the mounting options specified).

    4. (Optional) If enough space is available on the disk device to accommodate other partitions, you can repeat Step 4 to define additional partitions.