Server drive swapping

Hello Community!

I will start by explaining my scenario and then explain the desired outcome.

I am running Ubuntu server (Linux ubuntu 5.4.0-52-generic according to “uname -a”). I currently have a series of drives partitioned for use with my Nextcloud. I have them all merged using MHDDFS into the /mnt directory.

What I would ultimately like to do is the following:

  1. Add a new harddrive and merge to the existing MHDDFS system
  2. Move all of the files etc… from one of the older drives to the newly installed one
  3. Remove the old drive for use as a drive in a different machine.

What I really need to know is can I simply use cp -R to move all of the existing information that is currently in the old drive (call it drive 1) to the new drive (call it drive 2) and change the information in /etc/fstab for the mount points and MHDDFS without any serious repercussions to my Nextcloud instance? Are there some unknowns I am not anticipating such as other files that would need to be updated within Nextcloud pointing to this new disk partition? Please let me know or direct me to some documentation on this process.

Thank you everybody!

I’m not too familiar with MHDDFS (I use BTRFS for data protection, replication and snapshots, though ZFS offers similar features), but if it allows for removing old drives from the merge-set, this should work.

Caveats - file ownership, permissions, and final paths should be the same by the time you’re finished. If for some reason you need to change mount points or paths from what they were, you might try this howto on the forum as a starting place for pointing Nextcloud to the new path.

Best of luck to you!