Red Hat Bugzilla – Bug 1264696
Installer show wrong btrfs raid size
Last modified: 2015-11-02 10:38:15 EST
Description of problem:
In a setup with 4 3TB disk luks encrypted btrfs raid only sees 3TB
Steps to Reproduce:
1. Create encrypted btrfs automatically
2. You start with 12 TB, no redundancy
3. Change to raid 10 or other raid level
Available disk space is too low
Available disk space should, be higher
What amount of disk space are you seeing, and what do you think it should be? Please attach the logs from /tmp to this bug as individual, text/plain attachments.
I have created a vm in kvm with 4x 4 GB disks. I choose 'I will configure partitioning' and 'Encrypt my data'. I choose 'Btrfs' and 'Click here to create them automatically. The btrfs partition size with no redundancy is 13.9 GB with 3.88 MB available space.
I change the Volume to RAID 10 and the btrfs partition size decreases to 1.91 GB with RAID 10 and 1.91 GB with RAID1 with 6.27 GB available space. Changing the size policy has no effect.
The available space is correct. In the absence of the logs I requested, I'll just assume that your automatic layout was roughly:
- 500 MB /boot
- 1.6 GB swap
- 1.9 GB btrfs
- 4 GB btrfs
- 4 GB btrfs
- 4 GB btrfs
So the total size of the btrfs volume would be 13.9 GB, and some small amount of free space listed as "available" due to block size requirements or whatever.
When you switch a layout like that RAID10, each member of the array needs to be the same size. So the partitions on sdb, sdc and sdd will each shrink to 1.9GB, leaving about 2.1 GB free on each disk for a total of about 6.3 GB.
But the size of the btrfs volume should have been 2x the size of the members. I've posted a patch to https://github.com/rhinstaller/blivet/pull/232 to fix that.
I did a quick test setup with kvm. I can get the logs when I am at the server. Your assumption for the automatic layout was spot on. Thanks for the patch
What is the best option for now? Leave the 'RAID Level' at single and convert to raid 10 after a reboot?
I have also noticed that the btrfs volume size halves again when you select 'Size policy: As large as possible' instead of 'Automatic' in the 'Configure Volume' screen.
It will work fine if you just leave it as raid 10. Anaconda will use the correct amount of space for the physical partitions, it's just displaying the wrong amount of size for what will be provided by the btrfs volume.
Created attachment 1077922 [details]
I encountered another problem which might be related. In the "configure volume screen" with "RAID Level: RAID 10" and "Size policy: As large as possible" Ticking the "encrypt" option makes the installer only uses half the space on the hard drive. If you change the "Size policy" to "Automatic" the whole drive is used.
For this setup I had biosboot, /boot and swap residing on a non-redundant usb stick and 4 * 3 TB disks with luks+ btrfs. After install fdisk shows that only half of the disk size (1,5 TB) is used with luks+btrfs, the other half is unused.
Please retry with the lastest Fedora 23 nightly, if it still happens open a new bug and attach the logs from /tmp/*log to the bug as individual text/plain attachments.