LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-07-2010, 03:02 PM   #1
PeppezZ
LQ Newbie
 
Registered: Oct 2010
Posts: 4

Rep: Reputation: 0
Partition and No space left on device Problem


Hello, i have a partition full at 100%
My log says:
Error: No space left on device

This is my situation:
Quote:
pepp:~# df -h
Filesystem Dimens. Usati Disp. Uso% Montato su
/dev/md1 5,0G 4,9G 0 100% /
tmpfs 4,0G 0 4,0G 0% /lib/init/rw
udev 10M 2,8M 7,3M 28% /dev
tmpfs 4,0G 0 4,0G 0% /dev/shm
/dev/md2 919G 205M 873G 1% /home
tmpfs 4,0G 0 4,0G 0% /opt/psa/handlers/before-local
tmpfs 4,0G 0 4,0G 0% /opt/psa/handlers/before-queue
tmpfs 4,0G 0 4,0G 0% /opt/psa/handlers/before-remote
tmpfs 4,0G 160K 4,0G 1% /opt/psa/handlers/info
tmpfs 4,0G 0 4,0G 0% /opt/psa/handlers/spool
Quote:
pepp:~# df -i
Filesystem Inode IUsati ILib. IUso% Montato su
/dev/md1 327680 70703 256977 22% /
tmpfs 1022882 4 1022878 1% /lib/init/rw
udev 1022882 5100 1017782 1% /dev
tmpfs 1022882 1 1022881 1% /dev/shm
/dev/md2 60694528 17 60694511 1% /home
tmpfs 1022882 14 1022868 1% /opt/psa/handlers/before-local
tmpfs 1022882 6 1022876 1% /opt/psa/handlers/before-queue
tmpfs 1022882 6 1022876 1% /opt/psa/handlers/before-remote
tmpfs 1022882 61 1022821 1% /opt/psa/handlers/info
tmpfs 1022882 2 1022880 1% /opt/psa/handlers/spool
I see that /dev/md2 (/home) has too space, and the partition /dev/md1 (/) has only 5 gb.
I would set more space for md1, how can i do it? And how much time it will take to do it? And i will lost files?

My OS is Debian 5.0.3
Kernel : 2.6.32.2-xxxx-grs-ipv4-64

Thank you in advance for answer
 
Old 10-07-2010, 04:11 PM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

Here is your df output:
Code:
Filesystem Dimens. Usati Disp. Uso%  Montato su
/dev/md1   5,0G    4,9G  0     100%  /
tmpfs      4,0G    0     4,0G    0%  /lib/init/rw
udev       10M     2,8M  7,3M   28%  /dev
tmpfs      4,0G    0     4,0G    0%  /dev/shm
/dev/md2   919G    205M  873G    1%  /home
tmpfs      4,0G    0     4,0G    0%  /opt/psa/handlers/before-local
tmpfs      4,0G    0     4,0G    0%  /opt/psa/handlers/before-queue
tmpfs      4,0G    0     4,0G    0%  /opt/psa/handlers/before-remote
tmpfs      4,0G    160K  4,0G    1%  /opt/psa/handlers/info
tmpfs      4,0G    0     4,0G    0%  /opt/psa/handlers/spool
Your "root" filesystem is full. You need to:
a) Find the files that are hogging the most space
b) Delete them or move them to a different filesystem (like /dev/md2)

Worst case, you might need to:
a) take a backup
b) reinstall (with a different partition scheme)
c) restore from backup

You might also want to consider using LVM (Logical Volumes), which makes it easier to manage your disk.

But for now, please identify where the space is being used, and please post back.

Thank you in advance!
 
Old 10-07-2010, 04:31 PM   #3
PeppezZ
LQ Newbie
 
Registered: Oct 2010
Posts: 4

Original Poster
Rep: Reputation: 0
but there is a way to enlarge the "root" folder without format?
 
Old 10-07-2010, 07:00 PM   #4
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Sure - if you created the root volume as a logical volume:

http://linuxdevcenter.com/pub/a/linu...-with-lvm.html

Otherwise, if you didn't use LVM's, your options are probably more limited.

Please try to figure out where your space has gone, post back, and we can take it from there. "du -s" is one tool that can help.

PS:
Here's a procedure that might work. But I would strongly encourage you to *find the problem* first:

http://www.howtoforge.com/linux_resi...xt3_partitions

Last edited by paulsm4; 10-07-2010 at 07:06 PM.
 
Old 10-07-2010, 08:02 PM   #5
PeppezZ
LQ Newbie
 
Registered: Oct 2010
Posts: 4

Original Poster
Rep: Reputation: 0
hello, thank you so much for the answer.

I found the big files, and they were into var/www/...
the problem is that the folder / has only 5 GB, and now this folder is full.
The folder /home instead has the rest of the hd, that is 995 GB and a some GB for SWAP.

I decided, for the moment, to resize the partitions using PARTED. I installed it and my situation is this:
Code:
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  5370MB  5369MB  primary  ext3         boot, raid
 2      5370MB  1000GB  994GB   primary  ext3         raid
 3      1000GB  1000GB  538MB   primary  linux-swap
So i ran parted to resize, but i had an error, i think because i need to unmount:
Code:
(parted) resize 1
Start?  [1049kB]?
End?  [5370MB]? 512000MB
Error: File system was not cleanly unmounted!  You should run e2fsck.  Modifying
an unclean file system could cause severe corruption.
Is this correct? Or i'm going to do something wrong?
Now i have to go to rescue mode, unmount the partition and run parted again for resize? Possible?
It will parted run while rescue mode is active?

Thank you
 
Old 10-07-2010, 08:23 PM   #6
PeppezZ
LQ Newbie
 
Registered: Oct 2010
Posts: 4

Original Poster
Rep: Reputation: 0
Code:
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         653     5242880+  fd  Linux raid autodetect
Partition 1 does not end on cylinder boundary.
/dev/sda2             653      121536   970990592   fd  Linux raid autodetect
/dev/sda3          121536      121601      525536   82  Linux swap / Solaris
What i want to do is to resize sda1 to 500 GB, resize sda2 to 490 GB, and resize swap to 10 GB.
So while it's in rescue mode, i'll unmount with (as your link says):
umount /dev/sda1
umount /dev/sda2
umount /dev/sda3
then run e2fsck (but i'll lose my files or not whit this???):
e2fsck -f /dev/sda1
e2fsck -f /dev/sda2
e2fsck -f /dev/sda3
then run parted:
parted /dev/sda resize 1 0 500GB
and do this also for the other partitions....

Is is all right or i'm going crazy?
 
Old 10-08-2010, 11:42 AM   #7
ShadowCat8
Member
 
Registered: Nov 2004
Location: San Bernardino, CA
Distribution: Gentoo, Arch, (RedHat4.x-9.x, FedoraCore 1.x-4.x, Debian Potato-Sarge, LFS 6.0, etc.)
Posts: 261

Rep: Reputation: 52
Well,

There's no reason to run e2fsck on /dev/sda3 since it is a swap partition. But, definitely run it on the other two. You shouldn't lose any files with e2fsck unless the file was already corrupted and you were going to lose it anyway.

And since it is the /var/www that is the issue to begin with, you know a better way to handle it might be to put /var/www on it's own partition. In fact, if you check what I wrote to lutusp here, I came up with a general recommendation on how to partition a basic OS drive in linux. And, for your situation, I would recommend splitting the space you are going to use for /home in my recommendation into both /home and /var/www if you are going to run a webserver from the system. Websites have a tendency to grow before you know it.

HTH.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] I have a problem fixing the error " No space left on device : Illegal seek Uni616 Programming 6 09-21-2010 11:43 AM
Having problem with /tmp "No space left on device" Error jim.thornton Linux - Newbie 13 05-26-2009 07:12 PM
Problem copying files to FAT32 usb disk (Cannot open: No space left on device) Arodef Linux - General 1 08-07-2008 05:02 PM
Getting a "No space left on device" message on a non-full partition... sugar2 Linux - Hardware 12 07-06-2007 01:43 AM
No space left on device even though it has free space? enine Linux - General 8 05-30-2007 04:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:05 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
Open Source Consulting | Domain Registration