From mboxrd@z Thu Jan 1 00:00:00 1970 From: Guillaume Le Vaillant Subject: bug#37977: Mount options ignored for root file system Date: Thu, 07 Nov 2019 19:28:10 +0100 Message-ID: <87eeyjils5.fsf@yamatai> References: <87pnif6ec0.fsf@yamatai> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:35279) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iSmWl-0005oV-Ku for bug-guix@gnu.org; Thu, 07 Nov 2019 13:29:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iSmWk-0001bT-Kg for bug-guix@gnu.org; Thu, 07 Nov 2019 13:29:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:35088) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iSmWk-0001bM-8I for bug-guix@gnu.org; Thu, 07 Nov 2019 13:29:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iSmWk-0005DW-38 for bug-guix@gnu.org; Thu, 07 Nov 2019 13:29:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-reply-to: <87pnif6ec0.fsf@yamatai> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: 37977@debbugs.gnu.org Guillaume Le Vaillant skribis: > The filesystem options declared for the root file system are apparently > ignored. This happens for a btrfs root filesystem on a LUKS volume. This also happens on a basic btrfs root file system (without LUKS). I tried adding "rootflags=defaults,autodefrag,compress=lzo" in kernel arguments, but it didn't have any effect. I then tried adding a one-shot service that remounts the root file system, and it works, the options declared in '/etc/fstab' are taken into consideration. This service just does 'mount -o remount /'. --8<---------------cut here---------------start------------->8--- (define remount-rootfs-service-type (shepherd-service-type 'remount-rootfs (const (shepherd-service (documentation "Remount rootfs with correct options.") (requirement '(udev)) (provision '(remount-rootfs)) (one-shot? #t) (start #~(lambda _ (invoke (string-append #$util-linux "/bin/mount") "-o" "remount" "/"))))))) (operating-system ... (services (cons* ... (service remount-rootfs-service-type #f) ...))) --8<---------------cut here---------------end--------------->8--- I saw that the 'start' function of 'root-file-system-service-type' doesn't do anything. Is it on purpose? Or could we make it remount the root filesystem?