Shrink partition NC


I have made a mistake trying to increase the disk on my NC (version 14) installation.
I have followed this guide:

  • Mount an ISO such as from http://www.system-rescue-cd…
  • I use VMware Player - when the VM boots up, press the Escape key
  • This brings up the Boot menu - select the DVD drive
  • Once you have booted into the live system rescue cd, select Gparted
  • Deactivate the LVM partition (won’t work unless you do this)
  • Resize both partition and LVM partition - then apply (that seems to Activate at the same time)
  • Go into Webmin - I know hardcore Linux user don’t like it but as a Windows user, it is my best friend
  • Go to Hardware/Logical Volume Management/Logical Volumes
  • Select the root drive, select the option that says Use all free VG space and click Save
  • Reboot and test with df -h

But since version 13 NC uses ZFS, so i have added a new disk and increased the pool so that is working fine. But i would like to get my 150GB back which i added using the guide above. Could somebody tell me how to shrink the “root”? I am very much a Windows kinda guy, so help in detail is much appreciated.


The guide is outdated and as you can see in the top text it says:

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

So if you ran the linked guide it should work. I’ve got feedback from many happy users that it did work.

To answer your question, if your new data drive is the new ZFS mount, you should just be able to remove it, since it’s not in use anymore. BUT PLEASE DO A BACKUP before you attempt anything like that One of the good things with running a VM is that you can make snapshots. So take a snapshot, do a backup of everything, and then attempt to remove it.

NOTE: As I’m not 100% sure what you have done or how your current state is my instructions may be incorrect.

If you need professional help, you can always visit the shop and I can have a closer look at your system via Teamviewer.

Daniel thanks for your reply.
That is the guide is have used to en en large my /mnt/ncdata.

One question, i would like to remove the original disk from the ZFS pool. So that all the user data will be on the new virtual hard disk, and not spread over more then 1 discs.

Why did you changed it into a ZFS pool? ZFS is sort of RAID but virtually that doesn’t make much sense. As far as i know, but you know more about this than me. So please enlight and educated me :slight_smile: (I am not saying you are wrong, i am just curious)

Thanks for all your help so far.

ZFS is sort of RAID

Well, that’s not true. ZFS is a filesystem, and superior EXT4 in many ways.

If you want to know more about ZFS you can Google it, like this for example:

I hope that helps! :slight_smile:


Okee i will look into that, thanks for the url. But the more important question was is it possible to remove the original disc from the ZFS pool? :stuck_out_tongue:

This url says it is possible but I am not sure if it will not cause any problems later on.

was is it possible to remove the original disc from the ZFS pool?

I never done it before, but I’m sure I’d manage to solve it, or maybe not. The thing is it’s not cleanly done, so I can’t say anything without looking at your system first.

In general, keep it as is or do a reinstallation, migrating the DB and DATA. The latter would give you the best result.

Okee, reinstallation you mean:

  • setup clean NC installation with different IP address.
  • migrate DB and DATA

Two questions:
Will i be able to use the same name for my NC ? I use now and would like to keep using that name.

How do i migrate the DB and DATA?

Yes, you will be able to use the same name. The DNS is not bound to a specific server in that sense.

Read the Nextcloud documentation here, or buy support.