Nikolaos Milas
2017-Jun-01 15:06 UTC
[CentOS] Urgent: Need to change the location of a directory tree
Hi, I am running CentOS 7 (fully updated) on a VM. This has a mounted nfs share (via fstab) (which mounts a remote storage system) on which we have created the home directories of 2 users Here are the home directories: /mynfsmount | |--/user1 |--/user1 We want to move this whole branch from the mounted NFS share to the local disk. What is the way to do so? Would it be enough to create a "mirror" branch on the local disk, say: /mynfsmount2 | |--/user1 |--/user1 (which is no more an nfsmount, despite the name), then remove the mount from fstab and the initial mount point /scimount and finally rename /scimount2 to /scimount ? Does it sound OK? Will we need to modify any other system info so that the above homes work correctly at their new location? Thanks a lot, Nick
Nikolaos Milas
2017-Jun-01 15:31 UTC
[CentOS] Urgent: Need to change the location of a directory tree
On 1/6/2017 6:06 ??, Nikolaos Milas wrote:> ...then remove the mount from fstab and the initial mount point > /scimount and finally rename /scimount2 to /scimount ?Correction: ...then remove the mount from fstab and the initial mount point /mynfsmount and finally rename /mynfsmount2 to /mynfsmount ? Sorry for the confusion. (I changed the directory names while editing the mail, but I failed to change them all.) Looking forward to your advice. Thanks, Nick
Mauricio Tavares
2017-Jun-01 18:52 UTC
[CentOS] Urgent: Need to change the location of a directory tree
On Thu, Jun 1, 2017 at 11:31 AM, Nikolaos Milas <nmilas at noa.gr> wrote:> On 1/6/2017 6:06 ??, Nikolaos Milas wrote: > >> ...then remove the mount from fstab and the initial mount point /scimount >> and finally rename /scimount2 to /scimount ? > > > Correction: > > ...then remove the mount from fstab and the initial mount point /mynfsmount > and finally rename /mynfsmount2 to /mynfsmount ? > > > Sorry for the confusion. (I changed the directory names while editing the > mail, but I failed to change them all.) > > Looking forward to your advice. >So, 1. Make sure both users are not logged in. 2. Create new mountpoints 3. Edit fstab to point to new mountpoints. 4. Edit /etc/passwd to refer to the new mountpoint for the two users 5. mount -a Would that do the trick for you?> Thanks, > > Nick > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos