The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/6760

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
On debian 9.9 xfs_growfs version, the binary does not accept the block
device as an argument, but the mount point. Since this behavior is also
supported on later versions, I've replaced the command from the block
device to the mount point, in order not to crash older versions of XFS.

Signed-off-by: Louis Solofrizzo <lsolofri...@online.net>
From 341b8679fa73f0d35f949d7599058244aecfc398 Mon Sep 17 00:00:00 2001
From: Louis Solofrizzo <lsolofri...@online.net>
Date: Thu, 23 Jan 2020 22:01:08 +0100
Subject: [PATCH] storage: Fix xfs_growfs command for older versions

On debian 9.9 xfs_growfs version, the binary does not accept the block
device as an argument, but the mount point. Since this behavior is also
supported on later versions, I've replaced the command from the block
device to the mount point, in order not to crash older versions of XFS.

Signed-off-by: Louis Solofrizzo <lsolofri...@online.net>
---
 lxd/storage/utils.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lxd/storage/utils.go b/lxd/storage/utils.go
index a36580b522..8fc854c05a 100644
--- a/lxd/storage/utils.go
+++ b/lxd/storage/utils.go
@@ -168,7 +168,7 @@ func GrowFileSystem(fsType string, devPath string, mntpoint 
string) error {
        case "ext4":
                msg, err = shared.TryRunCommand("resize2fs", devPath)
        case "xfs":
-               msg, err = shared.TryRunCommand("xfs_growfs", devPath)
+               msg, err = shared.TryRunCommand("xfs_growfs", mntpoint)
        case "btrfs":
                msg, err = shared.TryRunCommand("btrfs", "filesystem", 
"resize", "max", mntpoint)
        default:
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to