LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-28-2016, 12:10 PM   #1
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 789

Rep: Reputation: Disabled
Freeing up space on root partition


As seen below, /dev/mapper/VolGroup-lv_root is full.

How do I view files in this partition so that I may delete some?
EDIT. Turns out I have a bunch of log fins in /var/log which were huge. I deleted some, and while I "fixed" the problem, I still would like to understand what this root partition represents.

If it turns out I need them all, how do I increase the size?

Thank you


Code:
[root@devserver ~]# df -aTh
Filesystem           Type         Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
                     ext4          50G   47G     0 100% /
proc                 proc            0     0     0    - /proc
sysfs                sysfs           0     0     0    - /sys
devpts               devpts          0     0     0    - /dev/pts
tmpfs                tmpfs        5.8G     0  5.8G   0% /dev/shm
/dev/sda1            ext4         477M  175M  278M  39% /boot
/dev/mapper/VolGroup-lv_home
                     ext4         985G   48G  887G   6% /home
/dev/mapper/VolGroup-lv_mysql
                     ext3          99G  498M   93G   1% /var/lib/mysql
none                 usbfs           0     0     0    - /home/vbox/vbusbfs
none                 binfmt_misc     0     0     0    - /proc/sys/fs/binfmt_misc
[root@devserver ~]#

Last edited by NotionCommotion; 10-28-2016 at 12:38 PM. Reason: Added remarks about log fils
 
Old 10-28-2016, 12:50 PM   #2
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
Backup the data on VolGroup-lv-home - roughly 48 Gib - you could temporarily move it to /var/lib/mysql which is on VolGroup-lv-mysql and has 93 gig free

Reduce VolGoup-lv-home with lvreduce, I'd lop off everything but a couple of hundred gig, with lvm you can hold a reserve, which is handy. Auto installers use the entire disk, people who do it by hand always hold a little back for the problem your facing here (volume locked no-available-resource). The lvreduce will remove some of the space from the home volume (887Gib free). Your data should be preserved however a back-up is always a smart move (hence it was the first thing I asked you to do).

Extend VolGroup-lv-root whatever amount you need, the reserve you created with the lvreduce will more than cover a reasonable request.
Check that your data on your reduced volume remained intact or restore from lv-mysql if you have to. Delete the lv-home data that you moved to lv-sql when your done, regardless.

Commands to research:
lvreduce
lvextend

Hope that helps.
 
Old 10-28-2016, 01:46 PM   #3
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 789

Original Poster
Rep: Reputation: Disabled
Thanks dijetlo,

How do I determine what directories are on this partition? For instance, it appears that all of /var/log is.
 
Old 10-28-2016, 01:52 PM   #4
JeremyBoden
Senior Member
 
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,950

Rep: Reputation: 513Reputation: 513Reputation: 513Reputation: 513Reputation: 513Reputation: 513
Code:
ls -l /
 
Old 10-28-2016, 02:09 PM   #5
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 789

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by JeremyBoden View Post
Code:
ls -l /
This shows all directories on all partitions, no?

Are all directories under root unless they are mounted elsewhere?
 
1 members found this post helpful.
Old 10-28-2016, 02:29 PM   #6
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243
mount points are in fstab
 
Old 10-28-2016, 03:08 PM   #7
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143
Look at your output of df. Any directories listed there (and their subdirectories, unless listed elsewhere) are on the associated mount point. Anything not shown falls on the all-encompassing "/".

In other words, take a directory. If it's not shown on df, then it will live on the same filesystem as its parent directory. If its parent directory is not shown on df, then it will live on the same filesystem as its parent directory, and so on until you get all the way back to "/".

Last edited by suicidaleggroll; 10-28-2016 at 03:13 PM.
 
1 members found this post helpful.
Old 10-29-2016, 10:20 AM   #8
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
Quote:
/dev/mapper/VolGroup-lv_root
ext4 50G 47G 0 100% /
The root lv (logical volume) in your implementation corresponds to '/' (the root directory). All other mounted file systems mount to this directory or one of its subdirectories.
Quote:
/dev/mapper/VolGroup-lv_home
ext4 985G 48G 887G 6% /home
That's lv home. It contains the home directory, '/home', and all sub directories.

Quote:
/dev/mapper/VolGroup-lv_mysql
ext3 99G 498M 93G 1% /var/lib/mysql
That's lv mysql. As you suggested it mounts to var, but it does so through a file branch path that doesn't touch var log
var:
- log:[ sys, mysql, ...]
- lib:[ -mysql <-- mount point is here ]

Good questions though, shows your thinking.

Last edited by dijetlo; 10-29-2016 at 10:21 AM.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
In a cpp application I am deleting a file on a partition, but space is not freeing.. adlingepa Linux - Newbie 3 06-05-2015 05:37 PM
Where did root partition space go? username is already Linux - General 3 12-15-2005 03:16 PM
out of space on partition, need help freeing up room disorderly Linux - Newbie 2 10-18-2004 02:44 PM
/ root partition has 0 space?? adambeazley Mandriva 1 05-01-2004 10:53 PM
Root partition space @ 0% jbrashear Linux - Newbie 1 04-03-2004 01:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration