Sunday, August 24, 2014

Resize Checkpoint Firewall's Disk/Partition Space (Gaia and Splat Platform)

Checkpoint Firewall Appliances are using Logical Volume Manager (LVM)
Sometimes, the logic volume do not have enough size to perform your operations. Checkpoint Expert Mode have some commands to modify the volume size while keeping your data on the disk.

1. Check volume size in the volume group vg_splat

[Expert@gw-a9533e:0]# lvs
  /dev/hdc: open failed: No medium found
  LV         VG       Attr   LSize Origin Snap%  Move Log Copy%
  lv_current vg_splat -wi-ao 5.00G                             
  lv_log     vg_splat -wi-ao 3.00G

From dh -h command it shows 97% usage on the system volume vg_splat-lv_current. R77.10 will not allow you to operation the firewall if it found insufficient disk space with the warning "there is insufficient disk space to complete the operation'

[Expert@gw-a9533e:0]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_splat-lv_current
                      4.9G  4.8G  52M  97% /
/dev/sda1             289M   24M  251M   9% /boot
tmpfs                 980M     0  980M   0% /dev/shm
/dev/mapper/vg_splat-lv_log
                      3.0G  175M  2.6G   7% /var/log


2. Check free space on the disk

[Expert@gw-a9533e:0]# pvs
  /dev/hdc: open failed: No medium found
  PV         VG       Fmt  Attr PSize  PFree
  /dev/sda3  vg_splat lvm2 a-   14.69G 6.69G

3. Check how much space assigned to the logical volume

[Expert@gw-a9533e:0]# lvs
  /dev/hdc: open failed: No medium found
  LV         VG       Attr   LSize Origin Snap%  Move Log Copy%
  lv_current vg_splat -wi-ao 5.00G                             
  lv_log     vg_splat -wi-ao 3.00G      

4. Resize the logic volume from 5G to 11G

[Expert@gw-a9533e:0]# lvresize -L 11G vg_splat/lv_current
  /dev/hdc: open failed: No medium found
  Extending logical volume lv_current to 11.00 GB
  Logical volume lv_current successfully resized


 Check the space again with pvs command, there is only 704M free space left
[Expert@gw-a9533e:0]# pvs
  /dev/hdc: open failed: No medium found
  PV         VG       Fmt  Attr PSize  PFree 
  /dev/sda3  vg_splat lvm2 a-   14.69G 704.00M


[Expert@gw-a9533e:0]# lvs
  /dev/hdc: open failed: No medium found
  LV         VG       Attr   LSize  Origin Snap%  Move Log Copy%
  lv_current vg_splat -wi-ao 11.00G                             
  lv_log     vg_splat -wi-ao  3.00G  

5. Resize the file system                    

[Expert@gw-a9533e:0]# resize2fs /dev/vg_splat-lv_current
resize2fs 1.39 (29-May-2006)
Filesystem at /dev/vg_splat/lv_current is mounted on /; on-line resizing required
Performing an on-line resize of /dev/vg_splat/lv_current to 2883584 (4k) blocks.
The filesystem on /dev/vg_splat/lv_current is now 2883584 blocks long.

6. Verify with df command


[Expert@gw-a9533e:0]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_splat-lv_current
                       11G  3.8G  6.4G  38% /
/dev/sda1             289M   24M  251M   9% /boot
tmpfs                 980M     0  980M   0% /dev/shm
/dev/mapper/vg_splat-lv_log
                      3.0G  176M  2.6G   7% /var/log


References:

7 comments:

  1. thanks mate. it saved at least one hour of my life :-)

    ReplyDelete
    Replies
    1. You are welcome. Glad to see the post helped you.

      Delete
  2. Thankyou. Worked a charm on R77.20

    ReplyDelete
  3. thank you! worked well

    ReplyDelete
  4. Thanks really very helpful

    ReplyDelete
  5. Tnx. You great :)

    ReplyDelete

NetSec Youtube Videos