Allow to specify only one disk. This is helpful when we want to extend
our concatenated device later. MFC after: 1 week
This commit is contained in:
parent
87e9d284dc
commit
aaf8e1867b
@ -35,7 +35,7 @@
|
||||
.Cm create
|
||||
.Op Fl v
|
||||
.Ar name
|
||||
.Ar prov prov ...
|
||||
.Ar prov ...
|
||||
.Nm
|
||||
.Cm destroy
|
||||
.Op Fl fv
|
||||
@ -44,7 +44,7 @@
|
||||
.Cm label
|
||||
.Op Fl hv
|
||||
.Ar name
|
||||
.Ar prov prov ...
|
||||
.Ar prov ...
|
||||
.Nm
|
||||
.Cm stop
|
||||
.Op Fl fv
|
||||
@ -168,10 +168,21 @@ umount /mnt
|
||||
gconcat stop data
|
||||
gconcat unload
|
||||
.Ed
|
||||
.Pp
|
||||
Configure concatenated provider on one disk only.
|
||||
Create file system.
|
||||
Add two more disks and extend existing file system.
|
||||
.Bd -literal -offset indent
|
||||
gconcat label data /dev/da0
|
||||
newfs /dev/concat/data
|
||||
gconcat label data /dev/da0 /dev/da1 /dev/da2
|
||||
growfs /dev/concat/data
|
||||
.Ed
|
||||
.Sh SEE ALSO
|
||||
.Xr geom 4 ,
|
||||
.Xr loader.conf 5 ,
|
||||
.Xr geom 8 ,
|
||||
.Xr growfs 8 ,
|
||||
.Xr mount 8 ,
|
||||
.Xr newfs 8 ,
|
||||
.Xr sysctl 8 ,
|
||||
|
@ -55,7 +55,7 @@ struct g_command class_commands[] = {
|
||||
"[-v] prov ..."
|
||||
},
|
||||
{ "create", G_FLAG_VERBOSE | G_FLAG_LOADKLD, NULL, G_NULL_OPTS,
|
||||
"[-v] name prov prov ..."
|
||||
"[-v] name prov ..."
|
||||
},
|
||||
{ "destroy", G_FLAG_VERBOSE, NULL,
|
||||
{
|
||||
@ -72,7 +72,7 @@ struct g_command class_commands[] = {
|
||||
{ 'h', "hardcode", NULL, G_TYPE_NONE },
|
||||
G_OPT_SENTINEL
|
||||
},
|
||||
"[-hv] name prov prov ..."
|
||||
"[-hv] name prov ..."
|
||||
},
|
||||
{ "stop", G_FLAG_VERBOSE, NULL,
|
||||
{
|
||||
@ -118,7 +118,7 @@ concat_label(struct gctl_req *req)
|
||||
int error, i, hardcode, nargs;
|
||||
|
||||
nargs = gctl_get_int(req, "nargs");
|
||||
if (nargs <= 2) {
|
||||
if (nargs < 2) {
|
||||
gctl_error(req, "Too few arguments.");
|
||||
return;
|
||||
}
|
||||
|
@ -452,8 +452,8 @@ g_concat_create(struct g_class *mp, const struct g_concat_metadata *md,
|
||||
G_CONCAT_DEBUG(1, "Creating device %s (id=%u).", md->md_name,
|
||||
md->md_id);
|
||||
|
||||
/* Two disks is minimum. */
|
||||
if (md->md_all <= 1)
|
||||
/* One disks is minimum. */
|
||||
if (md->md_all < 1)
|
||||
return (NULL);
|
||||
|
||||
/* Check for duplicate unit */
|
||||
@ -664,7 +664,7 @@ g_concat_ctl_create(struct gctl_req *req, struct g_class *mp)
|
||||
gctl_error(req, "No '%s' argument.", "nargs");
|
||||
return;
|
||||
}
|
||||
if (*nargs <= 2) {
|
||||
if (*nargs < 2) {
|
||||
gctl_error(req, "Too few arguments.");
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user