Creating a zone

Create a zone by specifying a zone name.

About this task

If it is a master zone, specify the --master option. Only one zone in a zone group can be a master zone. To add the zone to a zone group, specify the --rgw-zonegroup option with the zone group name.
Important: Zones must be created on a Ceph Object Gateway node that will be within the zone.
Important: Do not use the zone with the --default flag if the data and metadata are stored in the default.rgw.data and default.rgw.index pools. If a new zone is set as the default and these pools contain important data, the radosgw-admin utility can fail to manage this data properly.

Only use the --default flag if necessary to specify the zone as the default and if you do not need the existing data or metadata in the default.rgw pools. If the existing data or metadata is needed, either migrate the default configuration to a multi-site or zone setup or avoid setting the new zone as the default. For more information about migrating to a multi-site, see Migrating a single site system to multi-site. By specifying --default, the zone is called implicitly with each radosgw-admin call unless --rgw-zone and the zone name are explicitly provided.

Procedure

  1. Create the zone.
    radosgw-admin zone create --rgw-zone=ZONE_NAME 
                    [--zonegroup=ZONE_GROUP_NAME]
                    [--endpoints=ENDPOINT_PORT [,<endpoint:port>] 
                    [--master] [--default] 
                    --access-key ACCESS_KEY --secret SECRET_KEY
  2. Commit the change.
    radosgw-admin period update --commit
    For example,
    [ceph: root@host01 /]# radosgw-admin period update --commit