2

On an Ubuntu 16.04 or 14.04 system, are ext4 partitions mounted with data=journal, data=ordered, or data=writeback by default?

I'm interested in both the defaults when mounting via /etc/fstab and mounting of other partitions which happens either automatically when an external storage medium becomes connected or when the user clicks on the device in Nautilus.

Furthermore, I'm interested in whether a simple

# mount /dev/sdb1 /mnt

without any explicit mount options behaves any differently from the ways of mounting mentioned above.

Changing to options of partitions mounted via /etc/fstab is trivial as one can just state the options in each line. When mounting using the command mount, one can state the options, too, and use a bash alias to not have to write them each time. How can the behavior of automounting or mounting via a click on the partition in Nautilus be changed?

I'm mainly interested in the data option.

UTF-8
  • 5,710
  • 10
  • 31
  • 67

1 Answers1

0

From man mount, in the section for ext3 (14.04, 16.04):

ordered
     This is the default mode.  All data  is  forced  directly
     out  to  the main file system prior to its metadata being
     committed to the journal.

And for ext4:

The  options  journal_dev,  noload,  data,  commit,  orlov,   oldalloc,
[no]user_xattr [no]acl, bsddf, minixdf, debug, errors, data_err, grpid,
bsdgroups, nogrpid sysvgroups,  resgid,  resuid,  sb,  quota,  noquota,
grpquota and usrquota are backwardly compatible with ext3 or ext2.

So, the default is ordered unless otherwise specified.

How can the behavior of automounting or mounting via a click on the partition in Nautilus be changed?

Is setting default mount options for udisks really not possible?

muru
  • 197,895
  • 55
  • 485
  • 740