HP proliant sous rhel6

De TechWik
Révision datée du 21 février 2018 à 17:16 par Toine (discussion | contributions)
(diff) ← Version précédente | Voir la version actuelle (diff) | Version suivante → (diff)
Aller à : navigation, rechercher

Ajouter un disque dans un smartArray, puis extension LVM,file-system

Utiliser hpssacli ou ssacli (anciennement hpacucli): rechercher sscli dans drivers and support sur le site HPE. Ajout du disque dans la baie, vu unassigned, puis affectation au disque logique:

 # hpssacli controller slot=0 physicaldrive all show
     array A
       physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 146 GB, OK)
       physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 146 GB, OK)
       physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SAS, 146 GB, OK)
     unassigned
       physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SAS, 146 GB, OK)
 # hpssacli controller slot=0 logicaldrive all add drives=1I:1:4
 # hpssacli ctrl slot=0 logicaldrive all show
   Smart Array P410i in Slot 0 (Embedded)
      array A logicaldrive 1 (273.4 GB, RAID 5, Transforming, 5% complete)
 NB: cette phase dure >1h
 # hpssacli ctrl slot=0 logicaldrive all show
     array A logicaldrive 1 (273.4 GB, RAID 5, OK)
 ajouter l'espace libre au disque logique: 
 # hpssacli ctrl slot=0 logicaldrive 1 modify size=max
   Warning: Extension may not be supported on certain operating systems.
        Performing extension on these operating systems can cause data to
        become inaccessible. See ACU documentation for details. Continue?
        (y/n) y
   (on peut ignorer ce warning sans probleme).

L'espace disque ajouté n'est pas vu du systeme à ce stade => reboot serveur pour prise en compte de l'espace disque :

 # fdisk -l
 Disk /dev/sda: 440.3 GB, 440345714688 bytes
 # cfdisk 
   => create partition avec l'espace dispo, type=8e (Linux LVM)
   warning kernel re-read error => partition non visible dans /dev
 # fdisk -l
   Disk /dev/sda: 440.3 GB, 440345714688 bytes
   Device Boot      Start         End      Blocks   Id  System
   /dev/sda1   *           1          64      512000   83  Linux
   Partition 1 does not end on cylinder boundary.
   /dev/sda2              64       35691   286170112   8e  Linux LVM
   /dev/sda3           35691       53536   143341568   8e  Linux LVM

mais /dev/sda3 n'existe pas encore dans le système => reboot de nouveau pour prise en compte par le kernel, puis création pv, extension VG, LV, FS:

 # pvcreate /dev/sda3
 # vgextend vg_srv119rh6 /dev/sda3
 # vgdisplay
   VG Name               vg_srv119rh6
   Free  PE / Size       34995 / 136.70 GiB
 # umount /home
 # lvresize -L 340G /dev/vg_srv119rh6/lv_home
   Extending logical volume lv_home to 340.00 GiB
   Logical volume lv_home successfully resized
 # e2fsck -f /dev/vg_srv119rh6/lv_home
 # resize2fs /dev/vg_srv119rh6/lv_home
   resize2fs 1.41.12 (17-May-2010)
   Resizing the filesystem on /dev/vg_srv119rh6/lv_home to 89128960 (4k) blocks.
   The filesystem on /dev/vg_srv119rh6/lv_home is now 89128960 blocks long.
 # mount /home
 # df
   /dev/mapper/vg_srv119rh6-lv_home   350921956 205473024 127623144  62% /home