O_DIRECT writes not works for XFS on disks with 4K sectors
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Fuel for OpenStack |
Fix Committed
|
High
|
Vladimir Kozhukalov | ||
4.1.x |
Fix Committed
|
High
|
Vladimir Kuklin | ||
5.0.x |
Fix Committed
|
High
|
Vladimir Kozhukalov |
Bug Description
Description:
File injection fails with http://
Environment:
- Fuel 4.1A
- HA + Neutron GRE
- CentOS
- Cisco C240 M3S servers + LSI Logic / Symbios Logic MegaRAID SAS 2208
Steps to reproduce:
- Use disk with 4K sectors for "Virtual Storage"
- Deploy Cluster on CentOS (Simple or HA no matter)
- try to create VM with file injection: nova boot --flavor 1 --image TestVM --file file=openc VM1
Expected result:
- VM status ACTIVE
Actual result:
- VM status ERROR
Details:
Disk has logical sector=512b and physical=4096b
XFS uses sector size = 4096 bytes .
And unfortunately in that case XFS unable to provide O_DIRECT writes. (that are used by guestfs - "cache=none" option)
I've found fresh patch in mailing lists that works around this issue http://
To check issue:
guestfish -a /var/lib/
libguestfs: error: guestfs_launch failed.
See http://
and/or run 'libguestfs-
or
dd if=/var/
dd: reading `/var/lib/
0+0 records in
0+0 records out
0 bytes (0 B) copied, 0.000131719 s, 0.0 kB/s
# parted /dev/sdj print
Model: LSI MR9271-8i (scsi)
Disk /dev/sdj: 1797GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Number Start End Size File system Name Flags
1 17.4kB 25.2MB 25.1MB primary bios_grub
2 25.2MB 235MB 210MB primary boot
3 235MB 445MB 210MB ext2 primary boot
4 445MB 1797GB 1796GB primary lvm
# xfs_info /var/lib/nova/
meta-data=
= sectsz=4096 attr=2, projid32bit=0
data = bsize=4096 blocks=438566912, imaxpct=5
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0
log =internal bsize=4096 blocks=214144, version=2
= sectsz=4096 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
Workaround:
On live system:
- recreate XFS with sector size=512
/etc/init.
cd /var/lib/
cp -a nova nova2
umount nova
mkfs.xfs -f -s size=512 /dev/vm/nova
mount -a
cp -a nova2/* nova
/etc/init.
In fuel:
use ext4 for "virtual storage"
In nailgun/
tags: | added: nailgun |
Changed in fuel: | |
milestone: | none → 5.0 |
tags: | added: backports-4.1.1 |
Changed in fuel: | |
assignee: | nobody → Vladimir Kozhukalov (kozhukalov) |
Changed in fuel: | |
importance: | Undecided → Medium |
milestone: | 5.0 → 5.1 |
tags: | added: release-notes |
Changed in fuel: | |
milestone: | 5.1 → 5.0 |
importance: | Medium → High |
Changed in fuel: | |
status: | New → Triaged |
Changed in fuel: | |
assignee: | Vladimir Kozhukalov (kozhukalov) → Sergii Golovatiuk (sgolovatiuk) |
Changed in fuel: | |
status: | In Progress → Fix Committed |
Changed in fuel: | |
assignee: | Sergii Golovatiuk (sgolovatiuk) → Vladimir Kozhukalov (kozhukalov) |
Fix proposed to branch: master /review. openstack. org/92849
Review: https:/