LV Write Access 读/写(激活只读)问题

LV Write Access 读/写(激活只读)问题

我有centos 7 64位

我收到这个错误:

Sep  7 10:03:11 nginx kernel: Buffer I/O error on device dm-8, logical block 18989734

Sep  7 13:07:38 nginx kernel: EXT4-fs error (device dm-8): htree_dirblock_to_tree:915: inode #4194380: block 16785475: comm qmgr: bad entry in directory: rec_len is smaller than minimal - offset=0, inode=0, rec_len=0, name_len=0, size=4096

Sep  7 13:40:27 nginx systemd: dm-event.service stop-sigterm timed out. Killing.
Sep  7 13:40:27 nginx systemd: dm-event.service: main process exited, code=killed, status=9/KILL
Sep  7 13:40:27 nginx systemd: Stopped Device-mapper event daemon.
Sep  7 13:40:27 nginx systemd: Unit dm-event.service entered failed state.
Sep  7 13:40:27 nginx systemd: dm-event.service failed.
Sep  7 13:40:28 nginx systemd: lvm2-lvmetad.service stop-sigterm timed out. Killing.
Sep  7 13:40:28 nginx systemd: Stopped LVM2 metadata daemon.
Sep  7 13:40:28 nginx systemd: Unit lvm2-lvmetad.service entered failed state.
Sep  7 13:40:28 nginx systemd: lvm2-lvmetad.service failed.

我检查并发现我的 pool00_tmeta 分区是只读访问权限

 lvdisplay --maps
  --- Logical volume ---
  LV Name                pool00
  VG Name                centos
  LV UUID                QWcH2H-AiLN-FWB1-suzM-eUbz-FIdM-yJ2fSz
  LV Write Access        read/write (activated read only)
  LV Creation host, time localhost, 2001-06-06 12:16:20 +0430
  LV Pool metadata       pool00_tmeta
  LV Pool data           pool00_tdata
  LV Status              available
  # open                 5
  LV Size                207.17 GiB
  Allocated pool data    10.15%
  Allocated metadata     21.32%
  Current LE             53036
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:2

  --- Segments ---
  Logical extents 0 to 53035:
    Type                thin-pool
    Monitoring          not monitored
    Chunk size          64.00 KiB
    Discards            passdown
    Thin count          4
    Transaction ID      4
    Zero new blocks     yes

我尝试使用此命令将其变为 rw 但它不起作用:

 lvchange -prw -ay centos/pool00
  Command on LV centos/pool00 uses options invalid with LV type thinpool.
  Command not permitted on LV centos/pool00.

这是我的分区:

 ls -lh
total 0
lrwxrwxrwx. 1 root root       7 Sep  7 12:30 centos-home -> ../dm-6
lrwxrwxrwx. 1 root root       7 Sep  7 12:30 centos-pool00 -> ../dm-5
lrwxrwxrwx. 1 root root       7 Sep  7 12:30 centos-pool00_tdata -> ../dm-1
lrwxrwxrwx. 1 root root       7 Sep  7 12:30 centos-pool00_tmeta -> ../dm-0
lrwxrwxrwx. 1 root root       7 Sep  7 12:30 centos-pool00-tpool -> ../dm-2
lrwxrwxrwx. 1 root root       7 Sep  7 12:30 centos-root -> ../dm-3
lrwxrwxrwx. 1 root root       7 Sep  7 12:30 centos-swap -> ../dm-4
lrwxrwxrwx. 1 root root       7 Sep  7 12:30 centos-tmp -> ../dm-7
lrwxrwxrwx. 1 root root       7 Sep  7 12:30 centos-var -> ../dm-8
crw-------. 1 root root 10, 236 Sep  7 12:30 control
 lvs -a --units m
  LV              VG     Attr       LSize      Pool   Origin Data%  Meta%  Move Log Cpy%Sync Convert
  home            centos Vwi-aotz--   2048.00m pool00        4.76
  [lvol0_pmspare] centos ewi-------     96.00m
  pool00          centos twi-aotz-- 212144.00m               10.14  21.32
  [pool00_tdata]  centos Twi-ao---- 212144.00m
  [pool00_tmeta]  centos ewi-ao----     96.00m
  root            centos Vwi-aotz--  19456.00m pool00        13.83
  swap            centos -wi-ao----  32768.00m
  tmp             centos Vwi-aotz-- 102396.00m pool00        1.72
  var             centos Vwi-aotz--  88244.00m pool00        19.23

这是/etc/fstab


#
# /etc/fstab
# Created by anaconda on Wed Jun  6 12:16:24 2001
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/centos-root /                       ext4    defaults        1 1
UUID=55af2dce-d08a-4e6d-9194-afcf5f20a24b /boot                   ext4    defaults        1 2
/dev/mapper/centos-home /home                   ext4    defaults        1 2
/dev/mapper/centos-tmp  /tmp                    ext4    defaults        1 2
/dev/mapper/centos-var  /var                    ext4    defaults        1 2
/dev/mapper/centos-swap swap                    swap    defaults        0 0

 pvs
  PV         VG     Fmt  Attr PSize    PFree
  /dev/sda2  centos lvm2 a--  <299.00g <59.64g
[root@nginx ~]# smartctl -a   /dev/sda
smartctl 7.0 2018-12-30 r4883 [x86_64-linux-3.10.0-1160.62.1.el7.x86_64] (local build)
Copyright (C) 2002-18, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor:               VMware
Product:              Virtual disk
Revision:             2.0
Compliance:           SPC-4
User Capacity:        322,122,547,200 bytes [322 GB]
Logical block size:   512 bytes
LU is thin provisioned, LBPRZ=1
Device type:          disk
Local Time is:        Wed Sep  7 18:26:24 2022 +0430
SMART support is:     Unavailable - device lacks SMART capability.

=== START OF READ SMART DATA SECTION ===
Current Drive Temperature:     0 C
Drive Trip Temperature:        0 C

Error Counter logging not supported

Device does not support Self Test logging

vmware中很难 在此输入图像描述

当我重新启动操作系统时,在启动时需要发送 CTRL+D 来启动

如何将 this 从只读挂载为读写

谁能帮我?

答案1

这是一个虚拟磁盘。检查您的底层主机是否没有用完磁盘空间

相关内容