I am trying to mount an F2FS file system on an Ubuntu 16.04 LTS machine running Linux version 4.4.178+. When I try to run:

sudo mkfs.f2fs /dev/sda2

the system returns:

F2Fs-tools: mkfs.f2fs Ver: 1.12.0 (2018-11-12)

Info: Disable heap-based policy
Info: Debug level = 0
Info: Label = FirstTry
Info: Trim is enabled
Info: [/dev/sda2] Disk Model: VBPX HARDDISK
Info: Segments per section = 1
Info: Sections per zone = 1
Info: sector size = 512
Info: total sectors = 2 (0 MB)
Info: zone aligned segment0 blkaddr: 512
    Error: Device size is not sufficient for F2FS volume
    Error: Failed to prepare a super block!!!
    Error: Could not format the device!!!

I believe it has to do with the number of total sectors being only 2, but cannot figure out how to change that. Any help would be greatly appreciated.

  • What is /dev/sda2?  Do you know why fsck is saying “total sectors = 2”?  What do other commands say?  E.g., dd if=/dev/sda2 of=/dev/null – Scott Jun 28 at 3:05
  • /dev/sda2 is the target volume to format in F2FS and in this case is the second partition of the first drive. wiki.archlinux.org/index.php/F2FS states that the target volume should be of the form /dev/sdxY. dd if=/dev/sda2 of=/dev/null returns dd: writing to '/dev/sdb': No space left on device 3884241+0 records in 3884240+0 records out 1988730880 bytes (2.0 GB, 1.9 GiB) copied, 23,9764 s, 82.9 MB/s – ya3 Jun 28 at 15:54
  • Actually i just tried mkfs.f2fs /dev/sdb and it was successful. Thank you so much for your help – ya3 Jun 28 at 15:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.