User Tools

Site Tools


lvm_handling

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

lvm_handling [2012/02/13 12:40]
root
lvm_handling [2017/04/16 23:50] (current)
root [Prepare new disk/VolumeGroup/Logical Volume]
Line 2: Line 2:
  
 ===== Prepare new disk/​VolumeGroup/​Logical Volume ===== ===== Prepare new disk/​VolumeGroup/​Logical Volume =====
 +
 +Add disk/LUN to server. Have a look at [[rescan_scsi_bus|Rescan SCSI bus]] for scanning the SCSI bus online. Alternative reboot the server.
  
 Prepare PV's with Prepare PV's with
Line 14: Line 16:
   ​   ​
 Create filesytem Create filesytem
 +
 +EXT FS:
    ​mkfs.ext4 -F -b 4096 /​dev/<​vgname>/<​lvname>​    ​mkfs.ext4 -F -b 4096 /​dev/<​vgname>/<​lvname>​
 Depending on distribution use relevant ext2/​ext3/​ext4 file system type. Depending on distribution use relevant ext2/​ext3/​ext4 file system type.
  
 +XFS FS:
 +   ​mkfs.xfs /​dev/<​vgname>/<​lvname>​
 ===== Resize existing Logical volume ===== ===== Resize existing Logical volume =====
  
Line 29: Line 35:
 Resize Physical Volume Resize Physical Volume
    ​pvresize /​dev/<​device>​    ​pvresize /​dev/<​device>​
 +   
 +If LUN is under multipath:
 +   ​multipathd resize map <​multipath_device>​
 +   
 +Where <​multipath_device>​ is mpath<​x>​ or wwid depending on multipath configuration.
  
 Extend Logical Volume Extend Logical Volume
Line 35: Line 46:
  
 Extend filesytem which resides on Logical Volume Extend filesytem which resides on Logical Volume
 +
 +EXT FS:
    ​resize2fs /​dev/<​vgname>/<​lvname>​    ​resize2fs /​dev/<​vgname>/<​lvname>​
  
-[[https://access.redhat.com/kb/​docs/​DOC-9855]]+XFS FS: 
 +    xfs_growfs ​/dev/<​vgname>​/<​lvname>​
  
 +[[https://​access.redhat.com/​kb/​docs/​DOC-9855]]
  
 ===== Resize swap on Logical volume ===== ===== Resize swap on Logical volume =====
lvm_handling.1329136823.txt.gz · Last modified: 2012/02/13 12:40 by root