LVM 将不会挂载 RW

LVM 将不会挂载 RW

我有一个想要挂载的 LVM,但由于某种原因我无法将其挂载到 RW。它只会挂载 RO。

这是PV。

[root@SEAScoutDB01 mnt]# pvdisplay /dev/sda2
  "/dev/sda2" is a new physical volume of "99.51 GiB"
  --- NEW Physical volume ---
  PV Name               /dev/sda2
  VG Name
  PV Size               99.51 GiB
  Allocatable           NO
  PE Size               0
  Total PE              0
  Free PE               0
  Allocated PE          0
  PV UUID               vOas0J-dMfE-YYUf-jPu1-0vgX-VJzW-vanf8a

这是VG。注意它是读/写的。

[root@SEAScoutDB01 mnt]# vgdisplay arm
  --- Volume group ---
  VG Name               arm
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  1
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                0
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               99.51 GiB
  PE Size               4.00 MiB
  Total PE              25474
  Alloc PE / Size       0 / 0
  Free  PE / Size       25474 / 99.51 GiB
  VG UUID               wEL5E8-I4Yc-MQJQ-rBJG-Fyob-HXJ6-H8ivzh

这是LV。还要注意它是读/写的。

[root@SEAScoutDB01 mnt]# lvdisplay arm
  --- Logical volume ---
  LV Path                /dev/arm/arm-data
  LV Name                arm-data
  VG Name                arm
  LV UUID                SRK2EO-hm5L-QYyZ-mDMf-ijwn-EkxL-2UhW8g
  LV Write Access        read/write
  LV Creation host, time SEAScoutDB01.ohnoez.lan, 2017-02-27 14:19:51 -0800
  LV Status              available
  # open                 0
  LV Size                99.51 GiB
  Current LE             25474
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     8192
  Block device           253:2

这是/dev/mapper中的设备

[root@SEAScoutDB01 mnt]# ls -l /dev/mapper/*
lrwxrwxrwx. 1 root root       7 Feb 27 14:19 /dev/mapper/arm-arm--data -> ../dm-2

在这里,我正在挂载文件系统,并被告知我显式声明的读/写 LVM 实际上是写保护的。

[root@SEAScoutDB01 mnt]# mount -w /dev/dm-2 /mnt/arm-data
mount: /dev/mapper/arm-arm--data is write-protected but explicit `-w' flag given

这里发生了什么?

答案1

问题原来是我创建卷后没有在卷上放置文件系统。

相关内容