Jump to content
pyth0n3

[Unix/HP-UX] Veritas Volume Manager (extending a filesystem)

Recommended Posts

Request:extinderea filesystem-ului cu 60 Gb

FileSystem = /production_db_01

OS Type: Unix | HP-UX B.11.11

Obiective:

Avand in vedere faptul ca vine utilizat VxVM

1.Se cauta numele grupului unde se afla discurile

2.Se cauta informatiile in legatura cu marimea actuala a grupului

3.Se extinde spatiul grupului in cazul in care spatiul disponibil nu este indeajuns

4.Se extinde file system-ul

Numele grupului de diskuri poate fi gasit in diverse moduri ,cunoscand punctul de mount o metoda ar fi urmatoarea

###Cod:


cd /production_db_01
df -k .

###Output:


/production_db_01 (/dev/vx/dsk/dg_production_db/v_production_db_01) : 429019200 total allocated Kb
24772256 free allocated Kb
404246944 used allocated Kb
94 % allocation used

Din output se va extrage numele grupului numele volumului si spatiu folosit pe filesystem

nume grup = dg_production_db

nume volum = v_production_db_01

spatiu = 94 % allocation used

Se vor cauta informatiile in legatura cu modul de layout a volumului, marimea actuala a grupului "dg_production_db"

###Cod


vxprint -htg dg_production_db | grep v_production_db_01

###Output


...
v_production_db_01 ENABLED ACTIVE 489579584 CONCAT - RW
...

Din output am extras modul de layout a volumului creat si anume CONCAT

Va trebui observat cat spatiu este disponibil in grup

###Cod


vxassist -g dg_production_db maxsize layout=concat

###Output


Maximum volume size: 8643584 (8441Mb)

Din output se deduce ca spatiul nu este suficient pentru a extinde filesystem-ul cu 60 Gb

In acest caz vor trebui adaugate alte disk-uri

Se dau urmatoarele discuri:

c88t8d1 - 6291456 Kbytes

c88t8d2 - 54000640 Kbytes

Inainte de a folosi diskurile se va controla prezenta lor in system

###Cod


diskinfo /dev/rdsk/c88t8d1
diskinfo /dev/rdsk/c88t8d2

###Output


SCSI describe of /dev/rdsk/c88t8d1:
vendor: DGC
product id: CX3-80WDR10
type: direct access
size: 6291456 Kbytes
bytes per sector: 512

SCSI describe of /dev/rdsk/c88t8d2:
vendor: DGC
product id: CX3-80WDR10
type: direct access
size: 54000640 Kbytes
bytes per sector: 512

Inainte de a introduce disk-urile intrun volum acestea trebuie configurate pentru VXVM

###Cod


vxdisksetup -i c88t8d1 c88t8d2

Pentru a verifica discurile configurate

###Cod


vxdisk list | grep -E "c88t8d1|c88t8d2"

###Output


c88t8d1 simple - - online
c88t8d2 simple - - online

In acest caz disk-urile se pot introduce in disk_group , nu inainte de a verifica modul in care trebuie introduse

###Cod


vxprint -g dg_production_db -ht | more

###Output


...
dm c213t1d1 c88t1d1 simple 1024 251657932 -
dm c213t2d2 c88t2d2 simple 1024 52527502 -
...

Vom construi comenzile cu urmatoarea sintaxa respectand valorile c213

c213t8d1=c88t8d1

c213t8d2=c88t8d2

###Cod


vxdg -g dg_production_db adddisk c213t8d1=c88t8d1
vxdg -g dg_production_db adddisk c213t8d2=c88t8d2

Cu urmatoarea sintaxa se poate controla daca discurile au fost introduse cu success in disk_group

###Cod


vxprint -g dg_production_db -ht | grep -E "c88t8d1|c88t8d2"

###Output


dm c213t8d1 c88t8d1 simple 1024 6290158 -
dm c213t8d2 c88t8d2 simple 1024 53999345 -

Folosind urmatoparea sintaxa se poate determina daca spatiul grupului a fost marit

Daca sintaxele precedente au nu au avut greseli , va trebui sa existe un output pozitiv

###Cod


vxassist -g dg_production_db maxsize layout=concat

###Output


Maximum volume size: 60560384 (59141Mb)

Avand spatiul necesar se poate extinde volumul logic "v_production_db_01"

###Cod


vxassist -g dg_production_db growby v_production_db_01 59141m

Un exit status de 0 conferma sintaxa precedenta

###Cod


echo $?

Urmatoarea sintaxa va determina cu cat va trebui marit filesystem-ul

###Cod


vxprint -g dg_production_db -th | grep v_production_db_01

###Output


...
v_production_db_01 ENABLED ACTIVE 489579584 SELECT - fsgen
...

Se va extrage urmatoarea valoare pt extensie 489579584

Avand in vedere faptul ca filesystem-ul vine modificat in timp ce este montat se pot

efectua urmatoarele verificari in real time inainte si dupa extensie

Statistica spatiu inainte de a extinde

###Cod


cd /production_db_01
df -k .

###Output


/production_db_01 (/dev/vx/dsk/dg_production_db/v_production_db_01) : 429019200 total allocated Kb
24772256 free allocated Kb
404246944 used allocated Kb
94 % allocation used

Extinderea filesystem-ului

###Cod


fsadm -F vxfs -b 489579584 /production_db_01

Statistica spatiu dupa extensie

###Cod


cd /production_db_01
df -k .

###Output


/production_db_01 (/dev/vx/dsk/dg_production_db/v_production_db_01) : 489151520 total allocated Kb
84376608 free allocated Kb
404774912 used allocated Kb
82 % allocation used

Rezultat inainte de extensie

94 % allocation used

Rezultat dupa extensie

82 % allocation used

Download

wget http://sprunge.us/TUhC -O vxvm_filesystem_extend.txt

Edited by pyth0n3
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...