您好,登录后才能下订单哦!
这篇文章主要介绍如何实现lvm磁盘快照创建与恢复,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!
默认逻辑卷,卷组都已创建。
元数据文件: |
# Xen 4.6 vmServer Configuration bios = "seabios" builder = "hvm" boot = "cd" pae = 1 acpi = 1 acpi_s3 = 1 acpi_s4 = 1 apic = 1 hap = 0 viridian = "all" rtc_timeoffset = 0 localtime = 0 xen_platform_pci = 1 on_poweroff = "destroy" on_reboot = "restart" on_crash = "restart" usb = 1 usbdevice = "tablet" soundhw = "hda" parallel = "none" serial = "pty" vga = "stdvga" opengl = 1 sdl = 0 vnc = 1 vncunused = 0 vnclisten = "0.0.0.0" # variable parameter name = "server_yxef445nq83m04xy" uuid = "9a7f8d39-315f-4de8-a153-154988ded4b0" #maxmem = 16284 memory = 1024 vcpus = 2 vcpu_avail = 8 vncdisplay = 4100 vncpasswd = "736B2Z" vif = ["mac=00:16:3e:57:05:95,bridge=xenbr0,rate=2Mb/s", "mac=00:16:3e:b9:28:02,bridge=xenbr1"] disk = ["phy:/dev/mapper/vg0-newlv,sdc,w","phy:/dev/mapper/vg0-server_yxef445nq83m04xy_sdb,sdb,w", "tap2:/storage/vdisk/server_yxef445nq83m04xy_sda,sda,w", "file:,sdd:cdrom,r" ] |
:sda为普通文件类型磁盘作为系统盘,sdb和sdc分别为块文件磁盘。其中sdc为自己后加的块磁盘,用于本次测试。
将sdc磁盘进行挂载 |
a.把sdc格式化为ext3文件系统 mkfs.ext3 /dev/sdc b. 建立挂载目录 mkdir /data/ c.把/dev/sdc这个盘挂载到/data目录下 d.系统启动时自动挂载/dev/sda,编辑/etc/fstab文件 如: /dev/VolGroup00/LogVol00 / ext3 defaults 1 1 |
创建快照: |
lvcreate -s -n snap -L 50M /dev/mapper/vg0-newlv |
将虚拟机关机
执行快照回复 |
lvconvert --merge /dev/vg0/snap |
重启虚拟机。vnc连接。快照恢复。
以上是“如何实现lvm磁盘快照创建与恢复”这篇文章的所有内容,感谢各位的阅读!希望分享的内容对大家有帮助,更多相关知识,欢迎关注亿速云行业资讯频道!
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。