0

I took over a virtual server at work after a co-worker left. He, however, setup the server incorrectly at multiple stages and im cleaning them up as I run into them...

Currently I realized that the file system is broken in half onto 2 logical volumes both at 50gb. One is mounted as the root directory and the other as the /home directory. Saddly, the server has taken up 46gb of the root lv and i need to expand it. I have already shrunk and remounted the home lv. I resized the root lv, but I can't figure out how to unmount the root directory while the computer is on. Obviously this needs to be done before I can finalize the expansion, but I don't know how.

I'd appreciate any help or pointing in the right direction. Thanks in advance.

PS this is on a CentOS server.

2 Answers2

4

You might be looking for resize2fs (provided you are using ext2/3/4). This command allows you to do an online expansion (i.e. while it is mounted) of the filesystem size to the size of the logical volume (which, as you say, is already expanded).

Oliver
  • 5,883
  • 23
  • 32
  • Thank you very much, everything i read online said I needed to umount it then run fsck -f before i ran the resize2fs command. I ran the resize with the volume online and it worked. – Hussein Sabbagh Oct 22 '13 at 14:34
0

it's not possible to umount the root / , but you can expand the space while its running without umount, only you need to umount to reduce the volume in LVM, Here I have Described in this Video

Babin Lonston
  • 155
  • 1
  • 1
  • 11
  • Would you mind giving an overview of the video? It may not be accessible to some users if their workplace blocks YouTube. – tombull89 Oct 22 '13 at 08:39