ubuntu 14.04 installed on 128Gb ssd zfs pool ("zfshome") across 3x3TB disks, containing audio/video/tv etc.

I originally built this as a nas4free NAS serving my windows boxes around the house.I'm now tryin to turn it into a media server,and being always on,wanted the stabilty of ubuntu,(now that it's more user friendly, in terms of normal users...) Tt seems to me that putting /home/user on the zpool made sense,(being a newby I do frequent reinstalls), but after a week I cannot find clear instructions how to achieve it, and after so many attempts am thoroughly confused.

Any help appreciated, Ian

share|improve this question
  1. YMMV. Make sure anything said below makes sense to you.

  2. Ensure that you can login, via at least one admin-enabled account (can manage ZFS), when the NAS is down.

  3. Copy, via tar or rsync (not cp) all of your old HOME directory (/home/you) to the new HOME directory, mounted some temporary place line /media/$USER/newhome.

  4. Backup, then edit /etc/fstab to NFS mount the appropriate NAS directory as /home/you. See man fstab about NFS mounts, man mount, too. Use the auto option. Do NOT mount it yet.

  5. Carefully delete most of the files/directories in your old HOME directory, just leaving enough of the structure so that you can login with the files here, in case the mount fails.

  6. logout and login to verify what you did in step 4.

  7. If all seems OK, mount the NAS HOME directory via:

    sudo mount /home/you

  8. sudo shutdown -r now to reboot your system, make all processes forget about your old $HOME, and start over with /home/you mounted.

share|improve this answer
    
thanks for responding , but I 'm confused,the zpool is on the same pc as the /home/user I want to move...and from all I've read zfs automounts on boot so fstab shouldnt be involved .I've been creating th new directory with.........sudo zfs create zfshome/newhomez.......and then, – nodsa Oct 8 '15 at 9:45
    
..and then,...sudo zfs setmountpoint=/home zfshome/newhomez ......and then............sudo usermod -m -d /zfshome/newhomez user – nodsa Oct 8 '15 at 9:54

zstore is pool, ian is user1

logged in as user1 do;

.....create user2 with admin priveliges .....create new folder sudo mkdir /temphome ....move user2's home..... sudo usermod -m -d /temphome/user2 user2 ..reboot... ....login as user2 ....move user1's home sudo usermod -m -d /temphome/user1 user1

...create empty dataset sudo zfs create zstore/zhome ..as /home is now empty, mount new dataset in/home sudo zfs set mountpoint=/home zstore/zhome ...move user1's home back to /home sudo usermod -m -d /home/user1 user1 ...reboot .. login as user1 ...move user2's home from temp back to /home sudo usermod -m -d /home/user2 user2 ...tidy up sudo rmdir /tmphome

all done,

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.