Why warning message "device is not properly aligned" is received when creating a thinly provisioned volume in RHS3.0 ?
Environment
- Red Hat Gluster Server 3.0
- RAID 6 (12 drives)
Issue
- Why warning message "device is not properly aligned" is received when creating a thinly provisioned volume in RHS3.0 ?
~ Snippet from terminal:
[root@test ~]# pvcreate --dataalignment 1280K /dev/sdc
Physical volume "/dev/sdc" successfully created
[root@test ~]# vgcreate --physicalextentsize 128K vg03 /dev/sdc
Volume group "vg03" successfully created
[root@test ~]# lvcreate -L 16776960K -n lv_meta vg03
Logical volume "lv_meta" created
[root@test ~]# lvcreate -L 2147482880K -n lv_pool vg03
Logical volume "lv_pool" created
[root@test ~]# lvconvert --chunksize=1280K --thinpool vg03/lv_pool --poolmetadata vg03/lv_meta WARNING: Converting logical volume vg03/lv_pool and vg03/lv_meta to pool's data and metadata volumes.
THIS WILL DESTROY CONTENT OF LOGICAL VOLUME (filesystem etc.)
Do you really want to convert vg03/lv_pool and vg03/lv_meta? [y/n]: y
Logical volume "lvol0" created
WARNING: Pool zeroing and large 1.25 MiB chunk size slows down provisioning.
Converted vg03/lv_pool to thin pool.
[root@test ~]# lvchange --zero n vg03/lv_pool
Logical volume "lv_pool" changed.
[root@test ~]# lvcreate -V 2147482880K-T vg03/lv_pool -n lv_volume
Logical volume "lv_volume" created
[root@test ~]# mkfs -t xfs -i size=512 -n size=8192 -d su=128k,sw=10 /dev/vg03/lv_volume
warning: device is not properly aligned /dev/vg03/lv_volume
Use -f to force usage of a misaligned device
Resolution
- Issue is fixed when the thin pool is created using a physical volume on a disk partition (/dev/sdc1) instead of using a raw disk/volume (/dev/sdc).
Diagnostic Steps
Steps to Reproduce:
1. pvcreate /dev/device
2. vgcreate vg03 /dev/device
3. Create thin pool,
lvcreate -L <thinpool_size> -T vg03/thinpool
4. Create thin pool volume,
lvcreate -V <thin_volume_size_from_thinpool> -T vg03/thinpool -n thinvolume
5. Format the thin pool volume with xfs,
mkfs -t xfs -i size=512 -n size=8192 -d su=128k,sw=10 /dev/vg03/thinvolume
Test Output:
# cat /etc/redhat-storage-release
Red Hat Storage Server 3.0 Update 3
# uname -r
2.6.32-504.el6.x86_64
[root@rhs3_geo_rep_node2 ~]# lvconvert --chunksize=1280K --thinpool vg03/lv_pool
WARNING: Converting logical volume vg03/lv_pool to pool's data volume.
THIS WILL DESTROY CONTENT OF LOGICAL VOLUME (filesystem etc.)
Do you really want to convert vg03/lv_pool? [y/n]: y
Logical volume "lvol0" created
Logical volume "lvol0" created
WARNING: Pool zeroing and large 1.25 MiB chunk size slows down provisioning.
Converted vg03/lv_pool to thin pool.
[root@rhs3_geo_rep_node2 ~]# lvchange --zero n vg03/lv_pool
Logical volume "lv_pool" changed.
[root@rhs3_geo_rep_node2 ~]# lvcreate -V 9G -T vg03/lv_pool -n lv_volume
Rounding size (73728 extents) up to chunk boundary size (73730 extents).
Logical volume "lv_volume" created
[root@rhs3_geo_rep_node2 ~]# mkfs -t xfs -i size=512 -n size=8192 -d su=128k,sw=10 /dev/vg03/lv_volume
warning: device is not properly aligned /dev/vg03/lv_volume
Use -f to force usage of a misaligned device
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments