0

I've installed a CentOS 6.2 server and have this partitioning (the sizes are approach):

Filesystem            Size  Used Avail Use% Mounted on
/dev/sda5              29G  2.8G   25G  11% /
tmpfs                 972M     0  972M   0% /dev/shm
/dev/sda2             485M   51M  409M  11% /boot
/dev/sdb1             294G  211M  279G   1% /data
/dev/sda3             4.9G  157M  4.5G   4% /home

Now I install gitosis and can't change or doesn't know how to where repositories are stored which basically is under $HOME/repositories then I want to use /data (/dev/sdb1) as /home and free the /home(/dev/sda3). Can I do this without reinstall the whole system? Any advice?

Cheers and thanks in advance

1

2 Answers 2

2

I'd copy all of the data from /home to /data and then swap the mount points in /etc/fstab.

2
  • Ok, this is the relevant part of my /etc/fstab pastebin.com/sRjmn05B and I already copied the /home to /data, now what you mean with swap the mount points? Change the label or change the UUID?
    – ReynierPM
    Jun 26, 2012 at 17:52
  • Yes, you just switch the UUIDs associated with each /home and /data and reboot. (you can do it manually with "mount" and "umount" also)
    – MichaelB
    Jun 27, 2012 at 0:21
0

Another option: move data from /home/repositories to /data/repositories and make a symlink from home: ln -s /data/repositories /home/repositories

1
  • could be but isn't the right approach because I'm doing this because of gitosis create the repositories under /home/repositories and didn't know if symbolic links work on that case
    – ReynierPM
    Jun 26, 2012 at 18:13

You must log in to answer this question.

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