mc mb
Creates buckets on local cluster/fabric or on remote fabrics present on the global namespace.
Syntax
- CLI
-
mc mb [FLAGS] TARGET FLAGS: --account value specify account that bucket should be created in --ignore-existing, -p ignore if bucket/directory already exists --with-lock, -l enable object lock --disable-versioning, -d disable object versioning --cluster value cluster where bucket should be created --storage-optimized-ec create storage-optimized EC bucket --json enable JSON lines formatted output --debug enable debug output --insecure disable SSL certificate verification --help, -h show help
Parameters
| Parameter | Description |
|---|---|
TARGET |
The target string that includes the alias of a configured HPE Data Fabric Object Store deployment on which the command
creates buckets. This is a mandatory parameter. To create buckets
from a remote cluster/fabric in the global namespace use the format
<fabricname>-<bucketname> instead of only
the <bucketname> after the alias, that is
<alias>/<fabricname>-<bucketname>.When
bucketname is mentioned without the fabric name, Data Fabric creates a
bucket with the specified name on the local cluster. |
account |
The account on which the bucket is to be created. If not specified,
buckets are created in the default account. |
ignore-existing |
Ignores creation if the bucket already exists. |
with-lock |
Enables object locking for the bucket. |
disable-versioning |
Disables bucket versions. By default, bucket versions are enabled. |
cluster |
Name of the cluster or fabric to which the bucket belongs. |
storage-optimized-ec |
Set to true to enable inline erasure coding on the
bucket. The default value is true. If the value is set
to false, erasure coding is enabled. |
json |
Enable JSON formatted output. |
debug |
Enable output for debugging. |
insecure |
Disable SSL verification. |
help |
Show this help. |
ATTENTION
When you name a bucket, do not include
mapr. as a prefix for the bucket name. For example,
mapr.bucket1 is not supported.Examples
NOTE
For the following examples, the object store deployment is identified by the alias
salesalias.- Create a bucket named northamerica in the Object Store deployment with alias
salesalias:
- CLI
-
/opt/mapr/bin/mc mb salesalias/northamerica
- Create a folder called brickfire inside the bucket named northamerica
in the Object Store deployment that is identified by the alias salesalias:
- CLI
-
/opt/mapr/bin/mc mb salesalias/northamerica/brickfire
- Create a bucket named northamerica on the remote fabric
sales on the default account in the Object Store deployment with alias
salesalias:
- CLI
-
/opt/mapr/bin/mc mb --account=default salesalias/northamerica --cluster sales
- Create a bucket named myregionbucket with object versioning disabled:
- CLI
-
mc mb --disable-versioning myminio/myregionbucket
- Create a bucket named mybucket on the account named myaccount:
- CLI
-
mc mb --account myaccount myminio/mybucket
- Create a bucket named mybucket on Amazon S3 cloud storage:
- CLI
-
mc mb s3/mynewbucket
- Create a bucket named miniocloud on Google Cloud storage:
- CLI
-
/opt/mapr/bin/mc mb --disable-versioning --account=default salesalias/sales-northamerica
- Create a new directory including its missing parents (equivalent to 'mkdir -p').:
- CLI
-
mc mb /tmp/this/new/dir1
- Create multiple directories including the missing parents (behavior similar to
'mkdir -p').:
- CLI
-
mc mb /mnt/sdb/mydisk /mnt/sdc/mydisk /mnt/sdd/mydisk
- Create a bucket named miniocloud on Google Cloud storage:
- CLI
-
/opt/mapr/bin/mc mb --disable-versioning --account=default salesalias/sales-northamerica
- Create an instant tiered bucket named myregionbucket. Inline erasure coding
is enabled in this case:
- CLI
-
mc mb --ectype=instant myminio/myregionbucket
- Create a schedule tiered EC bucket named myregionbucket. non-inline erasure
coding/scheduled tiering is enabled and inline erasure coding/instant tiering is
disabled in this case:
- CLI
-
mc mb --ectype=scheduled myminio/myregionbucket