Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] move/change home directory



Hi Thomas,


On Mon, Feb 17, 2020 at 6:06 PM Thomas Blasejewicz <nyuwa@example.com> wrote:
> I was wondering whether I could create one to have /home in a dedicated
> partition.
> Googling gave a number of very frightening results, like
> https://www.tecmint.com/move-home-directory-to-new-partition-disk-in-linux/

I only took a quick look at the link, but its instructions appear to be correct.

There are so many things to do because it assumes you have to first
set up (i.e., create a partition) on the new disk for /home.  Then,
you have to copy everything in your home disk from the old location to
the new location.  And then you mount it.

> Following this instruction would require executing 11-12 different commands.
> I DO have the contents of my /home directory on an external disk.
> Is there maybe some a little more humane way accomplishing this?
> Would maybe ONLY the operation:
>      # umount /srv/home
>      Finally, we have to mount the filesystem /dev/sdb1 to /home for the
> mean time.
>      # mount /dev/sdb1 /home
>      # ls -l /home


You're not off the mark per se.  You're only just doing part of what
that link's instructions does.  In the end, you'll have to do the
other things as well like create the partition and (perhaps?) copy the
files over.

I don't think you need to be particularly worried.  The destination
disk is a new disk and you're not going to lose anything by
partitioning it.  So, if you get it wrong, then do it again.
Likewise, if you are copying the files over, again, you're just
*copying* (i.e., don't move the files).  So, the original disk with
the files will still be there if you need to go back to it.

I think you should follow the instructions in the link, but understand
what each step does and decide for yourself whether or not it applies
to you.

My suggestion to you is to boot from a USB drive.  Once you log in,
you might be opening files on /home and that would make unmounting it
difficult.  Keep the old drive's /home intact and wipe it only after
the new disk is working.

On the bright side, it should be easier than replacing the drive with
the root partition...I never want to do that again.  :-)

Ray


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links