outsource from india chennai india programmers freelance php coder freelance outsource scripts programming complicated perl patterns php module installation
outsource from india perl installation and configuration php installation linux system administration US$15,US$19,US$11,US$10 cheap programmer
india outsource outsource india chennai india programmers php perl mysql freelance freelance programmer
SHOWCASE of php and perl scripts CONTACT US for php custom perl scripts
HOME
 

9.9. Extending a logical volume

To extend a logical volume you simply tell the lvextend command how much you want to increase the size. You can specify how much to grow the volume, or how large you want it to grow to:

# lvextend -L12G /dev/myvg/homevol
lvextend -- extending logical volume "/dev/myvg/homevol" to 12 GB
lvextend -- doing automatic backup of volume group "myvg"
lvextend -- logical volume "/dev/myvg/homevol" successfully extended
            
will extend /dev/myvg/homevol to 12 Gigabytes.


# lvextend -L+1G /dev/myvg/homevol
lvextend -- extending logical volume "/dev/myvg/homevol" to 13 GB
lvextend -- doing automatic backup of volume group "myvg"
lvextend -- logical volume "/dev/myvg/homevol" successfully extended
            
will add another gigabyte to /dev/myvg/homevol.

After you have extended the logical volume it is necessary to increase the file system size to match. how you do this depends on the file system you are using.

By default, most file system resizing tools will increase the size of the file system to be the size of the underlying logical volume so you don't need to worry about specifying the same size for each of the two commands.

  1. ext2

    Unless you have patched your kernel with the ext2online patch it is necessary to unmount the file system before resizing it.
    
   # umount /dev/myvg/homevol/dev/myvg/homevol
       # resize2fs /dev/myvg/homevol
       # mount /dev/myvg/homevol /home
                      

    If you don't have e2fsprogs 1.19 or later, you can download the ext2resize command from ext2resize.sourceforge.net and use that:
    
   # umount /dev/myvg/homevol/dev/myvg/homevol
       # resize2fs /dev/myvg/homevol
       # mount /dev/myvg/homevol /home
                      

    For ext2 there is an easier way. LVM ships with a utility called e2fsadm which does the lvextend and resize2fs for you (it can also do file system shrinking, see the next section) so the single command
    
   # e2fsadm -L+1G /dev/myvg/homevol
                      
    is equivalent to the two commands:
    
   # lvextend -L+1G /dev/myvg/homevol
       # resize2fs /dev/myvg/homevol
                      

    NoteNote
     

    You will still need to unmount the file system before running e2fsadm.

  2. reiserfs

    Reiserfs file systems can be resized when mounted or unmounted as you prefer:

    • Online:
      
   # resize_reiserfs -f /dev/myvg/homevol
                                 

    • Offline:
      
   # umount /dev/myvg/homevol
         # resize_reiserfs /dev/myvg/homevol
         # mount -treiserfs /dev/myvg/homevol /home
                                 

  3. xfs

    XFS file systems must be mounted to be resized and the mount-point is specified rather than the device name.
    
   # xfs_growfs /home
                      


Linux HOWTO full list
   This document, LDP HOWTO-INDEX, is copyrighted (c) 1995 - 2002 by Tim Bynum, Guylhem Aznar, Joshua Drake and Greg Ferguson. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is available at http://www.gnu.org/copyleft/fdl.html. If you have questions, please contact the LDP.
Web Design Copyright © 1999-2003. Chrisranjana Software Solutions Pvt Ltd. syndicate rss feed