NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.

Forum Discussion

timhood's avatar
Dec 05, 2019
Solved

ReadyNAS 428 - Move Home Folders to different volume

I initialized my ReadyNAS 428 with a three-disk volume ("data") and migrated data to shares I created on that volume. Later, I disabled X-RAID so that I could add a separate five-disk volume ("backup...
  • Sandshark's avatar
    Sandshark
    Dec 06, 2019

    What follows appears to work.  After I did it, everything seemed to work correctly via the GUI and SMB.  I also successfully created a new user and a home folder was created when I accessed the NAS with that user name.  I created a private Time Machine for that user, and one was created in the .timemachine directory of the new volume, but have no way to test it.  I did this on a virtual machine, and probably haven't put it through all potential scenarios that affect or use home folders.  One thing to note is that the location of the shared Time Machine folder was also moved to the new volume.  I believe this is linked to the fact that you assign a user name for the shared Time Machine, even though that user is not visible on the GUI Accounts page.

     

    As with any other "under the covers" manipulation with SSH, insure your backup (including home folders) is current in case you end up having to factory default to fix things.  And, of course, Netgear is not going to help you get out of any mess this creates.

     

    Assuming original volume data and new volume newvol:

     

    # btrfs subvolume create /newvol/home
    # chown admin:admin /newvol/home

    edit   /etc/frontview/account.conf, changing home_volume!!data  to  home_volume!!newvol

    edit /etc/systemd/system/multi-user.target.wants/home.mount, changing What=/data/home  to  What=/newvol/home

    (I like nano for editing, just apt-get install nano)


    Reboot
    Execute mkhomedir_helper <username> for every user to create home shares (including admin).  This is much easier than doing it manually, and insures file permissions are correct.  Make absolutely certain you have a home folder for each user before the next step, or it will create a folder instead of a share (subvolume) for users you missed, which will be problematic.

     

    Copy home folder content with cp  -rp  /data/home/*  /newvol/home

     

    If any users have a private Time Machine, go back into the GUI Backup page and select Time Machine.  Then open the settings (gear icon) for that share and re-apply them.

     

    Reading I have done seems to say that you can just copy the Time Machine files, so cp  -rp  /data1/.timemachine/*  /newvol/.timemachine should do that.  Again, I have no way to test this.  As is the case with user shares, make certain you've re-created the time machine for each user before you do this.  Oddly, the user private Time Machine shares are subvolumes, but the shared one is just a normal subdirectory.

     

    Reboot and check all is OK via the GUI and any protocols you use (SMB, FTP, etc.).

     

    Now you can delete the old home folders and /data/home, but note that btrfs subvolume delete is not recursive and rm and rmdir don't work on btrfs subvolumes, so you have to do it in steps.  If you can spare the space for a while, I'd leave them there till you are sure everything is working right.  So long as the subvolumes are still there, you can revert back just by reversing the edits of the two files above, and you should probably create a home directory for any users added since you initially switched, using mkhomedir_helper.  Just be sure to update any content of the folders from the new ones back to the old.

     

     If you do go through this, please report back your results, especially with regard to Time Machine.

NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology! 

Join Us!

ProSupport for Business

Comprehensive support plans for maximum network uptime and business peace of mind.

 

Learn More