[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,以移除磁碟並刪除即時復原 VM 例項。