1
0
mirror of https://github.com/gluster/glusterdocs.git synced 2026-02-06 00:48:24 +01:00

Update Setting up Volumes

Fix all single commands to be prefexed by `#` and multi output to be indented
This commit is contained in:
Tim Coombs
2016-10-19 19:53:34 +11:00
committed by Tim Coombs
parent 0df0a662ce
commit dc069532cb

View File

@@ -17,7 +17,7 @@ To create a thinly provisioned logical volume, proceed with the following steps:
1. Create a physical volume(PV) by using the pvcreate command.
For example:
`pvcreate --dataalignment 1280K /dev/sdb`
`# pvcreate --dataalignment 1280K /dev/sdb`
Here, /dev/sdb is a storage device.
Use the correct dataalignment option based on your device.
@@ -26,11 +26,10 @@ To create a thinly provisioned logical volume, proceed with the following steps:
>
>The device name and the alignment value will vary based on the device you are using.
2. Create a Volume Group (VG) from the PV using the vgcreate command:
2. Create a Volume Group (VG) from the PV using the vgcreate command:
For example:
For example:
`vgcreate --physicalextentsize 128K gfs_vg /dev/sdb`
`# vgcreate --physicalextentsize 128K gfs_vg /dev/sdb`
It is recommended that only one VG must be created from one storage device.
@@ -38,43 +37,43 @@ For example:
1. Create an LV to serve as the metadata device using the following command:
`lvcreate -L metadev_sz --name metadata_device_name VOLGROUP`
`# lvcreate -L metadev_sz --name metadata_device_name VOLGROUP`
For example:
`lvcreate -L 16776960K --name gfs_pool_meta gfs_vg`
`# lvcreate -L 16776960K --name gfs_pool_meta gfs_vg`
2. Create an LV to serve as the data device using the following command:
`lvcreate -L datadev_sz --name thin_pool VOLGROUP`
`# lvcreate -L datadev_sz --name thin_pool VOLGROUP`
For example:
`lvcreate -L 536870400K --name gfs_pool gfs_vg`
`# lvcreate -L 536870400K --name gfs_pool gfs_vg`
3. Create a thin pool from the data LV and the metadata LV using the following command:
`lvconvert --chunksize STRIPE_WIDTH --thinpool VOLGROUP/thin_pool --poolmetadata VOLGROUP/metadata_device_name`
`# lvconvert --chunksize STRIPE_WIDTH --thinpool VOLGROUP/thin_pool --poolmetadata VOLGROUP/metadata_device_name`
For example:
`lvconvert --chunksize 1280K --thinpool gfs_vg/gfs_pool --poolmetadata gfs_vg/gfs_pool_meta`
`# lvconvert --chunksize 1280K --thinpool gfs_vg/gfs_pool --poolmetadata gfs_vg/gfs_pool_meta`
>**Note**
>
>By default, the newly provisioned chunks in a thin pool are zeroed to prevent data leaking between different block devices.
`lvchange --zero n VOLGROUP/thin_pool`
`# lvchange --zero n VOLGROUP/thin_pool`
For example:
`lvchange --zero n gfs_vg/gfs_pool`
`# lvchange --zero n gfs_vg/gfs_pool`
4. Create a thinly provisioned volume from the previously created pool using the lvcreate command:
For example:
`lvcreate -V 1G -T gfs_vg/gfs_pool -n gfs_lv`
`# lvcreate -V 1G -T gfs_vg/gfs_pool -n gfs_lv`
It is recommended that only one LV should be created in a thin pool.
@@ -86,14 +85,14 @@ Format bricks using the supported XFS configuration, mount the bricks, and verif
Add an entry in /etc/fstab:
`/dev/gfs_vg/gfs_lv /mountpoint xfs rw,inode64,noatime,nouuid 1 2`
/dev/gfs_vg/gfs_lv /mountpoint xfs rw,inode64,noatime,nouuid 1 2
Run `# mount /mountpoint` to mount the brick.
Run the `df -h` command to verify the brick is successfully mounted:
`# df -h
/dev/gfs_vg/gfs_lv 16G 1.2G 15G 7% /exp1`
# df -h
/dev/gfs_vg/gfs_lv 16G 1.2G 15G 7% /exp1
- Volumes of the following types can be created in your storage
environment:
@@ -272,7 +271,7 @@ Arbiter volumes are replica 3 volumes where the 3rd brick acts as the arbiter b
It can be created with the following command:
# gluster volume create <VOLNAME> replica 3 arbiter 1 host1:brick1 host2:brick2 host3:brick3
`# gluster volume create <VOLNAME> replica 3 arbiter 1 host1:brick1 host2:brick2 host3:brick3`
More information about this configuration can be found at *Features : afr-arbiter-volumes*
@@ -296,7 +295,7 @@ environments accessing very large files.
2. Create the striped volume:
# gluster volume create [stripe ] [transport tcp | rdma | tcp,rdma]
`# gluster volume create [stripe ] [transport tcp | rdma | tcp,rdma]`
For example, to create a striped volume across two storage servers: