Moving /home huge mistake

Hi all,

I’ve tried to follow @Aragorn tutorial to move /home folder to another partition (Moving /home to second hdd - #2 by Aragorn) but did a huge mistake.

When following the command

systemd-mount -t ext4 -o sync /dev/sdb1 /mnt

I simply forgot to type /mnt at the end (actually didn’t see it because I was following with my smartphone and needed to slide the command to see the last part). If correctly done, I apparently should have had this outcome:

Started unit mnt.mount for mount point: /mnt

However, I got this and didn’t realise it was wrong:

Started unit run-media-system-Tales.mount for mount point /run/media/system/Tales

I moved on with all commands of the tutorial, including mv /home. The result is that I lost contact to my /home folder, not even know where it is now, if somewhere…

How can I fix this? I do need help…

If you check under /run/media/system/Tales/ do you see your files and folders?

It says “non existing file or folder”…

And your other drive is currently connected and mounted?

lsblk
mount
1 Like

Now I’ve mounted sdb8. Then command /run/media/system/Tales/ returns:

bash: /run/media/system/Tales/: is a folder [or directory]

But I can’t see any list of files.

Can you provide the above output?


Because /run/media/system/Tales/ is not a command.

Do you mean that ls -lha /run/media/system/Tales/ returns an empty directory?

These are my partitions. /home is originally at sda2. Considering its size, all files and folders should be there.

That’s the size of the partition, not the space consumed.

This is what I get from this command.

Wait a second, you didn’t mv to /run/media/system/Tales/.

You still moved everything to /mnt/.

Check under /mnt/.

(And your /mnt/ path is still within the same original filesystem.)

1 Like

These are my users. Can I already see light…?

You’re still good to go. But I’m thinking of a way to write out what you can do to proceed with minimal risk, since to be fair (and not trying to be mean), you might not have a full grasp on certain *nix concepts.

(Unless someone else wants to jump in.)


EDIT: I really, really mean that with sincerity. Everyone, including myself, started out not knowing even a sliver of anything related to Linux. :wink:

Yes, you see that I miss basic knowledge and I actually use Linux since several years… it’s laziness and a shame, indeed.

Before you continue, still need the output of:

mount

Also to confirm, /dev/sdb8 is the partition formatted as ext4 where you wish to re-locate /home ?

Correct, sdb8 is the goal.

Output of mount:

And this is for you to remember:

lsblk -o name,uuid

You need the UUID of /deb/sdb8 for later.

Sure, I still have it noted and it’s already in fstab.

Please show the contents of /etc/fstab anyways.

We need to play this safe…

(Do you know how to use nano?)


And before anything, unmount /dev/sdb8 for now.

umount /dev/sdb8

Here fstab:

I think I’m fine with nano lol.

O yes, unmounted sdb8.

Why do you have two entries for / ?

Is the second one supposed to be /home ?

You can use noatime instead of relatime as well.

1 Like