[root@vmrhel7 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs 1.9G 0 1.9G 0% /dev/shm
tmpfs 1.9G 8.9M 1.9G 1% /run
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
/dev/mapper/rhel_vmrhel7-root 14G 3.4G 11G 26% /
/dev/sda1 1014M 233M 782M 23% /boot
tmpfs 379M 0 379M 0% /run/user/0
/dev/sdb1 40G 34M 40G 1% /data
完成解决方法中的步骤 1-8 后,我们现在看到系统上挂接了一个额外的磁盘 /dev/sdc:lsblk -o NAME,FSTYPE,LABEL,SIZE,MOUNTPOINT
[root@vmrhel7 ~]# lsblk -o NAME,FSTYPE,LABEL,SIZE,MOUNTPOINT
NAME FSTYPE LABEL SIZE MOUNTPOINT
sda 16G
├─sda1 xfs 1G /boot
└─sda2 LVM2_member 15G
├─rhel_vmrhel7-root xfs 13.4G /
└─rhel_vmrhel7-swap swap 1.6G [SWAP]
sdb 40G
└─sdb1 xfs 40G /data
sdc 40G
└─sdc1 xfs 40G
sr0 1024M
创建临时文件夹以将磁盘装载到:mkdir /tmp/flr
将磁盘装载到文件夹:mount -o rw,nouuid /dev/sdc1 /tmp/flr
[root@vmrhel7 ~]# mount /dev/sdc1 /tmp/flr
mount: wrong fs type, bad option, bad superblock on /dev/sdc1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so.
[root@vmrhel7 ~]# dmesg | tail
[12582.452435] sd 0:0:2:0: [sdc] Mode Sense: 61 00 00 00
[12582.452467] sd 0:0:2:0: [sdc] Cache data unavailable
[12582.452468] sd 0:0:2:0: [sdc] Assuming drive cache: write through
[12582.454682] sdc: sdc1
[12582.455066] sd 0:0:2:0: [sdc] Attached SCSI disk
[13036.466924] XFS (sdc1): Filesystem has duplicate UUID ccd31faa-3ceb-47ff-8f64-ad999bb1ab5a - can't mount
[13053.416540] XFS (sdc1): Filesystem has duplicate UUID ccd31faa-3ceb-47ff-8f64-ad999bb1ab5a - can't mount
[13208.507880] XFS (sdc1): Filesystem has duplicate UUID ccd31faa-3ceb-47ff-8f64-ad999bb1ab5a - can't mount
[13464.609162] sdc: sdc1
[13494.625617] XFS (sdc1): Filesystem has duplicate UUID ccd31faa-3ceb-47ff-8f64-ad999bb1ab5a - can't mount
[root@vmrhel7 ~]# mount -o rw,nouuid /dev/sdc1 /tmp/flr
[root@vmrhel7 ~]#
提醒:如果磁盘装载到同一系统,则在装载上备份磁盘可能会失败,因为该磁盘的 UUID 与系统上的另一个磁盘相同。由于我们仅恢复文件,而不将此磁盘添加到永久文件系统,因此您可以使用 nouuid 进行装载。
现在,您可以将所需的数据从 FLR 装载点拷贝到您选择的位置:cp /tmp/flr/path/to/file-or-dir /path/to/destination/dir
[root@vmrhel7 ~]# cp /tmp/flr/sysctl.conf ~/flr/
[root@vmrhel7 ~]# ls -l flr/
total 4 -rw-r--r--. 1 root root 449 Jun 16 15:36 sysctl.conf
请查看步骤 11 和 12 以删除磁盘并删除即时恢复虚拟机实例。