Yves S. Garret
2013-Apr-01 19:00 UTC
[CentOS] Don't understand how to re-partition this setup or why it was made like this
Hello, I did df -h on my CentOS 6.4 machine. $ df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg_ysg-lv_root 47G 8.8G 36G 20% / tmpfs 948M 372K 947M 1% /dev/shm /dev/sda1 485M 62M 398M 14% /boot /dev/mapper/vg_ysg-lv_home 4.6G 2.7G 1.7G 63% /home What I don't understand is why is /home so tiny and how can I re-partition this without having to nuke and rebuild my machine?
Timo Schoeler
2013-Apr-01 19:04 UTC
[CentOS] Don't understand how to re-partition this setup or why it was made like this
On 04/01/2013 09:00 PM, Yves S. Garret wrote:> Hello, > > I did df -h on my CentOS 6.4 machine. > > $ df -h Filesystem Size Used Avail Use% Mounted on > /dev/mapper/vg_ysg-lv_root 47G 8.8G 36G 20% / tmpfs > 948M 372K 947M 1% /dev/shm /dev/sda1 485M 62M 398M > 14% /boot /dev/mapper/vg_ysg-lv_home 4.6G 2.7G 1.7G 63% /home > > What I don't understand is why is /home so tiny and how can I > re-partition this without having to nuke and rebuild my machine?You'd have to resize the logical volumes your FS lives on (here: vg_ysg-lv_root and vg_ysg-lv_home) and resize the FS as well. Can be done booting off a rescue medium w/o any problems. Make sure you do have a complete backup, though. HTH, Timo
Keith Keller
2013-Apr-01 20:44 UTC
[CentOS] Don't understand how to re-partition this setup or why it was made like this
On 2013-04-01, Yves S. Garret <yoursurrogategod at gmail.com> wrote:> > $ df -h > Filesystem Size Used Avail Use% Mounted on > /dev/mapper/vg_ysg-lv_root > 47G 8.8G 36G 20% / > tmpfs 948M 372K 947M 1% /dev/shm > /dev/sda1 485M 62M 398M 14% /boot > /dev/mapper/vg_ysg-lv_home > 4.6G 2.7G 1.7G 63% /home > > What I don't understand is why is /home so tiny and how can I re-partition > this without having to nuke and rebuild my machine?I doubt anyone can tell you why /home is so tiny. But depending on the filesystem used, you may be able to resize on the fly, without even needing a reboot. The LVM HOWTO is a bit out of date, but describes the process here: http://www.tldp.org/HOWTO/LVM-HOWTO/extendlv.html Growing XFS filesystems online is required; they can't be grown offline. Growing ext4 online should be easy, but I've only tested it once in CentOS 6. As Timo notes, you should have a backup before proceeding in any case. I believe there are GUI tools to manipulate LVM and filesystems (system-config-lvm IIRC), but I haven't used this tool so can't give you any helpful guidance. You can put everything on one filesystem if you wish. This is mostly a matter of personal taste for many desktop uses (and some server uses). --keith -- kkeller at wombat.san-francisco.ca.us
John R Pierce
2013-Apr-01 21:31 UTC
[CentOS] Don't understand how to re-partition this setup or why it was made like this
On 4/1/2013 12:00 PM, Yves S. Garret wrote:> What I don't understand is why is /home so tiny and how can I re-partition > this without having to nuke and rebuild my machine?what do you get from # vgs ? if there's VFree, you can lvextend the backing LV behind /home, then grow the file system to use that additional space. # lvextend -L +8G vg_ysg/lv_home # resize2fs /home if there's no VFree, and you want everything in / you could reboot to single user mode, and do something like... # cd / # mkdir /home2 # mv /home/* /home2 # this will take awhile # umount /home # rmdir /home # mv /home2 /home and vi /etc/fstab and remove the mount for /home now, you can lvremove vg_ysg/lv_home to free up the space it used (will probably need a --force), then lvextend the vg_ysg/lv_root volume, and grow /that/ file system to suit. note. I typed all that off the top of my head. TRUST NOTHING, VERIFY EVERYTHING, UNDERSTAND THE MEANING OF EVERY COMMAND YOU ARE DOING!!! Caveat Emptor. -- john r pierce 37N 122W somewhere on the middle of the left coast