Custom distro thinks it's running out of space

After using this guide, ~~[http://library.linode.com/linode-platform/custom-instances/custom-distro-howto" target="_blank">](http://library.linode.com/linode-platfo … stro-howto">http://library.linode.com/linode-platform/custom-instances/custom-distro-howto](, I'm running Slackware 14 64bit. It's been running fine for the past few weeks, but just now as I was trying to add some photos to a web page I'm hosting, I starting running into some strange errors:

cp: writing '../my/photo.jpg': No space left on device
cp: failed to extend '../my/photo.jpg': No space left on device

The output from df seems to confirm that there's no room to copy my photo:

# df
Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/xvda        3883200 3880244         0 100% /

But I know that there should be plenty of space left:

# fdisk -l

Disk /dev/xvda: 21.2 GB, 21206401024 bytes
255 heads, 63 sectors/track, 2578 cylinders, total 41418752 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

    Device Boot      Start         End      Blocks   Id  System

Disk /dev/xvdb: 268 MB, 268435456 bytes
255 heads, 63 sectors/track, 32 cylinders, total 524288 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

I think the 3883200 KB is about the size of the initial VM I set up on my local machine in order to install the OS and set things up before I uploaded it to linode. I think that maybe the OS doesn't realize it's got more space now.

Does anyone have any advice about which settings or config file to look into further?

Thanks.

6 Replies

From Finnix, run 'resize2fs' to expand your filesystem. That should do it (assuming you're using ext3/4).

or shutdown and run the resize from the linode manager.

Thanks! Though it looks like I can just run 'resize2fs' from the currently installed system, rather than having to reboot into Finnix or shutdown and resize from the linode manager.

I guess I'll find out if that won't work…

Nice! Thanks hoopycat & dan. I ran 'resize2fs' from Slackware, and it seems to have done the trick:

# df
Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/xvda        3883200 3126648    559292  85% /

# resize2fs /dev/xvda
resize2fs 1.42.6 (21-Sep-2012)
Filesystem at /dev/xvda is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 2
The filesystem on /dev/xvda is now 5177344 blocks long.

# df
Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/xvda       20393244 3129484  16400672  17% /

Still looks like you need to clean out your log files a bit to free up some space. Make sure you have logrotate properly configured so that your drive does not get filled up with random rubbish.

There was a bug where using mysql and django sessions caused massive disk use. I had this problem and switched to postgres.

http://djangosnippets.org/snippets/1273/

James

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct