Bug 11256 - "error: btrfs formatting of sda1 failed at /usr/lib/libDrakX/fs/format.pm line 191."
Summary: "error: btrfs formatting of sda1 failed at /usr/lib/libDrakX/fs/format.pm lin...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: Installer (show other bugs)
Version: Cauldron
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Thierry Vignaud
QA Contact:
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2013-09-18 17:33 CEST by PC LX
Modified: 2013-09-29 16:43 CEST (History)
0 users

See Also:
Source RPM:
CVE:
Status comment:


Attachments

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


Note You need to log in before you can comment on or make changes to this bug.