我在学习这个红帽文档,它指出经过验证的存储池应该有一个lost+found
目录来指示它已正确安装。
我已明确遵循文档中的说明,但我的结果(如下所示)不包含目录lost+found
。
该存储池是否已正确安装?为了使下面描述的存储池正确验证,还需要做什么?否则,如果以下内容被验证为正确安装,请解释根本原因。
创建并启动/自动启动存储池:
[root@remote-host ~]# virsh pool-define-as eighthPool fs - - /dev/mapper/centos-eighth - "/eighthPool"
Pool eighthPool defined
[root@remote-host ~]# virsh pool-build eighthPool
Pool eighthPool built
[root@remote-host ~]# virsh pool-start eighthPool
Pool eighthPool started
[root@remote-host ~]# virsh pool-autostart eighthPool
Pool eighthPool marked as autostarted
验证存储池:
[root@remote-host ~]# virsh pool-list --all
Name State Autostart
-------------------------------------------
eighthPool active yes
home active yes
root active yes
someUserName active yes
tmp active yes
[root@remote-host ~]# virsh pool-info eighthPool
Name: eighthPool
UUID: 230c3939-b009-4d28-97ff-09419492cd9b
State: running
Persistent: yes
Autostart: yes
Capacity: 224.89 GiB
Allocation: 32.20 MiB
Available: 224.85 GiB
[root@remote-host ~]# mount | grep /eighthPool
/dev/mapper/centos-eighth on /eighthPool type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
[root@remote-host ~]# ls -la /eighthPool
total 4
drwxr-xr-x. 2 root root 6 Mar 12 11:03 .
dr-xr-xr-x. 25 root root 4096 Mar 20 08:23 ..
[root@remote-host ~]#
物理磁盘的其他内容:
作为参考,创建新存储池之前的硬盘分区如下:
[root@remote-host ~]# fdisk -l
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.
Disk /dev/sda: 2000.4 GB, 2000398934016 bytes, 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: gpt
# Start End Size Type Name
1 2048 411647 200M EFI System EFI System Partition
2 411648 1435647 500M Microsoft basic
3 1435648 3897165823 1.8T Linux LVM
Disk /dev/mapper/centos-root: 53.7 GB, 53687091200 bytes, 104857600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mapper/centos-swap: 8187 MB, 8187281408 bytes, 15990784 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mapper/centos-home: 241.6 GB, 241591910400 bytes, 471859200 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
....Other extraneous stuff omitted for brevity.
Disk /dev/mapper/centos-eighth: 241.6 GB, 241587716096 bytes, 471851008 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
答案1
lost+found 是通常在使用标准 Linux 文件系统(如 ext)格式化挂载点时创建的目录。我没有太多使用 XFS,但据我所知,lost+found 是特定于该fsck
工具的,而 XFS 不使用它,所以我假设 XFS 也可能不使用该目录。
无论如何,lost+found 的存在(通常可以使用 重建mklost+found
)并不代表 libvirt 存储池的健康状况。只要 libvirt 和 qemu 具有对挂载点的读写访问权限,它就可以工作。
答案2
lost+found
是在文件系统检查期间发现错误后放置孤立 inode 的位置 ( fsck
)。 XFS 没有。