我尝试在现有卷组下创建逻辑卷,但由于错误而无法安装新 LV:“尝试打开时超级块中的幻数错误”:
[root@host-xxxx ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_redhat601-LogVol00
29G 4.5G 23G 17% /
tmpfs 16G 72K 16G 1% /dev/shm
/dev/vda5 190M 38M 143M 21% /boot
/dev/mapper/vg_redhat6-LogVol00
33G 48M 31G 1% /AMS
[root@host-xxxx ~]# vgdisplay vg_redhat6
--- Volume group ---
VG Name vg_redhat6
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 8
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 2
Act PV 2
VG Size 70.96 GiB
PE Size 4.00 MiB
Total PE 18167
Alloc PE / Size 8448 / 33.00 GiB
Free PE / Size 9719 / 37.96 GiB
VG UUID 6YbIIs-OBJe-PGyV-Pwsl-VLGX-Jrf2-1SgJUZ
如上可以看到,vg_redhat6 VG下还有37.96G的可用空间。于是,我决定创建一个大小为15G的LV:
[root@host-xxxx ~]# lvcreate -L 15G -n LogVol01 vg_redhat6
Logical volume "LogVol01" created.
[root@host-xxxx ~]# lvdisplay /dev/vg_redhat6/LogVol01
--- Logical volume ---
LV Path /dev/vg_redhat6/LogVol01
LV Name LogVol01
VG Name vg_redhat6
LV UUID 2FWKKM-mcbQ-RoCk-H2jc-0Jbt-nuha-KqYGtX
LV Write Access read/write
LV Creation host, time host-135-249-45-28, 2016-04-08 14:44:00 +0530
LV Status available
# open 0
LV Size 15.00 GiB
Current LE 3840
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:3
当我在相关 LV 上运行 e2fsck 时,我看到以下错误:
[root@host-xxxx ~]# e2fsck /dev/vg_redhat6/LogVol01 e2fsck 1.41.12 (17-May-2010) e2fsck: Superblock invalid, trying backup blocks... e2fsck: Bad magic number in super-block while trying to open /dev/vg_redhat6/LogVol01
The superblock could not be read or does not describe a correct ext2 filesystem. If the device is valid and it really contains an ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
由于上述错误,我无法挂载这个新的 LV。我在谷歌上进行了一些搜索,但找不到任何有用的建议。您以前遇到过这个问题吗?您知道如何克服这个问题吗?
答案1
您已经创建了一个卷——一个可以存储信息的空白空间。你无法挂载它,因为挂载的是文件系统——信息结构。挂载使文件系统在目录中可见。
使用适当的mkfs
命令在卷上创建文件系统,例如创建 ext4 文件系统(Linux 上的事实上的标准)运行(以 root 身份)mkfs.ext4 /dev/vg_redhat6/LogVol01