OpenBSD Journal

OpenBSD 6.7 and ffs2 FAQs

Contributed by rueda on from the filesystem-asked-questions dept.

Otto Moerbeek (otto@) posted to misc@ a useful summary of the state of play of FFS2 in the 6.7 release (and, to some extent, -current).

In his mail, Otto clarifies some things about the latest release:

  • In OpenBSD 6.7, ffs2 is the default for new filesystems during install (with some exceptions).
  • In OpenBSD 6.7, if you create a new filesystem manually (using newfs(8)) you will still get an FFS1 filesystem unless you force -O2 or if the filesystem will be larger than 1 TB.

He also points out that this last point has been changed in -current, where newfs will default to ffs2 for all platforms.

Finally, he explains some of the benefits and restrictions of FFS2:

  • FFS2 is faster to create (using newfs) and is usually faster to check (using fsck(8), which is run during boot) when compared to FFS1.
  • FFS2 uses 64-bit timestamps and block numbers. That means it handles dates after 2038 and much larger partitions.
  • Large partitions still require large amounts of memory to check, so create multi-petabyte filesystems at your own peril.
  • There is no tool that will convert from FFS1 to FFS2. You will have to back up your data and reformat your filesystems yourself.

(Comments are closed)


Comments
  1. By Ozgur Kazancci (deksar) ozgur@kazancci.com on https://ozgur.kazancci.com

    Pretty clear and informative.
    Thank you!
    --
    Özgür

    Comments
    1. By Paul Frank Covello (pfc) pfcovello@gmail.com on https://pfc-consulting.com

      There was also mention that if in doubt what your FS is, you can type something like:

      # dumpfs /dev/rsdxx | head -1

      (for example: dumpfs /dev/rwd0a | head -1)

      This will let you know if the file system is FFS or FFS2.

      It is interesting that when you look at /etc/fstab on a new install, it still says ffs
      so the above command should make it clearer in case you need to be reminded
      which of your boxes are ffs and which are ffs2 on the future.

  2. By Otto Moerbeek (ottom) otto@drijf.net on

    THe first bullet point shoud add *during install*

    Comments
  3. By Matthwe (markfm20) matthew.markfort@gmail.com on

    So - more FAQ item(s) might be "How does this affect maintaining pre-existing FFS deployed systems? Would it be easier to re-create the partitions as FFS2? Does it impact sysupgrade(1)?"

    Comments
    1. By Otto Moerbeek (ottom) otto@drijf.net on

      When upgrading existing partitions are not reformatted, so they remain ffs1.

      ffs1 will remain supported, so there is no *need* to convert ffs1 to ffs2 for the foreseeable future, but you might want to convert if you are interested in the benefits of ffs2.

      Sysupgrade is not affected, since it is "just" an automated upgrade.

  4. By raindog308 (raindog308) on

    Just out of curiosity, why is ffs2's fsck and newfs time faster? I understand the other benefits (2038, size, etc.) being a logical benefit of 64-bit but is ffs2 faster simply because it's a fresh and better implementation?

    Comments
    1. By Otto Moerbeek (ottom) otto@drijf.net on

      ffs2 allocates inode pages on demand. That means that initially much less meta-data needs to be initialized (fast newfs) and that when not many inodes are in use (pretty typical) fewer inodes need to be checked (faster fsck).

      Comments
      1. By Rino Mardo (eternalFlame) on

        understood but when you use ffs2 on a database server and it runs out of inode pages, wouldn't an on demand feature be a choke point as the db now needs additional inode pages but the OS will still be creating them?

        i'm just comparing it to a VM where the disk size was on demand and i notice a slight slowdown as the OS creates or extends the disk size.

        Comments
        1. By Otto Moerbeek (ottom) otto@drijf.net on

          Short answer: no.

          You cannot compare expanding filesystems to initializing a block of inodes on demand.

Credits

Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]