1

I've installed fedora with default configuration few months back and now I want to arrange the mount points. /etc/fstab look like that:

/dev/mapper/fedora_dhcppc4-root /                       ext4    defaults        1 1
UUID=9fb84dcf-739e-4368-8f90-cdd0a252a2a3 /boot                   ext4    defaults        1 2
/dev/mapper/fedora_dhcppc4-home /home                   ext4    defaults        1 2
/dev/mapper/fedora_dhcppc4-swap swap                    swap    defaults        0 0

and

[user@dhcppc4]$ df -h
Filesystem                       Size  Used Avail Use% Mounted on
devtmpfs                         984M     0  984M   0% /dev
tmpfs                           1002M  260M  742M  26% /dev/shm
tmpfs                           1002M  4.1M  998M   1% /run
tmpfs                           1002M     0 1002M   0% /sys/fs/cgroup
/dev/mapper/fedora_dhcppc4-root   47G  5.5G   39G  13% /
/dev/sdc1                        477M  142M  310M  32% /boot
/dev/mapper/fedora_dhcppc4-home   23G   19G  2.8G  88% /home

What I want is to merge the root and home that it all will be on the same fs.

1 Answer 1

1

Enter single user mode, move to free up the /home mount point mount --move /home /mnt/home, then move the files over:

mv /mnt/home /home

Check with an ls -ld /, tree -d /home or something that it looks OK (you don't want to end up with /home/home or something like that)

umount /mnt/home, then lvremove /dev/mapper/fedora_dhcppc4-home, and finally lvextend /dev/mapper/fedora_dhcppc4-root with as many extents as were in your fedora_dhcppc4-home lv (-l flag). Alterntly to grow /dev/mapper/fedora_dhcppc4-root by all available space in VG

lvresize -L+100FREE /dev/mapper/fedora_dhcppc4-root

Now your /dev/mapper/fedora_dhcppc4-root lv will be larger than the filesystem on it, so run

resize2fs /

Finally reboot your machine to enter once more multi user mode.

Consider backing up before you start.

And I'd reconsider using fedora in production environments and choose an enterprise Linux instead.

2
  • on mount --move /home /mnt/home i've got mount: wrong fs type, bad option, bad superblock on /home, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so. and btw it a home computer not producation
    – Nir
    Commented Aug 6, 2013 at 8:44
  • just umount and mount instead of --move
    – Nir
    Commented Aug 6, 2013 at 13:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .