LVM cannot create snapshot, insufficent space
Hello I am new to volume management and have been watching a few lvm tutorials on youtube, I am trying to create a snapshot of my root volume but get insufficient free space error. I want to make this snapshot incase I goof something up, since this is a fresh install of mint 17 with my drivers and all updates. This is the sequence of commands recorded from my terminal session:
Code:
Script started on Sat 19 Jul 2014 05:49:04 PM EDT |
You let the installer allocate all of the available space, and now there is nothing left (well, 44MB, but that's not much on a 1TB disk) for a new LV. If you don't have too much time invested in the original install+drivers+updates, it might be best just to reinstall and set a more reasonable size (100GB perhaps?) for that filesystem. Then you will have plenty of space available to play with LVM. You can use the df command to see how much space you are actually using on the filesystem now.
If you don't want to reinstall, you will have to reduce the size of that root filesystem and LV. You can't reduce the size of a filesystem while it is mounted, so you will have to boot from the install medium or a rescue disk. The command to resize the LV and filesystem together is Code:
lvresize --size 100G --resizefs /dev/mint-vg/root Code:
fsck -f /dev/mint-vg/root Normally I would advise making a full backup before resizing a filesystem, but since this is a fresh install the effort to do that would be similar to just reinstalling if something goes wrong. |
@ Reply
Hi backwardsbyte,
Welcome to LQ!!! Well the output from LVS and VGS command shows that you have got root lv and swap on the system with 927 G and 4 G. The free space from VGS shows only 44 MB of free space in the VG group and that is the reason it is complaining of not enough free space for creating LVM snapshot. As you said that you want to use LVM snapshot incase you goof up something on the system, here I would like to mention that LVM snapshot is not backup solution. Usually system administrators use LV snapshot for easy recovery, they take LV snapshot before going ahead with some task that will make modification on the file system. So if this is the system wherein your will be playing around with for testing purpose then I would suggest once in a month backup to external drive. Also as you have got a single LV which is pretty big so am not sure how feasible LV snapshots will be in that case. Though LV snapshot does not take disk space into consideration rather it takes used disk space into consideration. Quote:
|
Thank you both, as I now understand my root volume is very large and would idealy need to be resized, and given what was said about snapshots not being a backup solution I decided that I was in way over my head with LVM and reinstalled with the default partitioning without checking off LVM. This way I can maybe use a dd to copy my root partition and just wory about learning linux. I sometimes give myself difficult tasks, considering I started using Linux as a complete replacement for Windows about 1 month ago and never looked back, I am much of a linux noob and now it seems this LVM is maybe used by sysadmins for testing big changes before commiting. Thank you both for your help.
|
All times are GMT -5. The time now is 06:12 AM. |