Linux - GeneralThis 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
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.
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.
I am getting error messages to the effect that there's not enough space on the drive.
How can I verify that this is true ?
If it is true, can I use cfdisk to resize the partition ?
Maybe some of the following info will be informative.
Here is an example error message, received while doing apt-get upgrade
Preparing to replace msttcorefonts 1.1.12 (using .../msttcorefonts_1.2_all.deb) ...
Unpacking replacement msttcorefonts ...
Preparing to replace mysql-server 4.0.22-6 (using .../mysql-server_4.0.23-1_i386.deb) ...
ERROR: There's not enough space in /var/lib/mysql/
dpkg: error processing /var/cache/apt/archives/mysql-server_4.0.23-1_i386.deb (--unpack):
subprocess pre-installation script returned error exit status 1
Preparing to replace python2.3-numeric 23.6-2 (using .../python2.3-numeric_23.6-3_i386.deb) ...
Unpacking replacement python2.3-numeric ...
Errors were encountered while processing:
/var/cache/apt/archives/mysql-server_4.0.23-1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Welcome to Knoppix (Kernel 2.6.7)
root@linuxbox:/home/john# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda1 6040288 5817536 0 100% /
root@linuxbox:/home/john# parted
Using /dev/hda
Information: The operating system thinks the geometry on /dev/hda is
19457/255/63. Therefore, cylinder 1024 ends at 8032.499M.
(parted)
Disk Drive: /dev/hda
Size: 160041885696 bytes, 160.0 GB
Heads: 255 Sectors per Track: 63 Cylinders: 19457
Name Flags Part Type FS Type [Label] Size (MB)
----------------------------------------------------------------------------------------------------------------------------
hda1 Boot Primary Linux ext3 6284.12
hda5 Logical Linux swap 518.20
hda6 Logical Linux ext3 8562.52
hda3 Primary Linux ext2 144674.45
To verify how much space is on the Hard Drive use the following command:
Code:
df -m
You may need to be root to run the command, I can't remember. What it'll do is show you how much Disk space (in megabytes) is being used, how much is free and what percentage is in use.
Yep, it's full. It looks like your partitioning scheme got screwed up somewhere along the line. 6GB isn't that big for a complete file system. Looking at your cfdisk results, you have /dev/hda6 at 8GB and /dev/hda3 at a whopping 144GB, so you have plenty of space on the drive as a whole. However, looking at your fstab, it seems that these two partitions aren't mounted anywhere useful (/mnt/hda3 and /mnt/hda6???).
What we seem to have now is:
/dev/hda1 / 6GB
/dev/hda3 /mnt/hda3 144GB
/dev/hda6 /mnt/hda6 8GB
What we probably want is:
/dev/hda1 /boot 6GB
/dev/hda3 /var 144GB
/dev/hda6 / 8GB
(/boot really doesn't need to be that big, but it does need to be at the beginning of the disk.)
To accomplish this, you're going to need to move some stuff around or just reinstall the OS. How "old" is this installation? If it's brand new, I would start over so that you can use a better partitioning scheme, such as:
/dev/hda1 /boot 100MB
/dev/hda5 swap 500MB
/dev/hda3 / 10GB
/dev/hda6 /var 50GB
/dev/hda7 /home 99GB
These last two numbers are highly debatable, depending on the uses to which your machine will be put. In other words, where will you be requiring the most space? If you need lots of stuff in user home directories, then /home should be large. If your machine is only going to be a webserver, but is serving lots of files, then /var should be large and /home can be small. So, what is the server for?
Why split it?
All you need is / and swap, or at the very most, /boot / and swap. Maybe I'm behind the times, but limiting space per partition seems dumb to me. /shrug.
If you do make a /boot partition, make it 100mb or so, and make sure it is your first partition.
Figure out what's using your space...
find . -size +1000 -exec ls -l {} \; | sort -k 5n
I split mine so that if something gets out of control it doesn't fill up the whole disk.
Korff,
There are a lot of good reasons to split up the filesystem.
For instance, you can put /var on its own partition. The reason for that is, if your var partition fills up with logs, your system won't grind to a halt. Logging utilities will fail because they can't write, but the system itself will still be functional to clear out old/unnecessary logs or run-time data. You gain a similar benefit if you do the same thing with /tmp (in case some process goes ballistic creating temporary files).
You could create a partition for /etc. Doing that would allow you to mount it read-only. That way, only users allowed to mount drives can make changes to settings (by mounting it read-write, make changes, re-mount read-only). It also prevents any script or "make install" commands from blindly making changes to your configuration. That way, you see the error in the script, and can inspect the changes the software wants to make before deciding if it's something you want to allow.
Similarly, if you have your core utilities (/bin, /lib, /sbin) on a separate partition and read-only, you gain the benefit of making sure nobody can come in and mess with the system's basic functionality. That gives you a little added security that if something horrible goes wrong, you can boot into single-user mode to recover (except in the worst situations; like dd if=/dev/zero of=/dev/hda).
Also, /home is useful as a separate partition for the purposes of preservation. You could wipe out your entire installation on every other partition, re-install a brand new distribution, and you would maintain your personal settings and files without having to tar-backup-untar.
I'm sure there are others, but those are the ones that came to me off the top of my head.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.