Upgrading Red Hat Enterprise Linux / CentOS / Oracle Linux
RHEL/CentOS/Oracle Linux Migration: Storage
The default file system has changed multiple times,
going from Ext3 to Ext4 to XFS, and possibly on
to Btrfs in some distributions.
Given a recent enough kernel and user-space tools, you could
have used later file systems in some releases, and you
still have full backward-compatable support of all older
file systems.
The file /etc/fstab
has become less complex
with the kernel automatically mounting many of the
pseudo file systems without them being explicitly listed.
Identity Management
The previous page described the relatively minor changes in user and group management. Now that we have created these user accounts, we must set up storage for all their data!
5 — Storage
The default file system changed twice in going from RHEL 5 (Ext3) to RHEL 6 (Ext4) to RHEL 7 (XFS). It initially surprised me when Red Hat dropped Btrfs support, but then I realized that it's Oracle's product.
Release | Default FS | Maximum | |
Volume size | File size | ||
RHEL 5 | Ext3 | 4–32 TiB | 16 GiB – 2 TiB |
RHEL 6 | Ext4 | 1 EiB | 16 TiB |
RHEL 7 | XFS | 16 EiB | 8 EiB |
RHEL 8 | |||
RHEL 9 |
1 TiB = 240 bytes = 1024 GiB
1 PiB = 250 bytes = 1024 TiB
1 EiB = 260 bytes = 1024 PiB
Oracle bought Sun Microsystems in January 2010, and soon retired both the Solaris operating system and the SPARC hardware on which it ran. I think that Oracle bought Sun to get the ZFS file system. They have been porting ZFS features into Btrfs. The head of the Ext4 file system project, an Oracle employee, said that Ext4 was just a temporary stepping stone on the way to Btrfs.
Meanwhile, Red Hat deprecated Btrfs at RHEL 7.4. My new theory is that Red Hat is anti-Btrfs at least partly because Btrfs may soon be seen as Oracle's file system.
Release | Default FS | File System Tools | ||||
Create | Modify/view metadata |
Modify/grow file system |
Check/Repair | Dump Restore |
||
RHEL 5 | Ext3 | mkfs.ext3 |
tune2fs |
resize2fs |
fsck.ext3 |
dump |
RHEL 6 | Ext4 | mkfs.ext4 |
tune2fs |
resize2fs |
fsck.ext4 |
dump |
RHEL 7 | XFS | mkfs.xfs |
xfs_admin |
xfs_growfs |
xfs_repair |
xfsdump |
RHEL 8 | ||||||
RHEL 8 | ||||||
Oracle 7–9 | Btrfs | mkfs.btrfs |
btrfs filesystem btrfs-debug-tree btrfs property |
btrfs filesystem |
btrfs scrub |
btrfs image |
RHEL 8 added the Stratis local storage manager.
The kernel drivers used for IDE/PATA disks have changed.
IDE/PATA disks appeared as devices /dev/hd?
in RHEL 5,
starting with RHEL 6 all disks are /dev/sd?
.
File system device definitions in /etc/fstab
were
in terms of LABEL=
in RHEL 5.
That changed to UUID=
in RHEL 6.
Starting with RHEL 7, it is no longer practical for
/usr
to be a separate file system.
This isn't specifically the fault of Red Hat's design.
The components used by all distributions now
disregard or violate the classic UNIX convention
that the root file system be small
with just what's needed for booting,
while /usr
has things needed later.
But now /bin
, /lib
,
/lib64
and /sbin
are just symbolic links to directories within /usr
.
Support for exFAT file systems, used by default in newer flash memory, was finally added at version 9.
Red Hat's recommendation for swap area continues to change and contradict itself. For example, install RHEL 7 onto a system with 8 GB of RAM and let the installer set up the storage. Red Hat's documentation recommends either 4 or 8 GB in that situation, but their installer creates a 2 GB swap area for RHEL 7. RHEL 8 on that same platform creates an 8 GB swap area.
It's time to kill off the old assumptions about Oracle needing unusual amounts of swap and a raw partition of its own. Put Oracle on a modern system with plenty of RAM and an efficient file system.
The NFS server now uses /etc/exports.d/*
in addition to /etc/exports
.
The automounter now uses /etc/auto.master.d/*
in addition to /etc/auto.master
.
Starting with RHEL 7, the mount
command shows
a larger list of mounts that aren't file systems
appearing in routine
df
output.
They do appear if you run df -a
.
However, at least the /etc/fstab
file is
much simpler in RHEL 7 and 8.
If you have been using LUKS for encrypted file systems, RHEL 8 uses LUKS2 by default, versus legacy LUKS (LUKS1) used in earlier versions.
Release | Physical RAM |
Swap Recommendation |
To allow hibernation |
RHEL 4 | always | at least 32 MB | |
≤ 2 GB | 2 × RAM | ||
> 2 GB | 2 GB + RAM | ||
RHEL 5 | < 4 GB | at least 2 GB | |
4–16 GB | 4 GB | ||
16–64 GB | 8 GB | ||
64–256 GB | 16 GB | ||
256–512 GB | 32 GB | ||
RHEL 6 | ≤ 2 GB | 2 × RAM | 3 × RAM |
2–8 GB | same as RAM | 2 × RAM | |
8–64 GB | at least 4 GB | 1.5 × RAM | |
> 64 GB | at least 4 GB | don't | |
RHEL 7 | ≤ 2 GB | 2 × RAM | 3 × RAM |
2–8 GB | same as RAM | 2 × RAM | |
8–64 GB | 0.5 × RAM | 1.5 × RAM | |
> 64 GB | it depends | don't | |
RHEL 8 | ≤ 2 GB | 2 × RAM | 3 × RAM |
2–8 GB | same as RAM | 2 × RAM | |
8–64 GB | 4 GB to 0.5 × RAM | 1.5 × RAM | |
> 64 GB | it depends | don't | |
RHEL 9 | ≤ 2 GB | 2 × RAM | 3 × RAM |
2–8 GB | same as RAM | 2 × RAM | |
8–64 GB | 4 GB to 0.5 × RAM | 1.5 × RAM | |
> 64 GB | it depends | don't |
These lines were in /etc/fstab in RHEL 5 and 6. The lines are gone in RHEL 7. The file systems are now mounted automatically by the kernel, they don't clutter up /etc/fstab:
none /dev/pts devpts gid=5,mode=620 0 0 none /dev/shm tmpfs defaults 0 0 none /proc proc defaults 0 0 none /sys sysfs defaults 0 0
Now that we can add storage as needed, we can start
some large software development projects.
The next page combines two related topics:
package management with rpm
and yum
(and, later, dnf
),
and building software from source.