Hi, I'm sure there is a lot about that title out there as much as in here.
But I don't want to move it to an exclusive partition. I want to move it to an existing partition as a folder/directory.
I tried not to post a new thread, trying to hook onto sth similar, but had no luck with it, so here goes the question. Please forgive me if I am not posting in the right place, it is my first post and I am already looking around for an hour...
So, my /home directory is "as is" by default. Here's my df by the way
[usr@pc ~]$ df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 112474480 70871480 35971000 67% /
udev 2052100 0 2052100 0% /dev
tmpfs 2060492 7928 2052564 1% /dev/shm
tmpfs 2060492 772 2059720 1% /run
/dev/sda2 112474480 70871480 35971000 67% /
tmpfs 2060492 0 2060492 0% /sys/fs/cgroup
tmpfs 2060492 0 2060492 0% /media
/dev/sda4 370755860 81214344 270983208 24% /mnt/Datastore
/dev/sda1 508745 214868 268277 45% /boot
/dev/sda2 112474480 70871480 35971000 67% /tmp
/dev/sda2 112474480 70871480 35971000 67% /var/tmp
/dev/sda2 112474480 70871480 35971000 67% /home
Hence, I have my disk sda 500GB ,which was dd from a 120GB
sda1 is boot
sda2 is /
sda3 is swap
sda4 is the excess in that hdd from 120 to 500, made as partition (primary, ext4).
my fstab file is
UUID=0857a373-668c-45af-9aa8-76d838d0da78 / ext4 defaults 1 1
UUID=ead41590-d877-4140-9eb1-ffd2f7dab3b9 /boot ext4 defaults 1 2
UUID=9c814d9e-42e3-472f-887e-abcf8c526f15 swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/sda4 /mnt/Datastore ext4 defaults
So i am automounting sda4 in /mnt/Datastore.
Don't want to use sda4 exclusively for /home, i want to store there other data as well, virtual machines, etc. and I don't want to decide now how much space I should allocate by determining beforehand partition size for each thing. This I think is a terrible space management...
So, I would like to have my home contents in
and somehow make my system understand that location as /home.
I have already managed to copy successfully all the /home contents including all files, folders, maintained permissions etc.
(by the way, I went through a lot of articles about that, solutions with find, cpio, compressing/archiving and decompressing to a new location, etc, in order to also copy links, all hidden and file permissions. In my case, I booted with a linux live cd, mounted sda2 and sda4 and then, the following worked for me:
cp -avfR /mnt/sda2/home /mnt/sda4/)
Thereafter, I know as much as entering in "init 1" and mv /home to a useless name.
But that's how far I get...
I cannot seem to find a way to actually tell my system to automount
/mnt/Datastore/home as /home.
I attempted to automount that relationship in /etc/fstab, but that sort-of-looped my boot. As soon as I could see the fedora loading logo, it hangs there...
From my "df" output, I see that it understands /home in /dev/sda2, which is normal and by default, but i can't find where this is set, in order to change it... (and anyway, this in itself is a problem, because /dev/sda2 is a partition, which is actually "/" root, it was not initially configured as /home: Nevertheless, df sees /dev/sda2 both as / and as /home and as anything else it wishes to see that way...
So, in case the question isn't clear, I want to move /home to a directory
in an existing partition with other directory trees in it, don't want to mount to a dedicated disk/partition for that purpose.
Is that possible?
Does it make sense? maybe it doesn't make sense by design.
Am I making a dumb mistake?
Any help would be appreciated.