Root PV resize: mudanças entre as edições

De Wiki Clusterlab.com.br
Ir para navegação Ir para pesquisar
(Criou página com '<syntaxhighlight lang=bash> function RESIZE_PV() { parted /dev/sda print parted /dev/sda unit b print pvs BEGIN=$(parted /dev/sda unit b print | grep -w 2...')
 
Sem resumo de edição
 
(2 revisões intermediárias pelo mesmo usuário não estão sendo mostradas)
Linha 1: Linha 1:
This command will extend sda2 physical volume in the scenario where the disk has been resized. <br>
Before run this command make sure /dev/sda2 is the last partition on disk or you may have a huge problem. <br>
<syntaxhighlight lang=bash>
<syntaxhighlight lang=bash>
function RESIZE_PV() {
function RESIZE_PV() {

Edição atual tal como às 18h35min de 10 de maio de 2021

This command will extend sda2 physical volume in the scenario where the disk has been resized.
Before run this command make sure /dev/sda2 is the last partition on disk or you may have a huge problem.

function RESIZE_PV() {
    parted /dev/sda print 
    parted /dev/sda unit b  print 
    pvs
    BEGIN=$(parted /dev/sda unit b  print  | grep -w 2  | awk '{ print $2} ')
    parted -s /dev/sda rm 2
    parted -s /dev/sda mkpart primary $BEGIN 100%
    partx /dev/sda2
    pvresize /dev/sda2
    parted /dev/sda print 
    parted /dev/sda unit b  print 
    pvs
}
$ RESIZE_PV