Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

share|improve this question
    
Might this SO question help: stackoverflow.com/questions/6966307/… –  Jason Taylor Jun 26 '12 at 17:29

2 Answers 2

up vote 2 down vote accepted

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

share|improve this answer
    
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 '12 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) –  Michael Beattie Jun 27 '12 at 0:21
    
thanks, I'll try your suggestion –  ReynierPM Jun 27 '12 at 12:46

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

share|improve this answer
    
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 '12 at 18:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.