linux-操作系统重新安装后,恢复原有的lvm

有个虚拟机环境,操作系统和数据磁盘、备份磁盘都是独立的磁盘,重新安装操作系统后恢复lvm

[root@hydb ~]# vgs
  VG        #PV #LV #SN Attr   VSize     VFree
  FRADG      1   1   0 wz--n-  <400.00g    0
  backupvg    1   1   0 wz--n- <1024.00g    0
  DATADG      1   1   0 wz--n-  <400.00g    0
  openeuler   1   3   0 wz--n-  <299.00g 4.00m
[root@hydb ~]# vgscan
  Found volume group "backupvg" using metadata type lvm2
  Found volume group "FRADG" using metadata type lvm2
  Found volume group "DATADG" using metadata type lvm2
  Found volume group "openeuler" using metadata type lvm2
[root@hydb ~]# vgexport backupvg
  Volume group "backupvg" has active logical volumes
[root@hydb ~]# vgexport DATADG
  Volume group "DATADG" has active logical volumes
[root@hydb ~]# vgexport FRADG
  Volume group "FRADG" has active logical volumes
[root@hydb ~]# lvdisplay
  --- Logical volume ---
  LV Path                /dev/backupvg/backup
  LV Name                backup
  VG Name                backupvg
  LV UUID                1mg7pj-1Tsd-dTss-lPab-Np00-vUvf-34eKkN
  LV Write Access        read/write
  LV Creation host, time hydb, 2025-05-20 18:57:37 +0800
  LV Status              available
  # open                 0
  LV Size                <1024.00 GiB
  Current LE             262143
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     8192
  Block device           253:5
   
  --- Logical volume ---
  LV Path                /dev/FRADG/arch
  LV Name                archlog
  VG Name                FRADG
  LV UUID                trdWe8-wO9u-Rbjj-NV2u-6Rux-Yadb-n6pVxL
  LV Write Access        read/write
  LV Creation host, time hydb, 2025-05-20 18:57:35 +0800
  LV Status              available
  # open                 0
  LV Size                <400.00 GiB
  Current LE             102399
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     8192
  Block device           253:4
   
  --- Logical volume ---
  LV Path                /dev/DATADG/data
  LV Name                oradata
  VG Name                DATADG
  LV UUID                0J5O6Y-Jz2d-PWbB-u8Bl-tOur-JKmh-03zZX1
  LV Write Access        read/write
  LV Creation host, time hydb, 2025-05-20 18:57:34 +0800
  LV Status              available
  # open                 0
  LV Size                <400.00 GiB
  Current LE             102399
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     8192
  Block device           253:3

[root@hydb ~]#  df -h
Filesystem                   Size  Used Avail Use% Mounted on
devtmpfs                     4.0M     0  4.0M   0% /dev
tmpfs                         16G     0   16G   0% /dev/shm
tmpfs                        6.2G  8.8M  6.2G   1% /run
tmpfs                        4.0M     0  4.0M   0% /sys/fs/cgroup
/dev/mapper/openeuler-root   123G   23G   94G  20% /
tmpfs                         16G     0   16G   0% /tmp
/dev/sda1                    974M  145M  762M  16% /boot
/dev/mapper/openeuler-u01    147G   28K  140G   1% /u01
/dev/mapper/DATADG-data   400G  2.9G  397G   1% /oradata
/dev/mapper/FRADG-arch   400G  2.9G  397G   1% /archlog
/dev/mapper/backupvg-backup  1.0T  7.2G 1017G   1% /backup

你可能感兴趣的:(Linux,linux,运维,服务器)