[lxc-devel] [lxd/master] lxd/storage/drivers: Pass mountPath to xfs_growfs

monstermunchkin on Github lxc-bot at linuxcontainers.org
Wed Jan 29 06:37:31 UTC 2020


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 443 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200128/ed844e82/attachment.bin>
-------------- next part --------------
From ede67e44900219b6ba5cc72759bd7b31b6241443 Mon Sep 17 00:00:00 2001
From: Thomas Hipp <thomas.hipp at canonical.com>
Date: Tue, 28 Jan 2020 18:42:35 +0100
Subject: [PATCH] lxd/storage/drivers: Pass mountPath to xfs_growfs

As the man page suggests, xfs_growfs should take the mount point, not
the dev path.

Signed-off-by: Thomas Hipp <thomas.hipp at canonical.com>
---
 lxd/storage/drivers/utils.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lxd/storage/drivers/utils.go b/lxd/storage/drivers/utils.go
index 67320151b5..0a8a3aaa91 100644
--- a/lxd/storage/drivers/utils.go
+++ b/lxd/storage/drivers/utils.go
@@ -472,7 +472,7 @@ func growFileSystem(fsType string, devPath string, vol Volume) error {
 		case "ext4":
 			msg, err = shared.TryRunCommand("resize2fs", devPath)
 		case "xfs":
-			msg, err = shared.TryRunCommand("xfs_growfs", devPath)
+			msg, err = shared.TryRunCommand("xfs_growfs", mountPath)
 		case "btrfs":
 			msg, err = shared.TryRunCommand("btrfs", "filesystem", "resize", "max", mountPath)
 		default:


More information about the lxc-devel mailing list