0

I have following filesystems on my Ubuntu 12.04:

u@czarnobog:~$ df -hT
Filesystem          Type      Size  Used Avail Use% Mounted on
/dev/mapper/md1-md1 ext4       31G   27G  2.7G  91% /
udev                devtmpfs   16G  4.0K   16G   1% /dev
tmpfs               tmpfs     3.2G  428K  3.2G   1% /run
none                tmpfs     5.0M     0  5.0M   0% /run/lock
none                tmpfs      16G     0   16G   0% /run/shm
none                tmpfs     100M     0  100M   0% /run/user
/dev/mapper/md3-md3 ext4       97G   43G   49G  47% /export
/dev/mapper/md2-md2 ext4      7.7G  5.6G  1.8G  77% /var
cm_processes        tmpfs      16G  2.6G   14G  17% /run/cloudera-scm-agent/process

Is it possible to transfer some free space from one to another, for example 10 gigs from /dev/mapper/md3-md3 to /dev/mapper/md1-md1? Ideally without formatting and rebooting anything? Or some other way of increasing /home free space on this server?

Kranach
  • 123

1 Answers1

1

Based on the file system list provided, I don't see any disk mounted at /home. This indicates to me that your home directories are currently mounted at /

If this is the case the solution is rather easy if you have a free port to mount another drive.

1) prepare a drive of the desired size formatted with the desired filesystem.

2) mount the prepared drive to a temporary location.

3) Insure that no one is currently using the existing /home (boot in single user mode or boot from a live media) copy the contents of the /home recursively to the temporary location you mounted the newly prepared drive to.

4) mount the new /home drive to /home

If any of this is unclear please leave a comment indicating what requires further explanation and I will expand the answer.

Granted this is not ideal as it requires both formatting and rebooting, but I've done it and it works.

Elder Geek
  • 36,752