saveIncrease the space on your ownCloud or Nextcloud VM
This is a guide on how to extend the space on a Ubuntu 14.04/16.04/18.04 with a LVM file system hosted on VMware.

It’s now possible to download a 500 GB, 1 TB or a 2 TB VM.

Please note that this guide won’t work for /mnt/ncdata on Nextcloud VMs from 13.0.2 and onwards due to a new file system called ZFS in the later versions of the VM. Though there’s a community member who has taken the time to write a new guide


The pre-configured VM holds a data disk that is ~40 GB as you may have noticed. We decided to make it that size because in most cases that’s enough, but not always. Here is a guide on how to add space to the existing VM. Use this to expand your space with an additional hard drive, partition or existing space on the hard drive that you choose to have the VM on. You can also use this guide made by a user of the VM.

  1. Make a backup of your pre-configured Vm!
  2. Shut down the VM
  3. Extend your Virtual DISK

    Use VMware or VirutalBox do to this, and after it’s done you have to make it available to your ownCloud VM


  4. Boot the VM

    Log in as ocadmin/ncadmin and then become root

    :~$ sudo -i
  5. SCAN the new disk space
    :~$ echo "- - -" > /sys/class/scsi_host/host0/scan
  6. Use CFDISK to make a new partition
    :~$ cfdisk /dev/sda
  7. Create new partition

    Select the empty drive and choose [New]:


    When it asks you for the size, just press [enter] to choose the entire disk.

  8. Change Hex code

    Choose [Type]

    Enter filesystem type: 8E (Linux LVM)
  9. Write changes to disk
    Are you sure you want to write the partition table to disk? (yes or no): yes
  10. Quit cfdisk


  11. Rescan the partitions
    :~$ partprobe -s
  12. check the nEWly created partition
    :~$ fdisk -l

    Likley it appears as /dev/sda6

  13. Format the partition

    Use the partition you identified in the previous step and type

    :~$ mkfs.ext4 /dev/sda6
  14. Create new partition
    :~$ pvcreate /dev/sda6
  15. Extend the Volume Group
    :~$ vgextend owncloud-vg /dev/sda6
    :~$ lvextend -L+XXG /dev/nextcloud-vg/root

    Change XX to the same amount you extended the .vmdk with.

  16. Resize the disk to the new size
    :~$ resize2fs /dev/nextcloud-vg/root
  17. Reboot
    :~$ sudo reboot
  18. Check new space after you rebooted
    :~$ df -h

 Pro tip

Secure your ownCloud against brute-force attempts. Setup Fail2ban! If you use Nextcloud you don’t need to, it’s built in.