Reiser4
Reiser4 is the successor filesystem for ReiserFS, initially designed and developed entirely from scratch by Namesys and Hans Reiser.
It is very efficient in handling many files (often used in /var
for this purpose) and includes a plugin-based design with plugins with features such as intelligent transparent compression, both inline data and meta-data checksums through the crc32c algorithm with added optional mirrors and failover support through its own implementation of subvolumes.
More information about the features, plugins, design and mkfs or mount options is described in detail here.
Installation
- Reiser4 is still not included in the official Linux kernel, patches are provided to apply on the mainline kernel.
- It consumes a little more CPU than other filesystems (just like Btrfs). To avoid having issues on laptops using TLP for power saving, it is recommended to disable the options for
SATA Link
power saving in/etc/default/tlp
(again, as with Btrfs). - LILO is the only bootloader officially supporting Reiser4, but it seems to have issues when
/boot
is formatted as Reiser4 - Access Control Lists is not implemented and requires that journald either logs to a separate logging daemon or to tmpfs. Another workaround is to compile systemd by source without ACL support, but is not recommended.
Install the reiser4progsAUR package which provides utilities for creating, fsck'ing and debugging Reiser4 volumes.
You will need a Reiser4 patched kernel. Patches can be found on Sourceforge or at the more recently created Git repository which is maintained by its current lead developer, the mathematician and programmer Edward Shishkin.
Bootloader
- Backing up your bootloader configuration file should be considered if one is going to have
/boot
residing on a Reiser4 volume. - EFI systems in general require a FAT32 partition for booting the kernel and thus it may be advantageous or unproblematic to have the
/boot
directory residing on that partition instead of only the EFI directory. Many EFI-users have their whole/boot
directory on their ESP.
It is recommended that you make a small (20-200mb) partition for /boot
with a filesystem other than Reiser4, and then copy your /boot
folder to the partition. Update your bootloader configuration accordingly, e.g. see #/boot/grub/grub.cfg.
If you do not use EFI and wish to put everything including /boot
on a Reiser4 partition (not recommended) you will need to use LILO. This is not advised, as you will probably encounter an error when trying to update lilo.conf
. See #/etc/lilo.conf.
Moving to Reiser4
In the next steps we will copy the data from your current root partition to the new Reiser4 partitions. Make sure you have enough disk space on the Reiser4 partition with:
# df -h
Below is the sample system this section will use as an example:
# fdisk -l
* /dev/sd''xZ'': (10 Gb, 5 Gb free); Reiserfs /mnt/oldroot * /dev/sd''xY'': (10 Gb, 10 Gb free); Reiser4 / * /dev/sd''xW'': (200 Mb, 180 Mb free); ext2 /boot
Formatting
Since Reiser4 supports different transaction models optimized for different types of storage media (SSDs, HDDs), the options used while formatting and mounting will differ.
It is recommended and also the default to use the cryptcompress plugin by formatting with the following options:
# mkfs.reiser4 -o create=ccreg40 /dev/sdxY
Since Reiser4 also has options specifically for SSD users as well, it is recommended to discard the partition upon creation of the filesystem, by adding the switch.
For drives with controllers already having hardware compression (like SandForce ones), it may be better to to disable the compression plugin, for example with an SSD:
# mkfs.reiser4 -d -o create=reg40,node=node41 /dev/nvme0nXpY
Copy system
Once the partition is formatted, copy you current system to the new partition and create the system directories. You may either do this from Arch Linux, or to make it easier (so that you do not have to use makedev later), just boot up with a Live media and mount both your new Reiser4 partition and your current root partition. Then, just copy everything over like so:
Depending on what transaction model one wish to use which are optimized for different types of storage media, the mount option txmod=wa
(for SSDs), txmod=journal
(for HDDs) must be defined when mounting the partitions through the switch. The default is which heuristically alternates between the "wa" (write-anywhere) and "journal" models for optimized performance on rotating disks while trying to avoid excess fragmentation at the same time.
Then, you need to mount your /boot
partition, and if you have not already, copy /boot
from your original root partition over to it.
Do not forget to edit your bootloader's configuration appropriately (see #Bootloader examples).
/etc/fstab
If you can confirm that Reiser4 works for you, you should format the old root partition.
Bootloader examples
/boot/grub/grub.cfg
Then run:
# grub-mkconfig -o /boot/grub/grub.cfg
/etc/lilo.conf
# # /etc/lilo.conf # boot=/dev/sd''x'' # This line often fixes L40 errors on bootup # disk=/dev/hda bios=0x80 default=Arch4 timeout=20 lba32 prompt compact image=/boot/vmlinuz-linux label=Arch4 root=/dev/sd''xY'' append="video=vesafb:1024x768-24@56,ywrap,mtrr splash=verbose,theme:darch console=tty1 resume2=swap:/dev/sdb1" initrd=/boot/initramfs-linux.img read-only image=/boot/vmlinuz-linux label=Arch root=/dev/sd''xZ'' append="video=vesafb:1024x768-24@56,ywrap,mtrr splash=verbose,theme:darch console=tty1 resume2=swap:/dev/sdb1" initrd=/boot/initramfs-linux.img read-only
Then run:
# lilo
Troubleshooting
- Permissions: see chown.
- If you have problem with su after the change of filesystem, you should reinstall .