我有 /dev/sdc,其中保存着从 VG vg_data 中拯救的数据。我需要用这些数据将 /dev/sdc 转换为 LVM。可以吗?
编辑1: - 我将 /dev/VG_DATA/data 从 xfs 格式化为 ext4 - 从 sdc1 复制到 LVM 数据(我认为)
我从 sdc1 运行 rsync 到数据 lvm 后出现错误,并且 /dev/sdb1 (lvm 数据) 处于离线状态。
> 79.497864] sd 1:0:1:0: rejecting I/O to offline device [ 79.497891] Aborting journal on device dm-2-8. [ 79.497895] sd 1:0:1:0:
> rejecting I/O to offline device [ 79.497899] JBD2: Error -5 detected
> when updating journal superblock for dm-2-8. [ 79.497916] sd
> 1:0:1:0: rejecting I/O to offline device [ 79.497953] sd 1:0:1:0:
> rejecting I/O to offline device [ 79.497970] EXT4-fs error (device
> dm-2): ext4_journal_check_start:56: Detected aborted journal [
> 79.497983] sd 1:0:1:0: rejecting I/O to offline device [ 79.498154] sd 1:0:1:0: rejecting I/O to offline device [ 79.498169] sd 1:0:1:0:
> rejecting I/O to offline device [ 79.498192] sd 1:0:1:0: rejecting
> I/O to offline device [ 79.498203] sd 1:0:1:0: rejecting I/O to
> offline device
卷组有什么问题?它是虚拟机。在 hyper-v 08 r2 上
编辑 2-来自启动日志
Sep 17 17:01:23 localhost lvm: 1 logical volume(s) in volume group "VG_DATA" now active
Sep 17 17:01:23 localhost systemd: Found device /dev/mapper/VG_DATA-data.
Sep 17 17:01:23 localhost systemd: Started LVM2 PV scan on device 8:17.
Sep 17 17:01:23 localhost systemd: Mounting /data...
Sep 17 17:01:23 localhost kernel: XFS (sda1): Ending clean mount
Sep 17 17:01:23 localhost systemd: Mounted /boot.
Sep 17 17:01:23 localhost kernel: EXT4-fs (dm-2): recovery complete
Sep 17 17:01:23 localhost kernel: EXT4-fs (dm-2): mounted filesystem with ordered data mode. Opts: (null)
Sep 17 17:01:23 localhost systemd: Mounted /data.
答案1
进行备份,尤其是如果这是该数据的唯一副本。
扫描磁盘以查找此 PV,然后激活其包含的 VG。您需要所有 PV 才能实现此操作,尽管可能只有一个 PV。
vgscan vgchange -ay
挂载 /dev/vg_data/* 下出现的 LV
请参阅发行版的文档,例如 Red Hat 的逻辑卷管理器管理手动的。