Total Pageviews

Wednesday 26 November 2014

Increase Mount-Point Size Oracle VM


[root@node11g ~]# df -kh
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_node1-lv_root
                       24G   22G   57M 100% /
tmpfs                1012M  272K 1011M   1% /dev/shm
/dev/sda1             485M   53M  408M  12% /boot
Softwares             200G   88G  113G  44% /media/sf_Softwares
/dev/sr0               55M   55M     0 100% /media/VBOXADDITIONS_4.2.6_82870


[root@node11g ~]# df -hP
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_node1-lv_root   24G   22G   57M 100% /
tmpfs                1012M  272K 1011M   1% /dev/shm
/dev/sda1             485M   53M  408M  12% /boot
Softwares             200G   88G  113G  44% /media/sf_Softwares
/dev/sr0               55M   55M     0 100% /media/VBOXADDITIONS_4.2.6_82870


1. create a fixed size disk using oracle vm storage option.


2. [root@node11g ~]# fdisk /dev/sde
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xe3757b20.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1889, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-1889, default 1889):
Using default value 1889

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

[root@node11g ~]#  pvcreate /dev/sde1
  Physical volume "/dev/sde1" successfully created

Add the physical volume to the existing volume group using the vgextend command. use  df -h to find the name of the volume group.

[root@node11g ~]# df -hP
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_node1-lv_root   24G   22G   57M 100% /
tmpfs                1012M  272K 1011M   1% /dev/shm
/dev/sda1             485M   53M  408M  12% /boot
Softwares             200G   88G  113G  44% /media/sf_Softwares
/dev/sr0               55M   55M     0 100% /media/VBOXADDITIONS_4.2.6_82870


[root@node11g ~]# vgextend vg_node1 /dev/sde1
  Volume group "vg_node1" successfully extended

Get the free space available on the physical volume type vgdisplay [volume group]  and use pvdisplay to check if everything is fine or not .

 [root@node11g ~]# vgdisplay vg_node1
  --- Volume group ---
  VG Name               vg_node1
  System ID          
  Format                lvm2
  Metadata Areas        2
  Metadata Sequence No  4
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               2
  Max PV                0
  Cur PV                2
  Act PV                2
  VG Size               42.04 GiB
  PE Size               4.00 MiB
  Total PE              10763
  Alloc PE / Size       7059 / 27.57 GiB
  Free  PE / Size       3704 / 14.47 GiB
  VG UUID               6hNRBO-pgiT-5EYj-jT3i-1jJs-Z5vw-OrOO7A
 
 [root@node11g ~]# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda2
  VG Name               vg_node1
  PV Size               27.58 GiB / not usable 3.00 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              7059
  Free PE               0
  Allocated PE          7059
  PV UUID               jQ2lO6-W7Qu-t6Ac-8f8Z-u7cn-o12I-ofBwIy
 
  --- Physical volume ---
  PV Name               /dev/sde1
  VG Name               vg_node1
  PV Size               14.47 GiB / not usable 1.74 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              3704
  Free PE               3704
  Allocated PE          0
  PV UUID               MuSKdx-Ebz3-DFO2-jrNV-356l-1xCl-JyBVhA
 
[root@node11g ~]#
Extend the logical volume by the amount of free space:

[root@node11g ~]# lvdisplay
  --- Logical volume ---
  LV Path                /dev/vg_node1/lv_root
  LV Name                lv_root
  VG Name                vg_node1
  LV UUID                0Uz7cN-4BS5-hvMI-8Myb-Gf0V-j8gd-AbhS9x
  LV Write Access        read/write
  LV Creation host, time localhost.localdomain, 2014-12-16 05:08:21 -0500
  LV Status              available
  # open                 1
  LV Size                23.70 GiB
  Current LE             6066
  Segments               2
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           252:0
 
  --- Logical volume ---
  LV Path                /dev/vg_node1/lv_swap
  LV Name                lv_swap
  VG Name                vg_node1
  LV UUID                f2LAgl-3iwl-m3tW-lyDE-39wx-CHQ6-gc2Evk
  LV Write Access        read/write
  LV Creation host, time localhost.localdomain, 2014-12-16 05:08:27 -0500
  LV Status              available
  # open                 2
  LV Size                3.97 GiB
  Current LE             1016
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           252:1
 
[root@node11g ~]# pvscan
  PV /dev/sda2   VG vg_node1   lvm2 [27.57 GiB / 0    free]
  PV /dev/sde1   VG vg_node1   lvm2 [14.47 GiB / 14.47    free]


[root@node11g ~]# lvextend /dev/vg_node1/lv_root /dev/sde1
  Extending logical volume lv_root to 38.07 GiB
  Logical volume lv_root successfully resized

[root@node11g ~]# resize2fs /dev/vg_node1/lv_root
resize2fs 1.41.12 (17-May-2010)
Filesystem at /dev/vg_node1/lv_root is mounted on /; on-line resizing required
old desc_blocks = 2, new_desc_blocks = 3
Performing an on-line resize of /dev/vg_node1/lv_root to 9980928 (4k) blocks.
The filesystem on /dev/vg_node1/lv_root is now 9980928 blocks long.

[root@node11g ~]# df -kh
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_node1-lv_root
                       38G   23G   15G  60% /
tmpfs                1012M  486M  526M  48% /dev/shm
/dev/sda1             485M   53M  408M  12% /boot
Softwares             200G   88G  113G  44% /media/sf_Softwares
/dev/sr0               55M   55M     0 100% /media/VBOXADDITIONS_4.2.6_82870

1 comment:

  1. Jadwal Pertandingan Ayam SV388 7 Maret 2019 - Minggu, Ujung Pandang 10 Maret 2019 – Pada Hari Tersebut Akan Di Laksanakan Berbagai Pertandingan Sabung Ayam Secara Live di Arena Sabung Ayam Thailand.

    Situs Judi Sabung Ayam Online SV388 Merupakan Situs Judi Asal Thailand Yang Sangat Terkenal Dengan Permainan Sabung Ayam Yang Fair dan Menghibur Para Penonton Judi Sabung Ayam.

    Untuk Info Lebih Lanjut Bisa Hub kami Di :
    wechat : bolavita
    line : cs_bolavita
    whatsapp : +628122222995
    BBM: BOLAVITA

    ReplyDelete