Test platform: VirtualBox, 64bit VM with a 8 GB disk (default settings) ISO: Mageia 5 beta 3 LiveDVD KDE4 x86_64 (round 3) I'm testing the live installer but started from the boot menu, not from the live mode. The disk has two partitions from a previous Mageia 5 test install: - sda1 (6.6 GB, /, ext4) - sda2 (1.3 GB, swap) When choosing either of those two partitioning options: - "Use existing partitions" (then I choose to format sda1) - "Erase and use entire disk" I get the following error: "An error occurred Not enough space available (5.6GB available while 6.3GB are needed)" The error message could indicate that the installer tries to create both a root partition and a new swap partition in place of sda1 (6.6 GB old root - 1.3 GB swap = 5.6 GB new root, too small). So the bug would be that diskdrake does not reuse existing swap partitions. What is puzzling is that I get the exact same message when using "Erase and use entire disk" that should normally also remove the previous swap partition, and then work with 8 GB and not 6.6 GB. Reproducible: Steps to Reproduce:
CC'ing Thierry.
CC: (none) => thierry.vignaud
Actually I also get the same error message when setting sda1 to / and sda2 to swap in the "Custom disk partitioning" menu. To get past the partitioning step, I had to create a / data of 7.7 GB and a swap partition of 200 MB. With smaller / partitions, it would complain that there is less than 6.3 GB available. It seems that there is a 1.3 GB offset when checking the size of the / partition.
Similar error with Mageia 5 beta 3 LiveDVD KDE4 i586 (round 4), the minimal size is just somewhat different (probably because i586 needs less space): "An error occurred Not enough space available (5.6GB available while 6GB are needed)"
Priority: Normal => HighHardware: x86_64 => All
Raising as release_blocker, currently LiveDVD install on a 8 GB virtual disk is really tricky because of this.
Priority: High => release_blocker
Blocks: (none) => 14069
This message comes from draklive-install Could be a side effect of overlayfs (we'd issues with df on unionfs in the past). Could be b/c of the 5% reserved blocks. Can you report the output of df -h for both the / of live and the fs you want to install on it?
Keywords: (none) => NEEDINFOCC: (none) => pterjan, tmbSource RPM: (none) => draklive-install
Live root: # df -h / Filesystem Size Used Avail Use% Mounted on overlay 498M 26M 472M 6% / Target filesystem: # df -h /dev/sda1 Filesystem Size Used Avail Use% Mounted on /dev/sda1 7.6G 3.9G 3.4G 54% /mnt/sda1 # fdisk -l /dev/sda Disk /dev/sda: 8 GiB, 8589934592 bytes, 16777216 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x00000000 Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 16338104 16336057 7.8G 83 Linux /dev/sda2 16340940 16771859 430920 210.4M 5 Extended /dev/sda5 16340992 16771859 430868 210.4M 82 Linux swap / Solaris But actually this is the fs I used during my previous install where I worked around the issue as described in comment 2, so this /dev/sda1 partition is OK for draklive-install and I can install on top of it. But if I use "Erase and use entire disk", then: "ALL existing partitions and their data will be lost on drive sda (8GB, ATA VBOX, HARDDISK)" => OK "An error occurred Not enough space available (5.6GB available while 5.7GB are needed)" (5.7 GB seems to be what the GNOME x86_64 LiveDVD needs).
Yeah, we need to make the installer read the size of /run/mgalive/ovlsize, to get the real size of the overlayfs image
I use the same target to get the progress bar to work
Here I got diskdrake in installer to format my partitions with the "auto-allocate" option, so here's an updated df and fdisk output: # df -h /dev/sda1 Filesystem Size Used Avail Use% Mounted on /dev/sda1 6.5G 16M 6.1G 1% /mnt/sda1 # fdisk -l /dev/sda Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 14008679 14006632 6.7G 83 Linux /dev/sda2 14012397 16771859 2759463 1.3G 5 Extended /dev/sda5 14012416 16771859 2759444 1.3G 82 Linux swap / Solaris When trying to install with "Reuse existing partitions", I get the same error message: 5.6GB available against 5.7GB needed. It's as if the 5% reserved blocks were applied twice.
As you already stated, I confirm that the issue is specific to draklive-install, it does not happen when the classical installer.
(In reply to Thomas Backlund from comment #7) > Yeah, we need to make the installer read the size of /run/mgalive/ovlsize, > to get the real size of the overlayfs image It would be better if df behaviour on union fses would be correct :-)
Component: Installer => RPM PackagesAssignee: bugsquad => tmb
Actually get_total_size() is used in that check too so it should be good. (In reply to Rémi Verschelde from comment #9) > When trying to install with "Reuse existing partitions", I get the same > error message: 5.6GB available against 5.7GB needed. It's as if the 5% > reserved blocks were applied twice. What is the output of the following command? LC_ALL=C tune2fs -l /dev/sda1|grep -i reserved
# LC_ALL=C tune2fs -l /dev/sda1|grep -i reserved Reserved block count: 96879 Reserved GDT blocks: 473 Reserved blocks uid: 0 (user root) Reserved blocks gid: 0 (group root)
That amounts only to 378Mb, which roughly 5%
Hm, I forgot... we've been using /run/mgalive/ovlsize since mga4. http://gitweb.mageia.org/software/draklive-install/commit/?id=da0127bead15d00731c964efebaa21a9bca31a15
That's what I said in comment #12 :-)
Is there any additional testing that I could do to provide more info?
Proposal for explanations in errata and wait for a better solution for Mageia 6
CC: (none) => ennael1
Fine by me.
Blocks: 14069 => 15527
Created attachment 6245 [details] Log from draklive-install-2.3.-1.mga5 on 5-beta3-LiveDVD-KDE4-x86_64 Attached is a log from the journal after selecting use free space on an empty VM image (this also reproduces the bug, not only installing over existing partitions). I don't know why is it failing but here are some observations: du -sbx /run/mgalive/ovlsize returns 6781544982 or about 6.31GiB while the created root partition is about 6.67GiB. So the reported 5.6GiB is too small (about 83% of the raw size of the partition). I'm not sure that reserved space and journal size can account for this or are these counted correctly though. But the problem may be in getting the free space and not the size of the overlay image.
CC: (none) => balaton
CC: (none) => rverschelde
I can't seem to reproduce the issue anymore with the current set of internal ISOs for Mageia 5 RC (round 9). @ Zoltan: If you can check it too once Mageia 5 RC is officially released (should be this week-end), it would be great.
Actually I was able to reproduce when testing Mageia 5 RC, round 9, GNOME LiveDVD 64. The issue was not trigger in most of the tests I made, but it appeared when I attempted to do a live install after having updated some package to more recent ones (namely the drakxtools).
I could reproduce the same with the released Mageia 5 RC Live DVD (KDE4-x86_64 version) in the install option selected from the boot menu when selecting erase and use entire disk option at partitioning. It still fails with Not enough space available (5.6GB available while 6.2GB are needed). draklive-install version still seems to be the same: 2.3-1.mga5
I just tried in VirtualBox with Mageia-5-RC-LiveDVD-GNOME-x86_64-DVD.iso and could not reproduce. Downloading Mageia-5-RC-LiveDVD-KDE4-x86_64-DVD.iso.
OK I can reproduce with Mageia-5-RC-LiveDVD-KDE4-x86_64-DVD.iso.
Reading the code of getAvailableSpace, it returns: my $n = $size * 512 / 1.07; $n - max(0.1 * $n, 65MB); I have no idea about the 1.07, but then it removes 10% anyway (at least 65MB).
(I also have no idea about the 512 as it seems the size is in bytes)
And there is no history for those lines before commit 126777bc019a54afb4ec51299f2cf9d2841698aa (Wed Apr 25 12:26:16 2007 +0000, "re-sync after the big svn loss").
For this partition which is 6762228 1K blocks, it gets a size of 14006632 (so it seems size is actually in 512 blocks). 14006632*512/1.07 = 6702238863 6702238863*0.9 = 6032014976.7 = 5.6G So the problem is that we first remove 6.55% by dividing by 1.07 (for the overhead of the filesystem?) then 10% (to have enough empty space).
hmm and the size it gets is actually still strange, even in 512 blocks it should have given 13524456 not 14006632.
But in short, available disk space is computed sort of correctly, the 10% of extra space is wanted for the system to be usable afterwards. So it seems our default partitioning on a 8GB drive is just not enough for the current LiveDVDs. Default partitioning that applies on a disk < 50G: 6/7 of the disk for / (at least 300MB, up to 50GB) 1/7 of the disk for swap (at least 256MB, up to 4GB)
In case the computation is correct what's confusing may be the message. It says 5.6GB available for a 6.7GB partition. Maybe instead of substracting the 10% free space from available it should add it to required so the message would say 6.2GB available but 6.9GB needed which is closer to what's the case. (The 7% for the file system reserved space and overhead is still substracted from detected free space as those are file system related, but the 10% is a requirement so it is added to needed space. It may be even less confusing to also add the 7% to the needed space so the free space is matching what's seen at partitioning even if these are filesystem overheads so that's not really correct but the least confusing.) What do you think? These are just ideas, let others decide on this.
+1 for comment #32, let's keep available space unchanged and rather increase the requirement.
CC: (none) => eeeemail
I agree.
Keywords: NEEDINFO => (none)
@Thomas or Thierry: Pascal should still be away for ~1 week, do you think you could manage a fix based on his debugging (comments 26 to 31) and Zoltan's analysis in comment 32?
Adding Martin too
CC: (none) => mageia
Created attachment 6517 [details] Patch #1 - apply to drakx
Created attachment 6518 [details] Patch #2 - apply to draklive-install This and the previous patch implement Zoltan's suggestion in comment 32 (keeping the 7% reduction on raw space). I've tested this by booting to a live desktop, applying the first patch to /lib/libDrakX/fs/any.pm, applying the second patch to /usr/sbin/draklive-install, then running the installer from the desktop and attempting to install into a 4GB partition. As far as I can tell (using grep), the fs::getAvailableSpace function is only used in the live installer, so this should not affect anything else, but it would be good if Thierry or Thomas could confirm this.
Keywords: (none) => PATCH
getAvailableSpace() is widely used in stage2. So this change doesn't only impact draklive, it can have side effect on classic installer too. So that cannot be applied. We could another param to tell not to account for min needed space
Created attachment 6519 [details] (getNeededMinSpace) split it out
Created attachment 6520 [details] enables to get raw available space (mga15257)
Created attachment 6521 [details] better reporting of insufficient space (mga#15257)
All untested of course
(In reply to Thierry Vignaud from comment #42) > Created attachment 6521 [details] > better reporting of insufficient space (mga#15257) I think there is a missing semi-colon at the end of line 179.
Indeed. Can someone test the patch with adding the missing ";" ?
Keywords: (none) => NEEDINFO
Tested using the 64-bit GNOME Live DVD and attempting to install onto a 4.3GB partition. Before patching, it reported 3.6GB available, 5.6GB needed. After patching, it reported 4GB available, 6GB needed. I think it's reasonable to deduct the file system overhead from the raw available space, so would say this is fixed.
commit 97a7904701e5fe02af2c95c5eb0ffb83a7707b6d Author: Thierry Vignaud <thierry.vignaud@...> Date: Tue May 12 04:27:38 2015 -0400 (getNeededMinSpace) split it out needed for mga#15257 --- Commit Link: http://gitweb.mageia.org/software/drakx/commit/?id=97a7904701e5fe02af2c95c5eb0ffb83a7707b6d
commit e3e2771c36485dc8015947d2898e49faa38d54bd Author: Thierry Vignaud <thierry.vignaud@...> Date: Tue May 12 04:31:12 2015 -0400 better reporting of insufficient space (mga#15257) When the live installer checks if there is sufficient space on the chosen root partition it subtracts 10% (or 65MB) from the available space to give some headroom. It's better to add the headroom to the required space, as this gives a more accurate message when there is insufficient space. --- Commit Link: http://gitweb.mageia.org/software/draklive-install/commit/?id=e3e2771c36485dc8015947d2898e49faa38d54bd
commit 7f9e02c8f2e5030852b7a952c8e6ad95a4cea50e Author: Thierry Vignaud <thierry.vignaud@...> Date: Tue May 12 04:31:12 2015 -0400 better reporting of insufficient space (mga#15257) When the live installer checks if there is sufficient space on the chosen root partition it subtracts 10% (or 65MB) from the available space to give some headroom. It's better to add the headroom to the required space, as this gives a more accurate message when there is insufficient space. --- Commit Link: http://gitweb.mageia.org/software/draklive-install/commit/?id=7f9e02c8f2e5030852b7a952c8e6ad95a4cea50e
Closing
Status: NEW => RESOLVEDResolution: (none) => FIXED
Blocks: 15527 => (none)