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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
10-28-2016, 12:10 PM
|
#1
|
Member
Registered: Aug 2012
Posts: 789
Rep: 
|
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
|
|
|
10-28-2016, 12:50 PM
|
#2
|
Senior Member
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Rep: 
|
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.
|
|
|
10-28-2016, 01:46 PM
|
#3
|
Member
Registered: Aug 2012
Posts: 789
Original Poster
Rep: 
|
Thanks dijetlo,
How do I determine what directories are on this partition? For instance, it appears that all of /var/log is.
|
|
|
10-28-2016, 01:52 PM
|
#4
|
Senior Member
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,950
|
|
|
|
10-28-2016, 02:09 PM
|
#5
|
Member
Registered: Aug 2012
Posts: 789
Original Poster
Rep: 
|
Quote:
Originally Posted by JeremyBoden
|
This shows all directories on all partitions, no?
Are all directories under root unless they are mounted elsewhere?
|
|
1 members found this post helpful.
|
10-28-2016, 02:29 PM
|
#6
|
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
|
mount points are in fstab
|
|
|
10-28-2016, 03:08 PM
|
#7
|
LQ Guru
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573
|
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.
|
10-29-2016, 10:20 AM
|
#8
|
Senior Member
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Rep: 
|
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.
|
All times are GMT -5. The time now is 06:54 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|