← Back to team overview

touch-packages team mailing list archive

[Bug 1535137] [NEW] Explanation bug in mkfs xfs Filesystem mkfs from util-linux 2.26.2

 

Public bug reported:

mkfs from util-linux 2.26.2

during an exercise with creating xfs partitions on a Ubuntu 15.10 64 Bit virtual machine,
I guess I found a bug.

Explanation:
When creating an xfs filesystem on a partition with a existing gpt table, the mkfs command return an error message
with the advice to force the command to run by using the -f option (lowercase f)

However, it wont work and as you can see at my bash text, the command tells me that -f (lowercase f) is an invalid option.
I read the manpages of mkfs to determine what should be the correct option. Even here, the -f (lowercase f) is mentioned.

  -f     Force overwrite when an existing filesystem is detected on the
device.  By default, mkfs.xfs will not write to the device if  it
suspects that there is a filesystem or partition table on the device
already.

So I tried the uppercase F (-F) to FORCE the command to overwrite everything which worked !
So there are 2 possibilities:
#1 I am to dump to use a -f properly
#2 The texts (man pages and stderr)are wrong written and should be replaced with a uppercase F.

root@ubuntu:/mnt# mkfs -t xfs /dev/sdb2
mkfs.xfs: /dev/sdb2 appears to contain a partition table (gpt).
mkfs.xfs: Use the -f option to force overwrite.
root@ubuntu:/mnt# mkfs -tf xfs /dev/sdb2
mkfs: failed to execute mkfs.f: No such file or directory
root@ubuntu:/mnt# mkfs -t -f xfs /dev/sdb2
mkfs: failed to execute mkfs.-f: No such file or directory
root@ubuntu:/mnt# mkfs -f -t xfs /dev/sdb2
mkfs.ext2: invalid option -- 'f'


root@ubuntu:/mnt# mkfs -F -t xfs /dev/sdb2
mke2fs 1.42.12 (29-Aug-2014)
Found a gpt partition table in /dev/sdb2

Your mke2fs.conf file does not define the xfs filesystem type.
Creating filesystem with 512000 1k blocks and 128016 inodes
Filesystem UUID: 216b73d3-d57e-49b4-a288-b1a0ac9a5ce6
Superblock backups stored on blocks:
    8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409

Allocating group tables: done                           
Writing inode tables: done                           
Writing superblocks and filesystem accounting information: done

Please give a feedback if my observation is correct or wrong.

With best regards

Stephan H. Wenderlich

** Affects: util-linux (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to util-linux in Ubuntu.
https://bugs.launchpad.net/bugs/1535137

Title:
  Explanation bug in mkfs xfs Filesystem mkfs from util-linux 2.26.2

Status in util-linux package in Ubuntu:
  New

Bug description:
  mkfs from util-linux 2.26.2

  during an exercise with creating xfs partitions on a Ubuntu 15.10 64 Bit virtual machine,
  I guess I found a bug.

  Explanation:
  When creating an xfs filesystem on a partition with a existing gpt table, the mkfs command return an error message
  with the advice to force the command to run by using the -f option (lowercase f)

  However, it wont work and as you can see at my bash text, the command tells me that -f (lowercase f) is an invalid option.
  I read the manpages of mkfs to determine what should be the correct option. Even here, the -f (lowercase f) is mentioned.

    -f     Force overwrite when an existing filesystem is detected on
  the device.  By default, mkfs.xfs will not write to the device if  it
  suspects that there is a filesystem or partition table on the device
  already.

  So I tried the uppercase F (-F) to FORCE the command to overwrite everything which worked !
  So there are 2 possibilities:
  #1 I am to dump to use a -f properly
  #2 The texts (man pages and stderr)are wrong written and should be replaced with a uppercase F.

  root@ubuntu:/mnt# mkfs -t xfs /dev/sdb2
  mkfs.xfs: /dev/sdb2 appears to contain a partition table (gpt).
  mkfs.xfs: Use the -f option to force overwrite.
  root@ubuntu:/mnt# mkfs -tf xfs /dev/sdb2
  mkfs: failed to execute mkfs.f: No such file or directory
  root@ubuntu:/mnt# mkfs -t -f xfs /dev/sdb2
  mkfs: failed to execute mkfs.-f: No such file or directory
  root@ubuntu:/mnt# mkfs -f -t xfs /dev/sdb2
  mkfs.ext2: invalid option -- 'f'

  
  root@ubuntu:/mnt# mkfs -F -t xfs /dev/sdb2
  mke2fs 1.42.12 (29-Aug-2014)
  Found a gpt partition table in /dev/sdb2

  Your mke2fs.conf file does not define the xfs filesystem type.
  Creating filesystem with 512000 1k blocks and 128016 inodes
  Filesystem UUID: 216b73d3-d57e-49b4-a288-b1a0ac9a5ce6
  Superblock backups stored on blocks:
      8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409

  Allocating group tables: done                           
  Writing inode tables: done                           
  Writing superblocks and filesystem accounting information: done

  Please give a feedback if my observation is correct or wrong.

  With best regards

  Stephan H. Wenderlich

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/1535137/+subscriptions


Follow ups