# 6.2 - need to upgrade, not enough free space



## Mike_MT (Nov 4, 2013)

I'm in a bit of a situation here...I have an old 6.2 system running in VMware and I need to upgrade it to the latest stable version 9.2. 

My real issue is that / only has about 300M of free space. I have looked into lots of ways to add disk space (gparted, clonezilla, growfs, fdisk, etc.), but haven't had much luck.

Luckily it's a VM, so I can clone the system, break it, and start over without impacting production.

What's the best way to add disk space to a 6.2 system? If necessary, I might be able to upgrade it to 6.4, but I don't think much further than that as my 6.4 upgrade only left me 100M of free space.

Thanks,
Mike


----------



## beatgammit (Nov 4, 2013)

Can you just create a new VM with more space and copy configs over? A lot has changed since 6.x, and since it's a VM, you would be able to test everything before replacing the production VM.


----------



## wblock@ (Nov 4, 2013)

Agreed with @beatgammit, create a new VM with enough disk space, install FreeBSD 9.2, copy configurations and update them on the new VM.


----------



## Mike_MT (Nov 4, 2013)

I'm not sure if it will be easier to build new and migrate or upgrade existing. I have not been the admin of the box for quite some time and the configuration is a bit complicated. It's running a web server, database, and email. It also has a second disk that (afaik) is basically a data disk with all kinds of symlinks pointing to it.

What kind of options are there for migrating all of the configs, etc.? 

I haven't done it before, but would dump/restore be a possibility?

Mike


----------



## Savagedlight (Nov 4, 2013)

IIRC, this is how you would have to upgrade (can someone please verify or counter this?):
6.2 -> 6.3 -> 6.4
-> 7.0 -> 7.1 -> 7.2 -> 7.3 -> 7.4
-> 8.0 -> 8.1 -> 8.2 -> 8.3 -> 8.4 
-> 9.0 -> 9.1 -> 9.2

And reinstall all packages, do a dump&restore of the database, and similar stuff for the other packages as outlined in their documentation.

Or you could set up a new VM with the software you need (skipping going from 6.2 to 9.2), copy the relevant configs and transfer data (including databases, which would still require a dump/restore) accordingly.


----------



## youngunix (Nov 5, 2013)

Give this guide a try.


----------



## beatgammit (Nov 5, 2013)

Savagedlight said:
			
		

> IIRC, this is how you would have to upgrade (can someone please verify or counter this?):
> 6.2 -> 6.3 -> 6.4
> -> 7.0 -> 7.1 -> 7.2 -> 7.3 -> 7.4
> -> 8.0 -> 8.1 -> 8.2 -> 8.3 -> 8.4
> -> 9.0 -> 9.1 -> 9.2



Is it really necessary to step through minor versions? I thought you could go from any 7.x to any 8.x directly (and so on) without missing anything.

Also, I think the OP will have some problems with free space...

I'm pretty new to FreeBSD, so please correct me if I'm wrong.


----------



## kpa (Nov 5, 2013)

You should be able to go from let's say 7.0 to 8.4 or 8-STABLE without problems. Upgrading to one major version higher should always work. Upgrading two major versions higher at once is not supported.


----------



## phoenix (Nov 5, 2013)

The general consensus online/on lists/in docs appears to be:

upgrade to latest 6.x release
upgrade to 7.0
upgrade to latest 7.x release
upgrade to 8.0
upgrade to latest 8.x release
upgrade to 9.0
upgrade to latest 9.x release

Notice the pattern?  

Upgrading from X.Y to latest X is virtually guaranteed to work (it's just a minor version upgrade).

Upgrading from the latest X to X+1.0 is pretty much guaranteed to work.

Doing other kinds of version upgrades may or may not work, YMMV, don't try it after 11pm on a Friday while drinking, etc, etc.


----------



## Savagedlight (Nov 5, 2013)

Thanks for the corrections on upgrade path, I've updated my previous post.

As for getting enough space to do the upgrade instead of a clean install, there's a few options I can think of:
Try expanding the drive. Since the root partition is likely somewhere at the beginning of the disk, you can't make it grow into the new available space of the disk. Therefore, add another partition which is large enough to keep your new root, then format the new partion and dump from the old root and restore onto the new root. Update fstab accordingly (on the new root). Once you have successfully booted from the new root, you may delete the old root partition. VM snapshots will make this a much less risky endeavor.

Alternatively, you can add a new drive, partition it accordingly (remember boot code), dump from old file systems, restore to new, detach the old drive from the VM, and boot from the new drive.


----------



## wblock@ (Nov 5, 2013)

A big problem with trying to upgrade in place is the difficulty of testing.  There have been major changes since 6.0.  Things are different now.

A separate system can be tested offline.  Each application can be installed and the configurations migrated over individually.  Migrating like this also filters out all the accumulated temporary files and "just to get it working" patches.


----------



## phoenix (Nov 5, 2013)

Agree with @wblock@.  I used to do major upgrades in place, trying to upgrade from 6.x to 8.x.  After doing a handful of those upgrades, I now do clean installs with the latest release and copy/update config files.

It takes a little extra testing and requires extra hardware.  But the end result is much cleaner.


----------



## Mike_MT (Nov 6, 2013)

Thanks for all the replies. I think I'll build a new server and migrate to it.

Mike


----------

