此内容没有您所选择的语言版本。
10.3. Expanding Volumes
Volumes can be expanded while the trusted storage pool is online and available. For example, you can add a brick to a distributed volume, which increases distribution and adds capacity to the Red Hat Gluster Storage volume. Similarly, you can add a group of bricks to a replicated or distributed replicated volume, which increases the capacity of the Red Hat Gluster Storage volume.
Note
When expanding replicated or distributed replicated volumes, the number of bricks being added must be a multiple of the replica count. For example, to expand a distributed replicated volume with a replica count of 2, you need to add bricks in multiples of 2 (such as 4, 6, 8, etc.).
Expanding a Volume
- From any server in the trusted storage pool, use the following command to probe the server on which you want to add a new brick :
gluster peer probe HOSTNAME
# gluster peer probe HOSTNAME# gluster peer probe HOSTNAME
Copy to Clipboard Copied! Toggle word wrap Toggle overflow For example:gluster peer probe server5 gluster peer probe server6
# gluster peer probe server5 Probe successful # gluster peer probe server6 Probe successful
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Add the bricks using the following command:
gluster volume add-brick VOLNAME NEW_BRICK
# gluster volume add-brick VOLNAME NEW_BRICK# gluster volume add-brick VOLNAME NEW_BRICK# gluster volume add-brick VOLNAME NEW_BRICK
Copy to Clipboard Copied! Toggle word wrap Toggle overflow For example:gluster volume add-brick test-volume server5:/exp5 server6:/exp6
# gluster volume add-brick test-volume server5:/exp5 server6:/exp6 Add Brick successful
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Check the volume information using the following command:
gluster volume info
# gluster volume info
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The command output displays information similar to the following:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Rebalance the volume to ensure that files will be distributed to the new brick. Use the rebalance command as described in Section 10.7, “Rebalancing Volumes”.The
add-brick
command should be followed by arebalance
operation to ensure better utilization of the added bricks.
10.3.1. Expanding a Tiered Volume 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
You can add a group of bricks to a cold tier volume and to the hot tier volume to increase the capacity of the Red Hat Gluster Storage volume.
10.3.1.1. Expanding a Cold Tier Volume 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
Expanding a cold tier volume is same as a non-tiered volume. If you are reusing the brick, ensure to perform the steps listed in “Reusing a Brick from a Deleted Volume” section.
- Detach the tier by performing the steps listed in Section 12.7, “Detaching a Tier from a Volume”
- From any server in the trusted storage pool, use the following command to probe the server on which you want to add a new brick :
gluster peer probe HOSTNAME
# gluster peer probe HOSTNAME# gluster peer probe HOSTNAME
Copy to Clipboard Copied! Toggle word wrap Toggle overflow For example:gluster peer probe server5 gluster peer probe server6
# gluster peer probe server5 Probe successful # gluster peer probe server6 Probe successful
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Add the bricks using the following command:
gluster volume add-brick VOLNAME NEW_BRICK
# gluster volume add-brick VOLNAME NEW_BRICK# gluster volume add-brick VOLNAME NEW_BRICK# gluster volume add-brick VOLNAME NEW_BRICK
Copy to Clipboard Copied! Toggle word wrap Toggle overflow For example:gluster volume add-brick test-volume server5:/exp5 server6:/exp6
# gluster volume add-brick test-volume server5:/exp5 server6:/exp6
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Rebalance the volume to ensure that files will be distributed to the new brick. Use the rebalance command as described in Section 10.7, “Rebalancing Volumes”.The
add-brick
command should be followed by arebalance
operation to ensure better utilization of the added bricks. - Reattach the tier to the volume with both old and new (expanded) bricks:
# gluster volume tier VOLNAME attach [replica COUNT] NEW-BRICK...
Important
When you reattach a tier, an internal process called fix-layout commences internally to prepare the hot tier for use. This process takes time and there will a delay in starting the tiering activities.If you are reusing the brick, be sure to clearly wipe the existing data before attaching it to the tiered volume.
10.3.1.2. Expanding a Hot Tier Volume 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
You can expand a hot tier volume by attaching and adding bricks for the hot tier.
- Detach the tier by performing the steps listed in Section 12.7, “Detaching a Tier from a Volume”
- Reattach the tier to the volume with both old and new (expanded) bricks:
# gluster volume tier VOLNAME attach [replica COUNT] NEW-BRICK...
For example,gluster volume tier test-volume attach replica 2 server1:/exp5/tier5 server1:/exp6/tier6
# gluster volume tier test-volume attach replica 2 server1:/exp5/tier5 server1:/exp6/tier6 server2:/exp7/tier7 server2:/exp8/tier8
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Important
When you reattach a tier, an internal process called fix-layout commences internally to prepare the hot tier for use. This process takes time and there will a delay in starting the tiering activities.If you are reusing the brick, be sure to clearly wipe the existing data before attaching it to the tiered volume.