giovedì 14 novembre 2013

Redhat CentOS partition management (LVM)

 15  echo "- - -" >/sys/class/scsi_host/host0/scan
Questo comando forza un rescan del controller SCSI
This command forces the system to rescan the SCSI controller.

   16  fdisk -l
   17  fdisk /dev/sdb
Ho creato una partizione primaria di tipo 8e (LVM)

Created a primary partition type 8e (LVM partition)

   19  man fdisk
   20  fdisk -u /dev/sdb
   21  fdisk -l
   22  pvcreate /dev/sdb1
 Questo comando collega il disco al sistema LVM
This command is adding the phisical volume to the volume group

   23  vgs
Volume Group Show

   24  pvadd
   25  vgextend
   26  vgextend --help
   27  vgs
   28  vgextend smosvg /dev/sdb1

Aggiunto nuovo disco al Volume Group

Added the new partiton created to the volume group I want to expand

   29  vgs
   30  lvextend
   31  lvextend --help
   32  lvs
Logical Volume show

   33  lvextend -l +100%FREE /dev/mapper/smosvg-optvol

QUesto comando allarga il volume "optvol" con tutto lo spazio libero nel Volume Group

This command will expand the "optvol" with all the available space (+100%) in the volume group
   34  lvs
   35  resize2fs /dev/mapper/smosvg-optvol
Rircostruisce il file system con le nuove dimensioni
Rebuilds the file system with the new dimentions

   36  df -h

Nessun commento: