Create LV Snapshot with lvcreate

lufy
September 28, 2017

A logic volum snapshot could restore the filesystem on ur logical volum. Here's how to do:


# lvcreate --size 100M --snapshot --name snaptest /dev/test-vg/lvol0


This would create a snapshot snaptest of logic volum /dev/test-vg/lvol0,  snaptest can be mounted just like lvol0:


# mount /dev/test-vg/snaptest /mount-point


 


By the way, here're commands how to operate a test lv:


1. Make partitions with fdisk or on gpt disks with parted.


2. Commands:


pvcreate /dev/sda5


pvcreate /dev/sda6                                   # Create physical volums.


vgcreate test-vg /dev/sda5 /dev/sda6         # Create volum group


lvcreate -L 8G test-vg                                # Create logic volum


3. Other related commands:


pvdisplay vgdisplay lvdisplay


lvremove /dev/test-vg/snaptest                   # This need to use the absolute path.


... ...


 

Comments (0)

Leave a Comment
Maximum 1000 characters

No comments yet. Be the first to comment!