Child pages
  • How to resize the filesystem in op5 Applicance
Skip to end of metadata
Go to start of metadata

Version info

This partition-layout will be changed in APS 6.5 to use 2GB for /tmp if the hard drive is smaller than 100GB, or in other case 15GB for drives larger than 100GB.


On older op5 Appliance server installations, the partition layout for the /tmp directory has a fixed size of approximately 15GB. In normal cases this is an non-issue but when running in virtual systems or in test-environments where you'll want to keep the virtual drives as small as possible you might want to change this. This can easily be solved by resizing the volume using LVM. Just follow the simple steps below.


  1. Make sure that the filesystem on the lv_tmp device is mounted on /tmp, by executing:
    df -h /tmp
    The output generated by this command should not mention lv_root.
  2. Create a backup of any data found in /tmp which you want to keep for the future (the data in /tmp will be permanently deleted in the next steps).
  3. Unmount the current filesystem mounted on /tmp:
    umount /tmp
  4. Make sure that the filesystem is no longer mounted on /tmp:
    df -h /tmp
    This time it should mention lv_root.
  5. Decrease the size of the lv_tmp device by 10GB:
    lvresize -L -10G /dev/vg_op5system/lv_tmp

  6. Create a new filesystem on the lv_tmp device:
    mkfs.ext4 /dev/vg_op5system/lv_tmp

  7. Mount the new filesystem:
    mount /tmp 

  8. Make sure that the filesystem was properly mounted:
    df -h /tmp
    This time, the output should once again show the lv_tmp device.

  9. Set proper permissions for the /tmp mount:
    chmod 1777 /tmp
  10. There is now 10GB free space in the volume group, hence 10GB can be added to the lv_root device:
    lvresize -L +10G /dev/vg_op5system/lv_root

  11. Resize the filesystem on the lv_root device:
    resize2fs /dev/vg_op5system/lv_root
  12. Verify that the / mount is now 10GB larger, and the /tmp mount 10GB smaller than before:
    df -h


The size change of 10GB is just an example. By executing the command lvs you can find out the size of the current volumes. Just make sure to shrink the lv_tmp device the same amount as you want to increase the lv_root device with. In some systems there's already free space in the volume group. To find out, run the command vgs.