From c5464c54bedbab6bd4c9b3756078889af6a11170 Mon Sep 17 00:00:00 2001 From: Michael Neumann Date: Mon, 7 Dec 2009 18:51:54 +0100 Subject: [PATCH] HAMMER Utility - Allow expanding root filesystems again This reverts commit e3102897c486b844e6a59e419e7e98a0d1ca3246, because as of commit 104cb849cad1c21c8929f73d7654e16c4fb8a268, multi-volume HAMMER root-mounts should work. Please note that "hammer expand" is still considered EXPERIMENTAL. --- sbin/hammer/cmd_expand.c | 18 ------------------ sbin/hammer/hammer.8 | 4 ---- 2 files changed, 22 deletions(-) diff --git a/sbin/hammer/cmd_expand.c b/sbin/hammer/cmd_expand.c index d327d81fed..c093449a12 100644 --- a/sbin/hammer/cmd_expand.c +++ b/sbin/hammer/cmd_expand.c @@ -50,7 +50,6 @@ void hammer_cmd_expand(char **av, int ac) { struct hammer_ioc_expand expand; - struct statfs sfs; int fd; if (ac != 2) @@ -62,23 +61,6 @@ hammer_cmd_expand(char **av, int ac) exit(1); } - /* - * Make sure we aren't trying to expand the root filesystem. The - * kernel can't handle multi-volume root mounts. - */ - if (fstatfs(fd, &sfs) < 0) { - fprintf(stderr, "hammer expand: statvfs failed on %s: %s\n", - av[0], strerror(errno)); - exit(1); - } - if (strcmp(sfs.f_mntonname, "/") == 0 || sfs.f_mntonname[0] == 0) { - fprintf(stderr, - "hammer expand: Refused attempt to expand root fs.\n" - "The kernel is unable to boot from multi-volume\n" - "HAMMER root filesystems.\n"); - exit(1); - } - /* * Expansion ioctl */ diff --git a/sbin/hammer/hammer.8 b/sbin/hammer/hammer.8 index e8dbf71360..0a98cf4682 100644 --- a/sbin/hammer/hammer.8 +++ b/sbin/hammer/hammer.8 @@ -505,10 +505,6 @@ colon-separated to .Pa /etc/fstab and .Xr mount_hammer 8 . -.Pp -Any attempt to expand the root filesystem will fail with an error. -.Dx -is currently unable to boot from a multi-volume root. .\" ==== snapshot ==== .It Cm snapshot Oo Ar filesystem Oc Ar snapshot-dir .It Cm snapshot Ar filesystem Ar snapshot-dir Op Ar note -- 2.41.0