I want to move my /Homes folder (with the Homes folder for 100+ users) to a different storage system, it’s currently on an array and takes up almost 12 TB of data.
How best to move it?
I want to move my /Homes folder (with the Homes folder for 100+ users) to a different storage system, it’s currently on an array and takes up almost 12 TB of data.
How best to move it?
For single users, you could use the usermod
(e.g. usermod -m -d /newhome/username username
). However, if you then create new users under the Rockstor WebUI, the default will still be /home
, I think. and doing this for 100+ users might be a bit cumbersome.
So, you probably want to do a move of the home
contents to a new partition (not the /home
directory itself, though) and then mount the “new home” into the /home
folder …
Thanks for this. It’s interesting but I’m not sure it will accomplish what I want. I want to be able to retire the Pool which has /Homes.
To be clear, these are not local Rockstor users, these are Active Directory users. Moving the data is easy but then I need to:
Many thanks for any info or guidance!
Ah, that seems to be more complicated then.
Just for completeness, on my comment above:
You can actually change the default setting in this file:
/etc/default/useradd
The defaults are something like this:
# useradd defaults file
GROUP=100
HOME=/home
INACTIVE=-1
EXPIRE=
SHELL=/bin/bash
SKEL=/etc/skel
USRSKEL=/usr/etc/skel
CREATE_MAIL_SPOOL=yes
so, making changes here, will at least address the local user creation defaults.
Though that doesn’t help your challenge with the active directory users.
If I read correctly, for new authenticated users you can override the defaults also using the /etc/realmd.conf
file with e.g.:
[users]
default-home = /home/%U
default-shell = /bin/bash
But there seems to be a different approach for new users if already joined to the realm, which involves adding overrides to the sssd.conf
file.
Moving the home directories while preserving permissions and other attributes, you could use mv
or possibly even rsync
but this might be different on OpenSUSE, so testing would be important.
This (admittedly old) post suggests rsync
with additional flag on preserving acl
s, etc. as mv
might change the owner:group:
You could decide to not use the “–remove-source-files” since you’re planning on retiring the original home
location.