Re: No space left on device
On Mon, 14 Jul 2003, Bijan Soleymani wrote:
> On Mon, Jul 14, 2003 at 12:51:55PM -0400, Salman Haq wrote:
> >
> > Hi,
> >
> > When trying to compile some code, I got the following error:
> >
> > cpp0: /tmp/ccFJJwQN.ii: No space left on device
> >
> > I then realized that /tmp is mounted on my root partition, which was
> > full:
> >
> > #df -h
> > Filesystem Size Used Avail Use% Mounted on
> > /dev/hda3 463M 440M 1.0k 100% /
> > /dev/hda5 37G 2.5G 32G 8% /usr
> >
> > # df -ih
> > Filesystem Inodes IUsed IFree IUse% Mounted on
> > /dev/hda3 120k 20k 100k 17% /
> > /dev/hda5 4.7M 149k 4.5M 4% /usr
> >
> > Now, I realize that this a very bad partition scheme but I'm just a
> > newbie. When I was installing debian a few months ago, I didn't intend to
> > have this scheme. I wanted root to be mounted as '/' and everything else
> > under '/usr' since thats the bigger partition. Unfortunately, most of
> > everything is mounted under '/'. I wonder where I went wrong...
> >
> > Can I change this situation, without re-formatting/re-partitioning? Or,
> > atleast for now, which files can I safely delete to free-up some space?
>
> I recommend you use one huge / partition. This way you won't run into
> this type of problem. You can delete logs in /var/log to get some free
> space, then I suggest you install parted which will allow you to change
> the size of your partitions. I suggest you shrink your /usr partition
> down to 5-10 gigs (I doubt you will install more software than this) and
> increase / to use up the extra space.
>
> The /usr partition is usually used to install software. The / partition
> holds everything that doesn't have its own partition, like /home, /var,
> /etc, etc.
>
> Bijan
Thanks everybody for your helpful responses. To make some temporary room
I cleaned up some logs and unnecessary directories in a few of the home
directories of some of the users.
Then I resolved to fix the problem once and for all by using parted to
resize the partitions. When I finally got around to doing it this past
weekend, things didn't go as smoothly as I thought they would.
When I boot the system using the parted boot disk and started parted I
saw the following warning message:
Using /dev/hda
attempt to access beyond end of device
03:00: rw=0, want=58593752, limit=58593750
Information: The operating system thinks the geometry on /dev/hda is
7294/255/63. Therefore, cylinder 1024 ends at 8032.499M
This is the information that parted shows about my partitions:
Disk geometry for /dev/hda: 0.000-57220.458 megabytes
Disk lable type: msdos
Minor Start End Type Filesystem Flags
1 0.031 31.376 primary fat 16
2 31.377 15390.395 primary ntfs boot
3 15390.396 15868.894 primary ext2
4 15868.894 54493.923 extended
5 15868.925 54015.424 logical ext2
6 54015.456 54390.396 logical linux-swap
Since my original problem requires me to shrink hda5 down to ~10 gigs and
expand hda3 to ~30 gigs I set about to do the following:
(parted) resize 5 40869.024 54015.424
and saw this:
attempt to access ... of device
03:00: rw-=0, ... limit=58593750 <-(same error msg as before)
Warning: You requested to resize the partition to 40869.024-54015.424Mb.
The closest Parted can manage is 15868.925-54015.424.
Ok/Cancel? c
So parted doesn't want to resize the partition that way. Then I quit
parted and restarted it as "parted /dev/hda5" and typed:
(parted) resize 1 0.000 13146.4
That actually resized something... when I restarted my computer normally,
/dev/hda5 mounted to /usr and "df" showed its size as 12 gigs (as opposed
to the old 37 gigs). However, parted continues to show the original
numbers. Morever, I still haven't solved my original problem, which is
expanding /dev/hda3. When I try:
(parted) resize 3 15390.393 40000.000
it says "The closest parted can manage is 15390.393 15868.894"
I also tried "parted /dev/hda4" but that just says "can't partition
outside of disk" even if I simply try to print info.
What do I have to do to get rid of that disk access error and
shrink hda5 (or hda4,5,6) and expand hda3?
In the meanwhile, I have 'resized' hda5 back to its original size
so that 'df' show its size as 37 gigs. I hope this makes sense.
thanks ... salman
Reply to: