LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   LVM Reducing LVs Without Data Loss (https://www.linuxquestions.org/questions/linux-newbie-8/lvm-reducing-lvs-without-data-loss-673455/)

centos82 10-01-2008 01:04 AM

LVM Reducing LVs Without Data Loss
 
I am trying to move space around on my server but am getting some warnings like the following that are keeping me from proceeding:

[/os_images]# lvreduce -L 19G /dev/VolGroup00/backuplv
WARNING: Reducing active logical volume to 19.00 GB
THIS MAY DESTROY YOUR DATA (filesystem etc.)
Do you really want to reduce backuplv? [y/n]:


I have unmounted the filesystem /backup so I am not sure why the warning says the logical volume is still active. Is there a way to unactivate the logical volume? Is there a way to reduce an LVM filesystem with 100% assurance that there won't be data corruption? And finally, is there a way to shrink a mounted/online filesystem without the risk of data loss?

Thank you whoever helps!

jmbrink26 10-01-2008 02:00 AM

Check the LV in /etc/lvm/lvm.conf (typically). Path and filename may be slightly different, but that should at least get you on the right track. Make sure the LV is inactive there.

centos82 10-03-2008 01:25 AM

Solved
 
I was able to get this to work by unmounting the filesystem and using "system-config-lvm". I was really trying to do this at the command line and some experts I trust said I could use the lvreduce or lvresize command and ignore the warning message as long as I was sure the resize2fs command was succssful.

jmbrink26 10-04-2008 01:58 AM

Awesome. Sounds like your all good to go. Yeah, there's always more than one way to go about most things, it all just depends on which one works the best :P.


All times are GMT -5. The time now is 11:15 PM.