LVM LVextend Move Space

  • devilwood
  • Silver Member
  • Silver Member
  • User avatar
  • Posts: 436

Post 3+ Months Ago

I have: $df

/dev/mapper/cfdlnetwork-root 6724784 6690696 0 100% /
none 2021592 248 2021344 1% /dev
none 2026917 0 2026917 0% /dev/shm
none 2026176 320 2025856 1% /var/run
none 2026176 0 2026176 0% /var/lock
none 2026176 0 2026176 0% /lib/init/rw
/dev/sda1 233191 16422 204328 8% /boot
/dev/mapper/cfdlnetwork-home 465010408 266043372 175345816 61% /home

My / drive is full. I have logical volumes setup. Is it possible to transfer some of the space from /home to /. I also noticed the "none" partitions popping up. I umounted /var/lock but it pops up on every reboot. I thought I could unmount those and use their 2GB for /.

Can someone please help me how to free up some space on my root partition?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9090
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

Each one of those as you said, is a separate partition, as far as I am aware you cannot move space from one partition to another. I would go into your root partition and see what is taking up all your space and remove some files there.

What I usually do once I get into the directory I want to clean out is type the following command:

du --max-depth=1 ./ | sort -n -r

That will display a list of directories under the current directory you are in from the one with the largest size to the smallest size. I would then go into the largest directory and type that command again and see which files are your largest and if possible to delete them.
  • devilwood
  • Silver Member
  • Silver Member
  • User avatar
  • Posts: 436

Post 3+ Months Ago

It seems my /var directory is taking up a lot of space.

4810640 ./
2512348 ./lib
2260184 ./log
33956 ./cache

I've tried to clear the text files in the logs but even with sudo I get permission denied. I'm not sure what's taking up 6GB. Are the numbers in MB from the du command?
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9090
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

I believe its in kilobytes. You can put it in a more readable format that is easier to understand using the -h flag. So something like this:

du -h --max-depth=1 ./ | sort -n -r

That should make it more clear for you. So I think your /var/log directory is taking up 2.2 gigs, which is quite alot. I just checked our servers and they are taking up less than 300 MB for the /var/log directory.

Go inside that /var/log directory and type in:

ls -laS

To get a listing of all the files which the sizes next to them. The largest of the files will be listed first. Are you able to just login as your root user to see if you can delete some of the logs there?
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9090
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

Once you get all of this sorted out, have you setup /etc/logrotate.conf to make sure that your logs are automatically rotated and deleted after awhile? You may want to modify that file and keep less backlogs.
  • devilwood
  • Silver Member
  • Silver Member
  • User avatar
  • Posts: 436

Post 3+ Months Ago

Done. Thanks BWM. I'm continuing to monitor the logrotate. It looks like the structure created in /var/log/ is indicative of it working so hopefully my changes will take effect and will reduce the logs. I was able to free up 2GB from my messages log and my syslog. Thanks again.
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9090
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

Oh good, glad you were able to get some of that deleted :)
  • devilwood
  • Silver Member
  • Silver Member
  • User avatar
  • Posts: 436

Post 3+ Months Ago

Yeah, something went bad wrong. Two logs in particular, syslog and messages, were getting out of control... like 500MB not including their backups. I've noticed that my space used on my / partition is creeping up 1% a day. I'm hoping it will level off.

Post Information

  • Total Posts in this topic: 8 posts
  • Users browsing this forum: No registered users and 59 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.