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?
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
Hi, thanks for your response.
One more question. Would I need to have logical volumes or can I get away with having one massive volume/partition and then have everything on that one partition?
In the interim I'll have a directory in / that I can use to just dump stuff in and will rebuild my machine at a later date.
On Mon, Apr 1, 2013 at 3:04 PM, Timo Schoeler timo.schoeler@riscworks.netwrote:
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 _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Yves S. Garret wrote:
Hi, thanks for your response.
One more question. Would I need to have logical volumes or can I get away with having one massive volume/partition and then have everything on that one partition?
In the interim I'll have a directory in / that I can use to just dump stuff in and will rebuild my machine at a later date.
You can - in fact, that's what we do here at work... BUT: we have *all* home directories NFS mounted, and we do online backups on mounted filesystems that are NOT /. It's really ugly when /var/log fills up /
mark
PS: please don't top post.
On Mon, Apr 1, 2013 at 3:04 PM, Timo Schoeler timo.schoeler@riscworks.netwrote:
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 _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On 2013-04-01, Yves S. Garret yoursurrogategod@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
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.