LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Resize LV with LVM (https://www.linuxquestions.org/questions/linux-general-1/resize-lv-with-lvm-541442/)

Slipstream2006 03-28-2007 07:09 PM

Resize LV with LVM
 
Hello,

I've got a LV that needs to be enlarged. The volume is mounted on /opt. File system is Ext3.

My SuSE 10.2 has LVM installed, but it can't resize volumes unless they are unmounted. I've never done this before, so I figured I better get some advice before attempting it. So, can anyone please tell me if this is the best way?

I assume:
First safe boot and logon as root
unmount /dev/system1/opt
lvextend -L+2G /dev/system1/opt (adding 2 GB)
resize2fs /dev/system1/opt (not sure if this utility is installed)
mount /dev/system1/opt

Does this seem about right? Anything else I should consider?

Thanks for any replies!

moxieman99 03-28-2007 07:56 PM

Quote:

Originally Posted by Slipstream2006
Hello,

I've got a LV that needs to be enlarged.

Etc.

Anything else I should consider?

Yes. Back up all of your data first. Then confirm that the backup worked.

Slipstream2006 03-29-2007 07:49 AM

Thanks, I've got /opt saved to a different disk just in case.

Does anyone know if the commands I listed above look right?

Slipstream2006 03-29-2007 12:04 PM

Ok, I threw caution to the wind and tried the lvextend command that I listed above. The message states Command not Found.

Then I tried the SuSE installation disk. I chose Installation--->Other Options--->Repair Installed System--->Customized Repairs--->Start Partitioning Tool

Once I'm in Expert Partitioner, I can Edit the size of /opt. But when I Accept the change and try to move to the next screen, it tells me I need to choose a Swap partition..... Apparently, all of my mount points are lost, so I need to reset them somehow. But it's not possible because the Mount Point fields are disabled.

It doesn't seem like the Expert Partitioner tool is designed for the resizing task :-(

Slipstream2006 03-30-2007 09:47 AM

I figured it out! Luckily.... As I posted above, using the SuSE installation disk. I chose Installation--->Other Options--->Repair Installed System--->Customized Repairs--->Start Partitioning Tool. The partitioning tool in this case is Expert Partitioner, just like during initial setup of the system. I was able to edit the /opt volume size without a hitch. But here's the tricky part:

After the edit, it is necessary to Accept the partition scheme. Same way as during initial setup, except that all the mount points are gone! And they can't be reassigned! Then a dialog appears asks to assign a swap partition! All this stuff was already nicely arranged in my system. But, I took a chance and ignored everything. Luckily, the /opt volume was resized, and I was able to exit Expert Partitioner unscathed.

I found the process very unintuitive because it left me with the impression that the system would get messed-up with every mouse click. Maybe a sticky on this topic would be a good idea. At least until EP's dialogs can be updated to instruct users better.


All times are GMT -5. The time now is 10:52 PM.