The Issue
A couple of weeks ago, I decided to update my home server from CentOS 6.x to CentOS 7.x. No real motivation for the move, since my home server was working flawlessly, but I had a desire to keep it in par with the latest and the greatest.
In reality, using Fedora for my laptop, I wanted to (somewhat) unify technologies used in both machines: the dreaded SystemD, the new journal, Gnome 3.x.
Speaking of these, if I can tell my opinion, SystemD (mostly) just works, both for the desktop and the server. The journal is a non-issue, and for Gnome 3 - well, having been a fan of KDE for a long time, and a Windows user sometimes for my job, while in these environments I usually find myself trying to reach the Overview moving the mouse cursor in the upper left corner (or pressing the windows key).
Upgrade or Clean Install?
I tend to prefer the latter during some release cycles of Fedora, and between major upgrades in CentOS. Why? Too much cruft. Especially the server has multiple roles for me (internal yum repo, backup server, Samba Server, AFS Server), and for some of these services I want to start clean again, while documenting (through this blog, by the way) what I am doing.
As a pet project, I would like to replicate this configuration steps through SaltStack, so starting from a clean install allows me the really keep everything under control.
Additionally, I want to move most of my volumes from an ext4 fs to XFS; my preference would have gone to BTRFS (especially thinking to the RAID 1 setup I have, and snapshotting the BackupPC data volume) but I had a couple of crashes in Fedora that warned me about the testing status of the filesystem.
The Environment
My Home Server is an HP Proliant N36L (the older ones) with an AMD Athlon II Neo CPU (x86_64 architecture, of course). My current configuration is as follows:
- One 250 gb disk for OS
- Two 2TB disks in RAID 1 configuration
- 8 GB of ECC RAM
- dnsmasq (for simple dns / dhcp )
- BackupPC (continous backup of client machines)
- Apple File Share (yes, my wife got a MacBook)
- Samba Shares
- Apache for Yum Repo
How Did I proceed?
The RAID volumes (it's actually RAID + LVM) won't be touched; so I copied some files over there before beginning. Cloud Backup was up to date (I use Crashplan), such as some offline backups I use. Time to go.
Downloaded the CentOS 7 torrent, started the rtorrent client.
After that I dd'ed the image. The reference is at CentOS wiki but the command is the following:
After that I created a new Volume to (teporarily) move stuff around, while transforming previous filesystems from ext4 to XFS.
Recreating the volumes with the new file system is as simple as:
After that I added, as I always do, the EPEL repository for additional software and dependencies:
What I am going to do: looking for additional sources or, in bad luck, repackaging the fedora packages.
The things to keep an eye on are the systemd enabled services / packages, and general compatibility with the system.
For building packages on the system:
dd if=CentOS-7.0-1406-x86_64-DVD.iso of=/dev/sde bs=1MReboot (in BIOS you should have enabled the boot from USB), and install a base system. No issue here, everything was smooth. I should say that I find the new installer graphically clean and pleasant, apart from the "select disk / partition" part which is mostly unclear from a user point of view (Máirín did a great job here, but I am still unsure, after F18-19-20-21, where, if and when I will have the option to review partitioning).
After that I created a new Volume to (teporarily) move stuff around, while transforming previous filesystems from ext4 to XFS.
Recreating the volumes with the new file system is as simple as:
mkfs.xfs -f -L $label /dev/vg_volumegroup/lv_logicalvolumeI added the -f (force) option because mkfs stops when detects an already created file system on the volume.
After that I added, as I always do, the EPEL repository for additional software and dependencies:
sudo yum install epel-releaseThis works because CentOS now adds the epel-release package in the extras repository.
Package rebuilding preparation
CentOS (as RedHat) does not have all the packages that, eg, Debian has. This is a weak spot but, for my setup at least, an easy one to fix.What I am going to do: looking for additional sources or, in bad luck, repackaging the fedora packages.
The things to keep an eye on are the systemd enabled services / packages, and general compatibility with the system.
For building packages on the system:
sudo yum groupinstall "Development Tools"
After that, execute rpmdev-setuptree to set the paths. I'll state the obvious, here: all package building activities should be done with a non-root account.sudo yum install rpmdevtools mock fedora-packager
No comments:
Post a Comment