![ubuntu 20.04 LTS mkfs.xfs 在 GCE GCP 上的 nvme 磁盘中创建 xfs 时出现问题](https://linux22.com/image/211784/ubuntu%2020.04%20LTS%20mkfs.xfs%20%E5%9C%A8%20GCE%20GCP%20%E4%B8%8A%E7%9A%84%20nvme%20%E7%A3%81%E7%9B%98%E4%B8%AD%E5%88%9B%E5%BB%BA%20xfs%20%E6%97%B6%E5%87%BA%E7%8E%B0%E9%97%AE%E9%A2%98.png)
尝试在 GCP 的 ubuntu 20.04 中以 NVMe 磁盘类型创建 xfs 分区会引发以下错误:
ubuntu 20.04 , nvme disk
root@my-euwe3a-vm:/home/myuser# mkfs.xfs /dev/myvg1/my_lv
meta-data=/dev/myvg1/my_lv isize=512 agcount=4, agsize=327680 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=1, sparse=1, rmapbt=0
= reflink=1
data = bsize=4096 blocks=1310720, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0, ftype=1
log =internal log bsize=4096 blocks=2560, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
mkfs.xfs: pwrite failed: Input/output error
在同一逻辑卷(lv)中将其创建为 ext4 正在按预期工作...
请指教?
machine type: n2d-standard-4
OS image: ubuntu-pro-fips-2004-focal-v20220829
additional disk: NVMe
lv显示
--- Logical volume ---
LV Path /dev/myvg1/my_lv
LV Name my_lv
VG Name myvg1
LV UUID YnXOLf-TORp-qB87-cwfy-KeEd-qHqy-dUngE5
LV Write Access read/write
LV Creation host, time my-vm, 2022-10-06 12:42:20 +0000
LV Status available
# open 1
LV Size 2.00 GiB
Current LE 512
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:4
光伏发电
File descriptor 3 (/dev/urandom) leaked on pvs invocation. Parent PID 51678: bash
PV VG Fmt Attr PSize PFree
/dev/nvme0n2 myvg1 lvm2 a-- <32.00g 1020.00m
答案1
Ubuntu 22.04 LTS 中似乎没有出现该问题,因此看起来mkfs.xfs
Ubuntu 20.04 中与 SSD NVMe 不兼容。