running out of space

I just installed jdk and tomcat and on openSUSE 11, and I am getting out of space problems. I know I installed on fairly small hard disk. There are two hard disks(each 3GB)


1) df -h

Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             3.0G  2.8G   62M  98% /
udev                  121M  104K  121M   1% /dev
gvfs-fuse-daemon      3.0G  2.8G   62M  98% /root/.gvfs


2) fdisk -l

Disk /dev/sda: 3249 MB, 3249340416 bytes
255 heads, 63 sectors/track, 395 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x3dc33dc2

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         395     3172806   83  Linux

Disk /dev/sdb: 3228 MB, 3228696576 bytes
128 heads, 63 sectors/track, 782 cylinders
Units = cylinders of 8064 * 512 = 4128768 bytes
Disk identifier: 0x0001139d

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1             399         652     1024128   83  Linux
/dev/sdb2              26         398     1503936   83  Linux
/dev/sdb3             653         782      524160   82  Linux swap / Solaris

Partition table entries are not in disk order

What can I do?

Thanks,

Can you really not afford a larger disk?

Hi,
First I would remove all unnecessary packages, if any (like CUPS, bluetooth, office, sendmail, etc…)
Second I will move /usr to its own file system on disk 2 (or if you can reinstall the OS with custom partitioning)

Let’s face it: your hd is simply too small. I recommend about 10GB of space for the /-partition only, otherwise you’ll always struggle with too little space.

trabis wrote:

> What can I do?

Options:

Remove large packages that you do not need (or any unneeded package
for that matter).

Use a distribution that is designed for ultra small systems.

Buy a larger disk (my preference… shoot for less than $50 USD
you can solve this problem and avoid future space issues… at
least for quite some time)

openSUSE 11.0: Hardware Requirements

(Hard disk: At least 500 MB for minimal system; 3 GB recommended for standard system)

Sure, I will consider to use bigger hard disk, but here are some fundamental questions we might face in any situations.

-What is the second hard disk(3GB) used for? Addinig another hard disk can solve problems?

-How can we move the current installation partition to bigger hard disk without reinstallation?

Cheers,

Simply mirror the partition and then resize it with parted / GParted. It’s not hard to do.

openSUSE 11.0: Hardware Requirements

(Hard disk: At least 500 MB for minimal system; 3 GB recommended for standard system)

Muhahahaha, that must be the requirements for SuSE 5.0 or something. Somebody should edit that.

Edit: Oops, forgot about that:

What is the second hard disk(3GB) used for?

You mean ‘gvfs-fuse-daemon’? I thougt you could tell us, what kind of partition that is…

If you really have to work with those tiny disks, then I would split /usr into its own partition on the second disk. If you can reinstall that would be the easiest method, use the partition editor to specify where /usr should go. I wouldn’t bother to chop up sdb into partitions, it’s small enough as it is, just make one partition covering the whole disk.

Otherwise you would have to do a format, mount, copy /usr to new partition, rename old /usr, mkdir new /usr mountpoint and mount the new /usr. Which is ok if you can follow the steps.

Remember those minimal space specs are for CLI only servers and a small number of services, and not much data.

Also one large modern disk will take less power than two old small disks, if you want to be green.

I wouldn’t use copy for /usr. I would rather use this:

#cd /usr
#find . -depth | cpio -pmd /newusr

cp -a works fine. All the metadata is preserved.

You didn’t specified the cp -a. Just copy; it can lead to a simple copy which will miss the metadata preservation. Indeed cp -a will do also the trick

No, I didn’t specify all the steps in full, only in outline. I wasn’t going to go to that effort before knowing if the OP felt like doing it that way.

Can someone guide me more specifically how to upgrade current small disk installation into bigger one?

cp .a is sufficent?

Step by step would be very helpful for newbies like me.

Do you really need to keep the current installation? I am asking this because sometimes to perform a fresh installation is easier task from post-installation point of view rather than backup/restore.

sure, agreed that fresh installation is much easier and less painless process many times.

But my whole point is that out of space could happen any time even you started with 10G hard disk.

  • Does Linux OS system files install only first hard disk? Can we mount some directories on second hard disk?

  • Can we control installing any new programs into second hard disks?

Cheers,

The installer will do the right thing if you specify what goes where. Certainly it can handle more than one disk.

Are you comfortable with the CLI? If yo understand what this series of commands does, then go for it. Run as root in a console, of course.


cd /root
fdisk /dev/sdb # interactive, delete existing partitions, create one sdb1
mke2fs -j /dev/sdb1
mv /usr /oldusr
mkdir /usr
mount /dev/sdb1 /usr
cp -a /oldusr/. /usr
# edit /etc/fstab and add entry to mount sdb1 on /usr
# remove /oldusr at leisure

exactely.
ken, I think trabis owns us some REPs points ;):):wink:

Thanks all, I really appreciate your input.

What the heck is REPs points ?

This is my next trial plan.

  1. Create systemRescueCd and boot up the machine.

  2. Create the current partition into image file and save into USB stick(4GB)

  3. Restore this image file into bigger hard disk

I think it will do the trick.
The REP points - just above the “Location” on right side of each post, on the same line with Date: time,you will see Rep = Reputation is something like saying “Thank you - the answer was helpful!”

cool… I never knew about it. I could buy drink for getting advice. :shame: