Create LV Snapshot with lvcreate lufy September 28, 2017 <p>A logic volum snapshot could restore the filesystem on ur logical volum. Here's how to do:</p> <p><span style="background-color: #c0c0c0;"># lvcreate --size 100M --snapshot --name snaptest /dev/test-vg/lvol0</span></p> <p>This would create a snapshot <span style="background-color: #c0c0c0;"><em>snaptest</em></span> of logic volum<span style="background-color: #c0c0c0;"> <em>/dev/test-vg/lvol0</em></span>, <span style="background-color: #c0c0c0;"><em>snaptest</em></span> can be mounted just like <em><span style="background-color: #c0c0c0;">lvol0</span></em>:</p> <p><span style="background-color: #c0c0c0;"># mount /dev/test-vg/<em>snaptest</em> /<em>mount-point</em></span></p> <p> </p> <p>By the way, here're commands how to operate a test lv:</p> <p>1. Make partitions with <span style="background-color: #c0c0c0;">fdisk</span> or on gpt disks with <span style="background-color: #c0c0c0;">parted</span>.</p> <p>2. Commands:</p> <p><span style="background-color: #c0c0c0;">pvcreate /dev/sda5</span></p> <p><span style="background-color: #c0c0c0;">pvcreate /dev/sda6</span> # Create physical volums.</p> <p><span style="background-color: #c0c0c0;">vgcreate test-vg /dev/sda5 /dev/sda6</span> # Create volum group</p> <p><span style="background-color: #c0c0c0;">lvcreate -L 8G test-vg</span> # Create logic volum</p> <p>3. Other related commands:</p> <p><span style="background-color: #c0c0c0;">pvdisplay</span> <span style="background-color: #c0c0c0;">vgdisplay</span> <span style="background-color: #c0c0c0;">lvdisplay</span></p> <p><span style="background-color: #c0c0c0;">lvremove /dev/test-vg/snaptest</span> # This need to use the absolute path.</p> <p>... ...</p> <p> </p>
Comments (0)
Leave a Comment
No comments yet. Be the first to comment!