hammer_cmd_expand(char **av, int ac)
{
struct hammer_ioc_expand expand;
- struct statfs sfs;
int fd;
if (ac != 2)
}
/*
- * 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
*/
bzero(&expand, sizeof(expand));
.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