]> git.proxmox.com Git - pve-installer.git/commitdiff
fix XFS mount options
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 15 Mar 2017 10:54:31 +0000 (11:54 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 16 Mar 2017 06:04:15 +0000 (07:04 +0100)
since Linux 4.10, barrier/nobarrier are still supported, but
are ignored, and barrier=1/0 seems to not work at at all
anymore.

so now we have three possibilities:
* ZFS: no mounting needed at all
* XFS: only noatime
* extX and btrfs: noatime and nobarrier

restructure code accordingly

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
proxinstall

index e02eff1e7d3a5f77a5a998ba94bbb1cf6ff969f7..81318fc41d5b7ba0d29aad8727747768bea1e842 100755 (executable)
@@ -1196,11 +1196,12 @@ sub extract_data {
 
        if ($use_zfs) {
            # do nothing
-       } elsif ($use_btrfs) {
-           syscmd("mount -n $rootdev -o noatime,nobarrier $targetdir") == 0 ||
-               die "unable to mount $rootdev\n";
        } else {
-           syscmd ("mount -n $rootdev -o noatime,barrier=0 $targetdir") == 0 ||
+           my $mount_opts = 'noatime';
+           $mount_opts .= ',nobarrier'
+               if $use_btrfs || $filesys =~ /^ext\d$/;
+
+           syscmd("mount -n $rootdev -o $mount_opts $targetdir") == 0 ||
                die "unable to mount $rootdev\n";
        }