Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: How to resize LVM?

  1. #1

    Default How to resize LVM?

    Hello!

    I have installed Suse on 70 GB partition on 160 GB disk.
    I used LVM and this is a list of LVM disks on 70 GB

    1.6 GB /swap
    21 GB /root
    47 GB /home

    and there is a 164 MB /boot partition outside of LVM.

    Rest of 160 GB is a 90 GB NTFS partition, which is free - empty.

    It is possible to resize LVM, or /root and /home to use entire 160 GB disk?

  2. #2
    Join Date
    Sep 2010
    Location
    Poland
    Posts
    1,712

    Default Re: How to resize LVM?

    Quote Originally Posted by glock356 View Post
    Hello!

    I have installed Suse on 70 GB partition on 160 GB disk.
    I used LVM and this is a list of LVM disks on 70 GB

    1.6 GB /swap
    21 GB /root
    47 GB /home

    and there is a 164 MB /boot partition outside of LVM.

    Rest of 160 GB is a 90 GB NTFS partition, which is free - empty.

    It is possible to resize LVM, or /root and /home to use entire 160 GB disk?
    Yes of course it's possible this I guess this is one of the reasons LVM was created.

    The info You provided doesn't tell anything useful. In order to get proper help You would have to post the output of these commands here :
    Code:
    lvscan
    Code:
    pvscan
    Code:
    vgscan
    Code:
    fdisk -l
    Alternatively You can do some reading on LVM and figure it out on your own
    LVM HOWTO

    Best regards,
    Greg
    Best regards,
    Greg
    Box: Windows 7 / Windows XP | Intel Dual-Core E5200 | ATI Radeon HD4850 | 4GB RAM
    Lap: openSUSE 12.3 / Windows 7 | Intel U7300 | KDE | Intel GMA 4500 | Asus UL80A | 3GB RAM

  3. #3
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    14,737

    Default Re: How to resize LVM?

    The fact that you did not provide any usefull information makes @glistwan to ask for it. Please put that computer output between CODE tags Posting in Code Tags - A Guide, I say this beecuse I guess you may not know this feature (it is rather hidden in the forum functions). Else it will be more or less unreadable for everybody (including you).
    Henk van Velden

  4. #4

    Default Re: How to resize LVM?

    hcvv wrote:
    > The fact that you did not provide any usefull information makes
    > @glistwan to ask for it.


    Well, that's perhaps a little too pessimistic. We don't need to know all
    the details to be able to tell the OP what to do.

    (1) reformat the NTFS partition as an LVM PV
    (2) add the PV to the appropriate VG (if there's more than one VG,
    you'll need to make more than one PV from the NTFS partition)
    (3) extend the LVs
    (4) extend the filesystems within the LVs

    More detailed explanations are in the HOW-TO on how to use the
    command-line to do those tasks. Alternatively, you can use the
    Partitioner in YaST.

    As always, make a backup first!

  5. #5
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    14,737

    Default Re: How to resize LVM?

    I do not take any risks. People tell you one and a half line of story and when you then ask for and get the real information, it very of happens to be quite different from what the story suggested. I do not give technical detailed advice based on a biased and hazy view.
    Henk van Velden

  6. #6

    Default Re: How to resize LVM?

    Quote Originally Posted by hcvv View Post
    I do not take any risks
    I do not take any risks too.
    After i am reading instroctions on site LVM HOW TO, decided that is too much for my skills in Linux, i backup all files from home folder, reinstall Suse, used ALL 160 GB disk and copy data back to home folder.
    It take almost all afternoon but now i have what i want and all data saved.
    Thanks to all

  7. #7
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    14,737

    Default Re: How to resize LVM?

    That is a very practical solution in your case.

    But I still wonder how comes you have an LVM based system when you do not know the LVM basics. (You do not need to answer this one, I can live with many of this sort of questions )
    Henk van Velden

  8. #8
    Join Date
    Sep 2010
    Location
    Poland
    Posts
    1,712

    Default Re: How to resize LVM?

    Quote Originally Posted by glock356 View Post
    I do not take any risks too.
    After i am reading instroctions on site LVM HOW TO, decided that is too much for my skills in Linux, i backup all files from home folder, reinstall Suse, used ALL 160 GB disk and copy data back to home folder.
    It take almost all afternoon but now i have what i want and all data saved.
    Thanks to all
    No it's not hard. djh-novell really summarized it in the 4 points he posted so You are just 4 steps away from what You want to do. If I were in your shoes I would do the backup and just try it. The worst thing You can encounter is recovery from backup which most likely what You will have to do anyway when reinstalling from scratch. But the thing You can gain is learning how to do that and it's so much fun to be able to resize file systems on a running system Once You get the hang of it it is actually quite easy and LVM has methods to back up some meta data or whatever that's called that in most cases lets You recover without backup if You screw something up.

    @hcvv
    I guess by choosing LVM set up during the installation. I never tried that but I guess it can guide You quite well and maybe propose some recommended set up. That's just a guess of course.

    Best regards,
    Greg
    Best regards,
    Greg
    Box: Windows 7 / Windows XP | Intel Dual-Core E5200 | ATI Radeon HD4850 | 4GB RAM
    Lap: openSUSE 12.3 / Windows 7 | Intel U7300 | KDE | Intel GMA 4500 | Asus UL80A | 3GB RAM

  9. #9
    Join Date
    Nov 2011
    Location
    Slovenia
    Posts
    3

    Default Re: How to resize LVM?

    I ran into something similar while trying to extend the root (/) partition.
    I couldn’t get the /mnt/sysimage to unmount.
    So I ended up booting “linux rescue” from the FC5 CD.
    Then do NOT mount the file system, instead at the shell prompt do:


    # get the name of the vol group
    lvm vgscan

    # active the vol ie: /dev/Vol files are added)
    lvm vgchange -a y /dev/VolGoup00

    #Check the existing file system for errors:
    e2fsck -f /dev/VolGroup00/LogVol00

    #Resize the root (/) file system:
    resize2fs /dev/VolGroup00/LogVol00

    #Resize LogVol00 where root LV is located
    lv lvreduce -l -423 VolGroup00/LogVol00

    #Now we can create additional LVs in freed space
    lvcreate -L 2G -n LVGIT VolGroup00

    ####################################
    #REBOOT to normal startup system #####
    ####################################

    #View all available logical volumes
    lvdisplay

    #Format filesystem making it EXT3
    mke2fs -j /dev/VolGroup00/LVGIT

    #Create mount point /dir
    mkdir /git

    #Mount LV to mountpoint
    mount /dev/VolGroup00/LVGIT /git

    #List files on mounted file system
    ls -la /git

    #Edit file system table config file
    vi /etc/fstab

    #Append line below
    /dev/VolGroup00/LVGIT /git ext3 defaults 0 0


    #Unmount filesystem
    umount /git

    #Test automount
    mount -a


    #Display all curently mounted filesytems and VOLUMES
    df -h




    ###################################################################################
    #Some additional useful commands

    #reduce size of a LV partition
    lvreduce -L -64M /dev/VolGroup00/LVGIT

    #extend LVM volume
    lvextend -L +300M /dev/VolGroup00/BACKUP-GIT

    #claim extended space
    resize2fs -p /dev/VolGroup00/BACKUP-GIT

    ###################################################################################



    LVM howtos
    Reference link:
    LVM Configuration - How to configured Logical Volumes in Linux - Lvm, Lvs, Pvs, Lvdisplay, Vgs

    LVM Configuration
    LVM Configuration - How to configured Logical Volumes in Linux - Lvm, Logical Volume Management, Physical Volume, Logica

    LVM Resizing Guide
    LVM Resizing Guide - Howto Resize Logical Volumes in Linux - Resizing, Lvm, Lvresize, Linux, Vgdisplay

    Logical Volume Manager: How can I extend a Volume Group?
    Logical Volume Manager: How can I extend a Volume Group? | HowtoForge - Linux Howtos and Tutorials

    LVM Snapshots
    LVM Snapshots - Redirecting Steams in Linux - Stdout, Stdin, Stderr, Linux, Input

    A Beginner's Guide To LVM
    A Beginner's Guide To LVM | HowtoForge - Linux Howtos and Tutorials

    A simple introduction to working with LVM
    A simple introduction to working with LVM

  10. #10

    Question Re: How to resize LVM?

    Quote Originally Posted by glock356 View Post
    It is possible to resize LVM, or /root and /home to use entire 160 GB disk?
    Would you like to look at any more background information for improved support of logical volume management?

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •