# Partitioning, slicing, raid... new system - future updates.



## jomo (Jul 8, 2010)

Hi gurus,

I'm planning make a new production server mainly for internet services (mostly web (modperl) and email) & some jails. HW: 1U server with 4xHDD slot. The server will be housed on remote location, i'm not sure about a kvm, yet.

My main concern is about a future OS upgrades - in case when buildworld fail. 

Is possible install freebsd on one partition and leave a identical partition free for the next freebsd release?
My idea is: Now installing freebsd on one partition (root, swap, usr+ports) and leave an identical free partition (root, swap, usr+ports) for the next release. When the next release come out want install it into second partition. Reboot the newly installed system and if anything go wrong i can boot (and run) the old system without any problems.

Of course, i want set-up raid for user data (and maybe, for the OS too).

Need some advice what is a optimal HDD partition and software-raid setup.
for 4xSATA HDD. How divide my disks? (in reality i don't need 4x HDDs - i can afford one HDD as a spare disk too.)

Some additional questions:
- it is worth install one solid state HDD (for the freebsd OS)? and RAID for other 3 HDDs (user data)?
- what raid is optimal with 3-4x sata? Mirror only or with stripping to? Want use software raid, not hw.
- is here anything what i must not forget about future HDD upgrades (bigger HDDs, and so on?)
- zfs or not? (and if yes, how much memory need "plus"?)

anything other? I don't want exchange in the HW in next few years. (don't counting failures) - therefore, i'm looking for a solution how REMOTELY upgrade OS with minimal risk.

thanx in advance,
jm.

Ps: i everywhere used the term "partition" - ofc the question is about a slices too. And sorry for my terrible english.


----------



## jem (Jul 8, 2010)

I'd definitely consider using ZFS.  If you lay out your ZFS filesystems correctly, in the future you can install a second newer version of FreeBSD into a second set of ZFS filesystems parallel to your main ones, then repoint the vfs.root.mountfrom line in loader.conf and the bootfs property of your main ZFS pool and boot from the new version.

Alternatively, if you go along the upgrade/buildworld path, you can take a snapshot before you begin and roll back if anything goes wrong.

With four disks, I'd probably set up a pair of mirrors and use them as two seperate pools, or possibly stripe across both mirrors.  FreeBSD can boot from a raidz pool, but I'm not sure how robust that is.

I'm running ZFS on a box with 2GB RAM and am having no problems, but the box doesn't do a huge amount of I/O and it only has two disks in a mirrored pool.


----------



## phoenix (Jul 8, 2010)

Have a look at ZFS.  The installation is a bit more difficult, to get the root filesystem onto ZFS.  But the benefits are many.  Especially if you incorporate Managed Boot Environments, which allow you to have multiple different ZFS filesystems with separate kernels, root filesystem, etc.  Add snapshots, and you can have an almost bullet-proof upgrade environment (take snapshot, upgrade ports, things fail, rollback snapshot).

With 4 drives, you can go with either a pair of mirror vdevs for the best performance, or a 4-drive raidz1 vdev for the most storage space, or a 4-drive raidz2 vdev for the best redundancy.


----------



## jomo (Jul 20, 2010)

Wow! Managed Boot Environments is exactly that, what i looking for. THANX!
Seem, need much, much more RTFM. 
jomo


----------

