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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值