You are not logged in.

#1 2014-01-21 23:59:04

Neitsab
Wiki Maintainer
Registered: 2013-12-05
Posts: 25

Why is "stripe=4" mount option specified by default for /boot?

Hi all,

When I installed Arch back in December, I noticed that by default genfstab produced a /etc/fstab which contained the mount option "stripe=4" for my /boot logical volume (besides rw and data=ordered). At first I thought it was a mke2fs option, but its man page doesn't refer to it (it only mentions "stripe_width").

Curious about it, I found it mentioned in the kernel ext4 documentation, which says:

stripe=n        Number of filesystem blocks that mballoc will try
                    to use for allocation size and alignment. For RAID5/6
                    systems this should be the number of data
                    disks *  RAID chunk size in file system blocks.

As it didn't seem too important (...) and that it isn't a default option according to kernel doc, I decided to remove it from my /etc/fstab (along with rw and data=ordered) and reboot to see. But a quick verification with mount showed they were still present:

$ mount
 ...
 /dev/mapper/boot-arch on /boot type ext4 (rw,noatime,stripe=4,data=ordered)
 ...

man 8 mount does precise:

FILESYSTEM SPECIFIC MOUNT OPTIONS
The following options apply only to certain filesystems. We sort them
by filesystem. They all follow the -o flag.
What options are supported depends a bit on the running kernel.    More
info may be found in the kernel source subdirectory Documenta-
tion/filesystems.

and we can find "stripe=n" under Mount options for ext4 subsection. Description repeats kernel doc one.

Searching in the forums before posting, I found that other users had this stripe=4 option set in their fstab too, each time only for the /boot partition, no matter it be ext2, ext4 (not talking about those actually using a RAID)...

Now I'm left wondering why and by what those option are set, and why the non-default stripe=4 option is set? I thought it could be:

  • by Arch kernel:  I checked the default kernel config file, but it doesn't seem to mention stripe mount option;

  • genfstab source code doesn't either ;

  • tried to check util-linux sources (libmount especially) for an indication whether mount was responsible for this, but that's a bit too vast for my competence...

  • last thought: a systemd service or a udev rule... Didn't find anything among systemd services (boot.mount just converts fstab entries in a systemd unit), and from what I understood udev deals with device node, while my /boot is in a logical volume.

If somebody has any insight so as to why this option is set by default in Arch, I'd really like to hear it. If it is of any kind of relevance, my setup is as follow:

$ lsblk
NAME               MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda                  8:0    0 931,5G  0 disk  
└─sda1               8:1    0 931,5G  0 part  
  └─hdd            254:13   0 931,5G  0 crypt 
    ├─data-archvar 254:15   0    10G  0 lvm   /var
    └─data-data    254:18   0   900G  0 lvm   /media/data
sdb                  8:16   0 111,8G  0 disk  
├─sdb1               8:17   0     1G  0 part  
│ └─boot-arch      254:1    0   252M  0 lvm   /boot
└─sdb2               8:18   0   100G  0 part  
  └─ssd            254:5    0   100G  0 crypt 
    ├─os-archroot  254:7    0    15G  0 lvm   /
    ├─os-archhome  254:10   0     5G  0 lvm   /home

with /boot on /dev/sdb1, /dev/sdb being a SSD split into two partitions /sdb1 (LVM PV/VG, this setup allows for easy multibooting) and /sdb2 being a LUKS container for the rest of my OS but /var.

Is the stripe option set because underlying device is a logical volume? But anyway, why and by what those option are set? I noticed that whether I put "defaults" mount option in /etc/fstab or not, it was never reproduced in /proc/mounts... Similar questioning can be found at http://askubuntu.com/questions/55273/de … nt-options

edit: After checking my log with "sudo journalctl | grep stripe", I can't find anything.That's weird, no mount options (noatime...) are ever mentionned. For others users of the forum, options appear (example). Typical line in my logs:

kernel: EXT4-fs (dm-1): mounted filesystem with ordered data mode. Opts: (null)

Last edited by Neitsab (2014-01-22 00:11:04)

Offline

Board footer

Powered by FluxBB