pyth0n3 Posted October 19, 2011 Report Share Posted October 19, 2011 (edited) 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 grupului3.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 usedDin output se va extrage numele grupului numele volumului si spatiu folosit pe filesystem nume grup = dg_production_dbnume volum = v_production_db_01spatiu = 94 % allocation usedSe vor cauta informatiile in legatura cu modul de layout a volumului, marimea actuala a grupului "dg_production_db" ###Codvxprint -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 CONCATVa trebui observat cat spatiu este disponibil in grup ###Codvxassist -g dg_production_db maxsize layout=concat###OutputMaximum volume size: 8643584 (8441Mb)Din output se deduce ca spatiul nu este suficient pentru a extinde filesystem-ul cu 60 GbIn acest caz vor trebui adaugate alte disk-uri Se dau urmatoarele discuri:c88t8d1 - 6291456 Kbytesc88t8d2 - 54000640 KbytesInainte de a folosi diskurile se va controla prezenta lor in system ###Coddiskinfo /dev/rdsk/c88t8d1diskinfo /dev/rdsk/c88t8d2###OutputSCSI describe of /dev/rdsk/c88t8d1: vendor: DGC product id: CX3-80WDR10 type: direct access size: 6291456 Kbytes bytes per sector: 512SCSI describe of /dev/rdsk/c88t8d2: vendor: DGC product id: CX3-80WDR10 type: direct access size: 54000640 Kbytes bytes per sector: 512Inainte de a introduce disk-urile intrun volum acestea trebuie configurate pentru VXVM###Codvxdisksetup -i c88t8d1 c88t8d2 Pentru a verifica discurile configurate ###Codvxdisk list | grep -E "c88t8d1|c88t8d2"###Outputc88t8d1 simple - - onlinec88t8d2 simple - - onlineIn acest caz disk-urile se pot introduce in disk_group , nu inainte de a verifica modul in care trebuie introduse###Codvxprint -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 c213c213t8d1=c88t8d1c213t8d2=c88t8d2 ###Codvxdg -g dg_production_db adddisk c213t8d1=c88t8d1vxdg -g dg_production_db adddisk c213t8d2=c88t8d2Cu urmatoarea sintaxa se poate controla daca discurile au fost introduse cu success in disk_group###Codvxprint -g dg_production_db -ht | grep -E "c88t8d1|c88t8d2"###Outputdm 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###Codvxassist -g dg_production_db maxsize layout=concat###OutputMaximum volume size: 60560384 (59141Mb)Avand spatiul necesar se poate extinde volumul logic "v_production_db_01"###Codvxassist -g dg_production_db growby v_production_db_01 59141mUn exit status de 0 conferma sintaxa precedenta###Codecho $?Urmatoarea sintaxa va determina cu cat va trebui marit filesystem-ul ###Codvxprint -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 489579584Avand in vedere faptul ca filesystem-ul vine modificat in timp ce este montat se potefectua urmatoarele verificari in real time inainte si dupa extensieStatistica spatiu inainte de a extinde###Codcd /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 usedExtinderea filesystem-ului###Codfsadm -F vxfs -b 489579584 /production_db_01Statistica spatiu dupa extensie ###Codcd /production_db_01df -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 usedRezultat inainte de extensie94 % allocation usedRezultat dupa extensie 82 % allocation usedDownloadwget http://sprunge.us/TUhC -O vxvm_filesystem_extend.txt Edited October 19, 2011 by pyth0n3 Quote Link to comment Share on other sites More sharing options...
Zatarra Posted October 19, 2011 Report Share Posted October 19, 2011 Ms fain, BTW vezi ca mai am niste AIX-uri pt tine, cauta-ma. Quote Link to comment Share on other sites More sharing options...