Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > ISPConfig 3 Priority Support

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 24th June 2013, 21:22
craig baker craig baker is offline
Senior Member
 
Join Date: Mar 2008
Posts: 119
Thanks: 0
Thanked 5 Times in 5 Posts
Default ISPCONFIG 3 & Centos 6.4 - ALMOST right but...

I screwed up - I had installed centos 6.4 with a big home directory (and a small var one) and I forgot to wipe and resize it so I have everything WORKING now - but my /var is almost full

how can I have ISPCONFIG 3 to use /home instead of /var? safely without having to redo hours and hours and hours of work???
or maybe symlink it so that everything works without messing up the work?

*** BETTER PLAN - is there a safe and easy to resize the /home partition smaller (its 1.8TB) and the / partition bigger?
these are setup as being managed by lvm and are ext 4 from the centos 6.4 install I just did.
currently:
[root@ns9 /]# df -v
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/vg_ns9-lv_root
51606140 44038720 4945980 90% /
tmpfs 16471600 236 16471364 1% /dev/shm
/dev/sda1 495844 62110 408134 14% /boot
/dev/sr0 1418348 1418348 0 100% /media/CentOS_6.4_Final
/dev/mapper/vg_ns9-lv_home
1852386680 191026800 1567264112 11% /home

help would be appreciated - can I shrink vg_ns9-lv_home and increase the root partition?

I DONT want to lose everything and symlinks are a kludge at best - I know I should have made home small and / large, but can I salvage the situation?




thanks

ps love howtoforge I have been a subscriber before


UPDATED - problem solved.

use resize2fs and lvexpand as per the following:

# Unmount the filesystem and check its' LV
umount /home
e2fsck -f /dev/mapper/vg_ns9-lv_home

# Shrink ext4 and then the LV to the desired size
resize2fs -p /dev/mapper/vg_ns9-lv_home 500G (reduce to 500gb)
lvreduce -L 500G /dev/mapper/vg_ns9-lv_home

# Before continuing, run e2fsck. If it bails because the partition
# is too small, don't panic! The LV can still be extended with
# lvextend until e2fsck succeeds, e.g.:
# lvextend -L +1G /dev/mapper/vg0-foo
e2fsck -f /dev/mapper/vg_ns9-lv_home <- checked ok

# Resize the filesystem to match the LVs size, check and mount it
resize2fs -p /dev/mapper/vg_ns9-lv_home
e2fsck -f /dev/mappervg_ns9-lv_home
mount /home

That was the tricky part. The rest is pretty straight forward:

unmount the filesystem,
extend the logical volume and
expand the filesystem afterwards.

umount /
<--- dont need to unmount root 6.4 can do it on the fly

# Extend the LV to use all free space
lvextend -l +100%FREE /dev/mapper/vg_ns9-lv_root
e2fsck -f /dev/mapper/vg0-bar <- cant do mounted

# Resize the partition to fill the LV
resize2fs -p /dev/mapper/vg_ns9-lv_root
e2fsck -f /dev/mapper/vg0-bar <- cant do mounted

sync;reboot! all is joyous and /var now has TONS of room (1.3TB)

Last edited by craig baker; 25th June 2013 at 03:20.
Reply With Quote
The Following User Says Thank You to craig baker For This Useful Post:
till (25th June 2013)
Sponsored Links
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Centos 6.4: Fresh Install Shows Apaches Test Site Alisnasyon Installation/Configuration 8 13th May 2013 16:52
Regarding ISPConfig 3.0.5.1 / CentOS 6.4 Tutorial midcarolina Installation/Configuration 3 2nd April 2013 17:40
CentOS 6.4 x86_64 - ISPConfig 3.0.5.1 - RKHunter Errors Hairy Installation/Configuration 0 22nd March 2013 19:35
CentOS 6.4 x86_64 - ISPConfig 3.0.5.1 - Amavis Errors Hairy Installation/Configuration 0 22nd March 2013 17:16
All files gone after changing quota to 0 spynode General 17 19th January 2012 14:41


All times are GMT +2. The time now is 22:10.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.