Unable to create 27TB partition for btrfs filesystem in RHEL 7 RC during Installation ?

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 7
  • Btrfs v3.12

Issue

  • Tried to create 27TB partition on RHEL 7 RC but reflecting 16TB partition during installation through disk druid.

  • Alternate way to create 27TB size partition for creating btrfs filesystem with parted during installation.

Resolution

  • This is a known Issue fixed in "python-blivet-0.61.0.5-1" version & reported in BZ# 1114435

Workaround:
parted works in background during installation. parted can be used to create 27TB partition,

  • Start an interactive install

  • Use Ctrl-Alt-F2 to jump to a shell

  • Use parted command to create a GPT label

# parted
parted> mklabel gpt
parted> unit TB                                                     
parted> mkpart primary 0.00TB 27.00TB 
  • Return to the interactive install using Ctrl-Alt-F6

  • When prompted about the disk configuration, select Use custom layout

  • Create other partitions as desired

  • Continue with the installation process as normal

Alternate steps to create 27TB partition size for creating btrfs filesystem with parted after installation,

  • Step1:
# parted  /dev/mapper/vg_reproducer-lv01
GNU Parted 3.1
Using  /dev/mapper/vg_reproducer-lv01
Welcome to GNU Parted! Type 'help' to view a list of commands.

(parted) mklabel gpt                                                      
Warning: The existing disk label on `/dev/mapper/vg_reproducer-lv01` will be destroyed and all data on this disk will be lost. Do you want to continue? Yes/No?yes

(parted) unit TB

(parted) mkpart primary 0.00TB 27.00TB 

(parted) print                                       
Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/vg_reproducer-lv01: 30.8TB
Sector size (logical/physical): 512B/512B

Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name     Flags
 1      0.00TB  27.0TB  27.0TB  btrfs        primary

(parted) quit                                                             
Information: You may need to update `/etc/fstab`.
  • Step 2:
# fdisk -l |grep /dev/mapper/vg_reproducer-lv01
Disk /dev/mapper/vg_reproducer-lv01: 30786.3 GB, 30786317189120 bytes, 60129525760 sectors 
     /dev/mapper/vg_reproducer-lv01p1: 27000.0 GB, 26999999430656 bytes, 52734373888 sectors
  • Step 3:
# partprobe /dev/mapper/vg_reproducer-lv01
  • Step 4:
# mkfs.btrfs /dev/mapper/vg_reproducer-lv01p1

WARNING! - Btrfs v3.12 IS EXPERIMENTAL
WARNING! - see http://btrfs.wiki.kernel.org before using

Turning ON incompat feature 'extref': increased hardlink limit per file to 65536
fs created label (null) on /dev/mapper/vg_reproducer-lv01p1
    nodesize 16384 leafsize 16384 sectorsize 4096 size 24.56TiB
Btrfs v3.12
  • Step 5:
# mount -t btrfs /dev/mapper/vg_reproducer-lv01p1 /btrfs-test
  • Step 6:
# df -m /btrfs-test
Filesystem                       1M-blocks  Used Available Use% Mounted on
/dev/mapper/vg_reproducer-lv01p  25749206     1  25747130   1% /btrfs-test
  • Step 7:
# btrfs filesystem show /dev/mapper/vg_reproducer-lv01p1
Label: none  uuid: 5d5c834b-566b-4248-b8fe-1891464469fc
    Total devices 1 FS bytes used 384.00KiB
    devid    1 size 24.56TiB used 2.04GiB path /dev/mapper/vg_reproducer-lv01p1

Diagnostic Steps

Follow the reproducing steps on a VM with 8GB of disk space,

  1. While installing the VM, select custom partitioning. Then at the custom partitioning section, select automated partitioning option after selecting btrfs.

  2. Edit the btfs / partition layout and then provide only 5.87GB. Save the entry

  3. Perform the installation

Perform the below steps after reboot,

  1. Select partitioning section then select custom partitioning

  2. Select btrfs

  3. Create a new /boot entry with 500MB (same size as that of the previous installation)

You will notice a swap entry (this entry is added even without you manually doing it)

  1. Create a new / mount point & set the partition size as 24000 and then add the mount point.

  2. It will create the / partition with 5.87GB of space (similar to the existing installation size)

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.