Snippets

James Koonts Here is what I did to increase the space on the root partition on DB31:

Created by James Koonts
Here is what I did to increase the space on the root partition on DB31:

1) create a directory /var/home/rlubbers

2) cp -rpv /home/rlubbers/* /var/home/rlubbers

3) log out as rlubbers

4) log in as borg and become root
5) usermod -d /var/home/rlubbers rlubbers
6) log out as borg, and back in as rlubbers
7) run `pwd` to assure that I was indeed in /var/home/rlubbers and not /home/rlubbers
8) umount /home

NOW THAT /HOME IS UNMOUNTED, NOBODY ELSE CAN LOG INTO THIS MACHINE.  FOR SOME REASON THE SLAVE PROCESS ON DB31 TOOK ISSUE WITH THIS AND THREW AN ALARM

9) make sure the unmounted /home partitiioon is sane:
 e2fsck -f /dev/mapper/konverbd31--vg-home 

10) reduce the size of the filesystem.   I reduced it to 5G (should be enough)
resize2fs /dev/mapper/konverbd31--vg-home 5G

11) reduce the Logical Volume to the same size
root@konverdb31:~# lvreduce -L 5G /dev/mapper/konverbd31--vg-home
  WARNING: Reducing active logical volume to 5.00 GiB.
  THIS MAY DESTROY YOUR DATA (filesystem etc.)
Do you really want to reduce konverbd31-vg/home? [y/n]: y
  Size of logical volume konverbd31-vg/home changed from <7.63 GiB (1953 extents) to 5.00 GiB (1280 extents).
  Logical volume konverbd31-vg/home successfully resized.

12) remount the /home partition:
mount /dev/mapper/konverbd31--vg-home /home

13) logout as rlubbers, log back in as borg, become root

14) usermod -d /home/rlubbers rlubbers

15) logged out as borg, logged back in as rlubbers and verified that /home/rlubbers was actually my home directory

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.