LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 09-22-2012, 03:52 PM   #1
mbvpixies78
Member
 
Registered: Nov 2007
Location: Vietnam
Distribution: CentOS
Posts: 181
Blog Entries: 3

Rep: Reputation: 16
Root 100% full write error trying to mirror Apache site


I've set up a CentOS web server to function as a mirror for Apache. All went well until I used rsync, per Apache's instructions to mirror/download the site.

I'm using Ceotos 6.3 on Virtualbox and dynamically allocated the hard disk, up to 90 GB in size (currently, it's half-full, at 45 GB.)

When letting rsync download and create the Apache mirror, today it fails, stating that / (root) is full, and the write fails.

My understanding is that when creating a web site, it is best practice to serve the site from /var/www/html. I also don't know how this constitutes / (root) directory.

What did I do wrong here? Why is / (root) full if I'm only halfway to my virtual hard disk's max size? Why do contents of /var/www/html count against / (root)? What are my options for a solution?

Last edited by mbvpixies78; 09-22-2012 at 04:11 PM.
 
Old 09-22-2012, 04:28 PM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,275

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
It depends on how you have your hard disk partitioned. Can you post the output of "df -h" and "fdisk -l"?
 
Old 09-22-2012, 04:37 PM   #3
mbvpixies78
Member
 
Registered: Nov 2007
Location: Vietnam
Distribution: CentOS
Posts: 181
Blog Entries: 3

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by btmiller View Post
It depends on how you have your hard disk partitioned. Can you post the output of "df -h" and "fdisk -l"?
FYI-- This is a brand new CentOS install in Vbox and I used the default partitioning scheme. I've installed quite a few programs with yum, but this vm is only being used as a web server.

[root@buddha /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_buddha-lv_root
45G 45G 0 100% /
tmpfs 504M 296K 504M 1% /dev/shm
/dev/sda1 485M 52M 408M 12% /boot
/dev/mapper/vg_buddha-lv_home
47G 270M 44G 1% /home


(I'll post fdisk in a moment...)

Last edited by mbvpixies78; 09-22-2012 at 11:11 PM.
 
Old 09-22-2012, 04:46 PM   #4
mbvpixies78
Member
 
Registered: Nov 2007
Location: Vietnam
Distribution: CentOS
Posts: 181
Blog Entries: 3

Original Poster
Rep: Reputation: 16
# fdisk -l | more

Disk /dev/sda: 102.0 GB, 102001278976 bytes
255 heads, 63 sectors/track, 12400 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000af206

Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 12401 99097600 8e Linux LVM

Disk /dev/mapper/vg_buddha-lv_root: 48.7 GB, 48737812480 bytes
255 heads, 63 sectors/track, 5925 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/vg_buddha-lv_swap: 2113 MB, 2113929216 bytes
255 heads, 63 sectors/track, 257 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Last edited by mbvpixies78; 09-22-2012 at 11:12 PM.
 
Old 09-22-2012, 06:42 PM   #5
mbvpixies78
Member
 
Registered: Nov 2007
Location: Vietnam
Distribution: CentOS
Posts: 181
Blog Entries: 3

Original Poster
Rep: Reputation: 16
Update: potentially still an issue (?)

I've removed some apps, freeing up 300MB, which allows me to start Gnome again and continue w/rsync, but again I ran into / (root) becoming full.

I'm at a loss as to whether this should be happening, if I'm doing something wrong here.

Shouldn't default partitioning during CentOS install not lead to this issue?

Last edited by mbvpixies78; 09-22-2012 at 06:58 PM.
 
Old 09-23-2012, 07:14 AM   #6
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,275

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
It looks like you have 45 GB of something on your root (/) partition, which holds all of your files except for those in /boot and /home. 45 GB seems like a lot of space to be taken up by just a default installation, so it might be worthwhile to see what's eating your space. Try looking at the output of "du -x --max-depth=1 /" and work down from there to see if you can see where that 45 GB is located.
 
Old 09-23-2012, 08:01 AM   #7
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
Quote:
My understanding is that when creating a web site, it is best practice to serve the site from /var/www/html. I also don't know how this constitutes / (root) directory.
'/var' is just a subdirectory of '/'. Log files, printer spool and often websites and mysql databases go in there. So if '/var' fills up, '/' also fills up.
 
Old 09-23-2012, 10:27 AM   #8
mbvpixies78
Member
 
Registered: Nov 2007
Location: Vietnam
Distribution: CentOS
Posts: 181
Blog Entries: 3

Original Poster
Rep: Reputation: 16
Options for resolution

I checked as suggested and verified the vast majority of data is in /var/www/. Thanks for explaining about directories.

Am I correct in my understanding that I can do one of the following as my options?:

1. shrink home partition which will shift that freed space over to root

2. expand root partition (not sure how that works with a vm dynamic vhd)

3. start over and change default partitioning scheme to increase size of root partition
 
Old 09-23-2012, 12:04 PM   #9
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531
If you're new to Linux then it may be convenient but if the virtual machine only serves as Apache mirror then you don't need Xorg, GUI tools, KDE, GNOME or whatever else complete Desktop Environment. Removing it saves time spent on maintenance and disk space: a minimum installation of CentOS 6.3 takes up only aprox. 600 to 700 megs in /, most of which will be in /usr. And if it is supposed to become an active Apache server then you should choose to have a server partition layout with a separate /var. You've already experienced the main reason for having one.
 
Old 09-23-2012, 08:26 PM   #10
mbvpixies78
Member
 
Registered: Nov 2007
Location: Vietnam
Distribution: CentOS
Posts: 181
Blog Entries: 3

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by unSpawn View Post
If you're new to Linux then it may be convenient but if the virtual machine only serves as Apache mirror then you don't need Xorg, GUI tools, KDE, GNOME or whatever else complete Desktop Environment. Removing it saves time spent on maintenance and disk space: a minimum installation of CentOS 6.3 takes up only aprox. 600 to 700 megs in /, most of which will be in /usr. And if it is supposed to become an active Apache server then you should choose to have a server partition layout with a separate /var. You've already experienced the main reason for having one.
Understood. Thanks to everyone for your help. I'm downloading a minimal installation per unSpawn's suggestion and going to put /var on a separate partition. Thanks again.
 
Old 09-23-2012, 09:20 PM   #11
mbvpixies78
Member
 
Registered: Nov 2007
Location: Vietnam
Distribution: CentOS
Posts: 181
Blog Entries: 3

Original Poster
Rep: Reputation: 16
unable to umount /home to resize

I may still just start over with a new vm, but I want to figure out how to resize /home if needed for the future.

In trying to do so, I get:

#umount /dev/mapper/vg_buddha-lv_home
umount: /home: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))

Then I realized I was logged into Gnome and logged out to cli, tried again, same result. Then I switched to my (only) user other than root and typed 'exit', which returned me to root command prompt, tried again, same result.

I'm referring to this article (http://www.howtoforge.com/linux_resi...xt3_partitions)

Suggestions?
 
Old 09-23-2012, 09:36 PM   #12
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531
Boot your guest with a Live CD and run commands from there? Unsure if the CentOS 6.3 installer DVD-1 has all the tools. If not try Gparted, KNOPPIX or whichever one you like.
 
Old 09-23-2012, 09:38 PM   #13
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,259

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
Quote:
Originally Posted by mbvpixies78 View Post
I may still just start over with a new vm, but I want to figure out how to resize /home if needed for the future.

In trying to do so, I get:

#umount /dev/mapper/vg_buddha-lv_home
umount: /home: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))

Then I realized I was logged into Gnome and logged out to cli, tried again, same result. Then I switched to my (only) user other than root and typed 'exit', which returned me to root command prompt, tried again, same result.

I'm referring to this article (http://www.howtoforge.com/linux_resi...xt3_partitions)

Suggestions?
You'll need to log out from EVERY non-root user, both CLI and X. You can't even log in as a user and then su to root, no non-root user may be logged in. You should be able to use "w" to verify.

Last edited by suicidaleggroll; 09-23-2012 at 09:40 PM.
 
Old 10-18-2012, 07:29 PM   #14
mbvpixies78
Member
 
Registered: Nov 2007
Location: Vietnam
Distribution: CentOS
Posts: 181
Blog Entries: 3

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by suicidaleggroll View Post
You'll need to log out from EVERY non-root user, both CLI and X. You can't even log in as a user and then su to root, no non-root user may be logged in. You should be able to use "w" to verify.
Ok, thanks for your response. I'll try this when I get through some other more pressing matters which I will start other posts for help with. I'll report back if need be.

Thanks!
 
Old 02-15-2013, 11:38 PM   #15
mbvpixies78
Member
 
Registered: Nov 2007
Location: Vietnam
Distribution: CentOS
Posts: 181
Blog Entries: 3

Original Poster
Rep: Reputation: 16
Because I was getting nowhere and had very little experience with fixing a full root partition, I opted to start over with a fresh vm. I still have this vm, with its full root partition if I ever feel cagey enough to return where I left off in fixing the problem. This problem did not repeat in the new vm, which had a much, much larger partitioning scheme.

Consequently, from this experience, I installed logwatch and have it email me every day, stating the percentage used of all partitions, along with web site traffic, http errors and other useful data. A quick scan of this email every morning reassures me all is as it should be on my server.
 
  


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
Root file system / 100 % full moata_u Solaris / OpenSolaris 15 06-15-2011 11:12 AM
Unzipping problem | write error (disk full?) rodrigogp Red Hat 17 04-20-2010 05:03 AM
write error (file system full?) naijaguy Linux - Newbie 2 02-10-2005 11:55 AM
root partition shows 100% full in RH 7.2 dmcmurray5 Red Hat 2 05-18-2004 04:24 PM


All times are GMT -5. The time now is 02:14 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration