Bug 11256

Summary: "error: btrfs formatting of sda1 failed at /usr/lib/libDrakX/fs/format.pm line 191."
Product: Mageia Reporter: PC LX <mageia>
Component: InstallerAssignee: Thierry Vignaud <thierry.vignaud>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Normal Keywords: PATCH
Version: Cauldron   
Target Milestone: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Source RPM: CVE:
Status comment:

Description PC LX 2013-09-18 17:33:40 CEST
Description of problem:

When formatting a partition that already has or appears to have a file system, btrfs formatting fails. This is caused by mkfs.btrfs refusing to create a file system on a partition if it thinks a file system is already there.

Changing to the log virtual console one can see the following:

* running: mkfs.btrfs /dev/sda1
* error: btrfs formatting of sda1 failed at /usr/lib/libDrakX/fs/format.pm line 191.

Changing to the virtual console with bash and entering the mkfs.btrfs command above the result is:

$ mkfs.btrfs /dev/sda1
/dev/sda1 appears to contain an existing filesystem (ext4).
Error: Use the -f option to force overwrite.


I suggest changing /usr/lib/libDrakX/fs/format.pm to include the "-f" option to force the formatting.



Version-Release number of selected component (if applicable):

"Mageia 4 alpha2 Boot Nonfree 64bit CD ISO"



How reproducible:

Always.



Steps to Reproduce:
1. Boot a (virtual) system using "Mageia 4 alpha2 Boot Nonfree 64bit CD ISO".
2. When setting up the partitions, select "Custom disk partitioning".
3. Create a partition.
4. Format the created partition to some file system (e.g. ext4, btrfs).
5. Delete the created partition.
6. Create another partition in the same position on disk.
7. Format the partition to btrfs.


Reproducible: 

Steps to Reproduce:
Comment 1 Manuel Hiebel 2013-09-24 17:12:41 CEST
it's indeed not the case: http://gitweb.mageia.org/software/drakx/tree/perl-install/fs/format.pm#n26

Keywords: (none) => PATCH
Assignee: bugsquad => thierry.vignaud

Comment 2 Thierry Vignaud 2013-09-29 16:43:06 CEST
Fixed in git

Status: NEW => RESOLVED
Resolution: (none) => FIXED