Creating a realm

Use the realm create command to create a realm.

About this task

Make one realm in the list of realms be the default realm. If there is only one realm and it wasn’t specified as the default realm when it was created, make it the default realm.

Procedure

  • Create a realm.
    radosgw-admin realm create --rgw-realm=REALM_NAME
    For example,
    [ceph: root@host01 /]# radosgw-admin realm create --rgw-realm=test_realm
    In this example, test_realm becomes the default realm.
    Important: Do not use the realm with the --default flag if the data and metadata are stored in the default.rgw.data and default.rgw.index pools. If a new realm 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 realm 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 realm setup or avoid setting the new realm 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 realm is called implicitly with each radosgw-admin call unless --rgw-realm and the realm name are explicitly provided.

  • Optional: Change the default realm.
    radosgw-admin realm default --rgw-realm=REALM_NAME
    For example,
    [ceph: root@host01 /]# radosgw-admin realm default --rgw-realm=test_realm1