|
|
82babb |
From 7e8275f8939988f18f9a4a596381ca215fde2270 Mon Sep 17 00:00:00 2001
|
|
|
82babb |
From: Eric Sandeen <sandeen@redhat.com>
|
|
|
82babb |
Date: Mon, 4 Nov 2019 15:35:49 -0500
|
|
|
82babb |
Subject: [PATCH] xfs_growfs: allow mounted device node as argument
|
|
|
82babb |
|
|
|
82babb |
Up until:
|
|
|
82babb |
|
|
|
82babb |
b97815a0 xfs_growfs: ensure target path is an active xfs mountpoint
|
|
|
82babb |
|
|
|
82babb |
xfs_growfs actually accepted a mounted block device name as the
|
|
|
82babb |
primary argument, because it could be found in the mount table.
|
|
|
82babb |
|
|
|
82babb |
It turns out that Ansible was making use of this undocumented behavior,
|
|
|
82babb |
and it's trivial to allow it, so put it back in place and document
|
|
|
82babb |
it this time.
|
|
|
82babb |
|
|
|
82babb |
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
|
|
|
82babb |
Reviewed-by: Christoph Hellwig <hch@lst.de>
|
|
|
82babb |
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
|
|
|
82babb |
---
|
|
|
82babb |
growfs/xfs_growfs.c | 3 +++
|
|
|
82babb |
man/man8/xfs_growfs.8 | 10 +++++++++-
|
|
|
82babb |
2 files changed, 12 insertions(+), 1 deletion(-)
|
|
|
82babb |
|
|
|
82babb |
diff --git a/growfs/xfs_growfs.c b/growfs/xfs_growfs.c
|
|
|
82babb |
index eab15984..6c62833b 100644
|
|
|
82babb |
--- a/growfs/xfs_growfs.c
|
|
|
82babb |
+++ b/growfs/xfs_growfs.c
|
|
|
82babb |
@@ -141,6 +141,9 @@ main(int argc, char **argv)
|
|
|
82babb |
}
|
|
|
82babb |
|
|
|
82babb |
fs = fs_table_lookup_mount(rpath);
|
|
|
82babb |
+ if (!fs)
|
|
|
82babb |
+ fs = fs_table_lookup_blkdev(rpath);
|
|
|
82babb |
+
|
|
|
82babb |
if (!fs) {
|
|
|
82babb |
fprintf(stderr, _("%s: %s is not a mounted XFS filesystem\n"),
|
|
|
82babb |
progname, argv[optind]);
|
|
|
82babb |
diff --git a/man/man8/xfs_growfs.8 b/man/man8/xfs_growfs.8
|
|
|
82babb |
index 7e6a387c..60a88189 100644
|
|
|
82babb |
--- a/man/man8/xfs_growfs.8
|
|
|
82babb |
+++ b/man/man8/xfs_growfs.8
|
|
|
82babb |
@@ -35,7 +35,12 @@ xfs_growfs \- expand an XFS filesystem
|
|
|
82babb |
.B \-R
|
|
|
82babb |
.I size
|
|
|
82babb |
]
|
|
|
82babb |
+[
|
|
|
82babb |
.I mount-point
|
|
|
82babb |
+|
|
|
|
82babb |
+.I block-device
|
|
|
82babb |
+]
|
|
|
82babb |
+
|
|
|
82babb |
.br
|
|
|
82babb |
.B xfs_growfs \-V
|
|
|
82babb |
.SH DESCRIPTION
|
|
|
82babb |
@@ -45,7 +50,10 @@ expands an existing XFS filesystem (see
|
|
|
82babb |
The
|
|
|
82babb |
.I mount-point
|
|
|
82babb |
argument is the pathname of the directory where the filesystem
|
|
|
82babb |
-is mounted. The filesystem must be mounted to be grown (see
|
|
|
82babb |
+is mounted. The
|
|
|
82babb |
+.I block-device
|
|
|
82babb |
+argument is the device name of a mounted XFS filesystem.
|
|
|
82babb |
+The filesystem must be mounted to be grown (see
|
|
|
82babb |
.BR mount (8)).
|
|
|
82babb |
The existing contents of the filesystem are undisturbed, and the added space
|
|
|
82babb |
becomes available for additional file storage.
|
|
|
82babb |
--
|
|
|
82babb |
2.17.0
|
|
|
82babb |
|