Welcome to the Reiser4 Wiki, the Wiki for users and developers of the ReiserFS and Reiser4 filesystems.

For now, most of the documentation is just a snapshot of the old Namesys site (archive.org, 2007-09-29).

There was also a Reiser4 Wiki (archive.org, 2007-07-06) once on pub.namesys.com.

Reiser4 Howto

From Reiser4 FS Wiki
(Difference between revisions)
Jump to: navigation, search
(reiserfsprogs can be resized too)
(use a real table for the transaction models)
(21 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=== Reiser4 ===
+
= Reiser4 =
  
 
As <tt>reiser4</tt> is not in mainline yet, we have to apply the right [[Reiser4_patchsets|patch]] to get this working:
 
As <tt>reiser4</tt> is not in mainline yet, we have to apply the right [[Reiser4_patchsets|patch]] to get this working:
  
  $ wget http://www.kernel.org/pub/linux/kernel/people/edward/reiser4/reiser4-for-2.6/reiser4-for-2.6.30.patch.bz2
+
wget http://downloads.sourceforge.net/project/reiser4/reiser4-for-linux-4.x/reiser4-for-4.13.0.patch.gz
  $ wget http://www.kernel.org/pub/linux/kernel/people/edward/reiser4/reiser4-for-2.6/reiser4-for-2.6.30.patch.bz2.sign
+
cd /usr/src/linux
  $ gpg --verify reiser4-for-2.6.30.patch.bz2.sign reiser4-for-2.6.30.patch.bz2
+
gzip -dc ~/reiser4-for-4.13.0.patch.gz | patch -p1
  gpg: Signature made Tue 23 Jun 2009 12:43:47 AM CEST using DSA key ID 517D0F0E
+
  gpg: Good signature from "Linux Kernel Archives Verification Key <ftpadmin@kernel.org>"
+
  $ cd /usr/src/linux
+
  $ bzip2 -dc ~/reiser4-for-2.6.30.patch.bz2 | patch -p1
+
  
 +
Now enable <tt>CONFIG_REISER4_FS</tt> and build (and install) your kernel. Do not enable debugging option: this is for developers only. Reboot.
  
Now enable <tt>CONFIG_REISER4_FS</tt> and build (and install) your kernel. Reboot, and don't forget to
+
If your kernel older than 4.10, make sure that your operating system uses a swap partition of standard recommended size.  
[[Bugs|report bugs]] if things go wrong. Even more important: don't forget your backups before messing with your filesystems!
+
  
 
To create/check/debug Reiser4 filesystems, you'll need the [[Reiser4progs|reiser4progs]].
 
To create/check/debug Reiser4 filesystems, you'll need the [[Reiser4progs|reiser4progs]].
  
=== ReiserFS ===
+
Format your partition with mkfs.reiser4 utility. To protect your metadata by [[Reiser4_checksums | checksums]]
 +
use mkfs option "-o node=node41". If you create reiser4 on [[Reiser4_discard_support | SSD drive]],
 +
then use mkfs option "-d".
 +
 
 +
NOTE: mkfs.reiser4 of version 1.1.0 by default turns intelligent compression on. To disable compression, override it by mkfs option
 +
"create=reg40". Compression is highly recommended e.g. for root partitions, which contain system data. It is because default reiser4
 +
intelligent compression heuristic works perfectly on a mix of well-compressible text files and non-compressible binaries. However,
 +
intelligent compression is suboptimal for large media-files (ISO images, MP4, etc). Currently it is impossible to specify compression
 +
per-file, or per-directory, so for large media-files we recommend to use a separate partition with disabled compression.
 +
 
 +
 
 +
Choose a [[Reiser4_transaction_models|transaction model]], which is most suitable for you:
 +
 
 +
{| class="wikitable"
 +
|-
 +
! Mount option
 +
! Description
 +
! Intended for
 +
! Default
 +
|-
 +
| txmod=journal
 +
| Classic journaling with wandering logs. All blocks of a transaction are overwritten.
 +
| HDD users, who performs a lot of random overwrites (e.g. databases)
 +
| no
 +
|-
 +
| txmod=wa
 +
| Classic Write-Anywhere aka Copy-on-Write. All blocks of a transaction except system ones get new location on disk.
 +
| SSD users
 +
| no
 +
|-
 +
| txmod=hybrid
 +
| Hybrid transaction model. Some blocks are overwritten, other ones are written to new location on disk.
 +
| HDD users, who don't perform a lot of random overwrites
 +
| yes
 +
|}
 +
 
 +
Mount your reiser4 partition. Use the mount option "-o discard" for SSD drives. More details are [[Reiser4_discard_support | here]].
 +
 
 +
[[Bugs|Report bugs]] if something is going wrong.
 +
 
 +
= ReiserFS =
  
 
Since <tt>reiserfs</tt> is in mainline, just enable the following options in your kernel <tt>.config</tt>:
 
Since <tt>reiserfs</tt> is in mainline, just enable the following options in your kernel <tt>.config</tt>:
Line 32: Line 68:
 
To create/check/debug/resize ReiserFS filesystems, you'll need the [[Reiserfsprogs|reiserfsprogs]].
 
To create/check/debug/resize ReiserFS filesystems, you'll need the [[Reiserfsprogs|reiserfsprogs]].
  
=== Booting off a ReiserFS/Reiser4 partition ===
+
= Booting off a ReiserFS/Reiser4 partition =
  
 
Booting ''off a ReiserFS/Reiser4 partition'': what we mean here is that the kernel (usually a file in <tt>/boot</tt>) is actually located on a ReiserFS/Reiser4 partition. If you have a separate partition for <tt>/boot</tt> (e.g. a (readonly-mounted) ext2 partition at the beginning of your disk) and your ''root-filesystem'' is on a ReiserFS/Reiser4 partition, you only need to make sure that ReiserFS/Reiser4 support is enabled in your kernel - but that's true for every filesystem and has nothing to to with the bootloader.
 
Booting ''off a ReiserFS/Reiser4 partition'': what we mean here is that the kernel (usually a file in <tt>/boot</tt>) is actually located on a ReiserFS/Reiser4 partition. If you have a separate partition for <tt>/boot</tt> (e.g. a (readonly-mounted) ext2 partition at the beginning of your disk) and your ''root-filesystem'' is on a ReiserFS/Reiser4 partition, you only need to make sure that ReiserFS/Reiser4 support is enabled in your kernel - but that's true for every filesystem and has nothing to to with the bootloader.
Line 40: Line 76:
 
For Reiser4, LiLo is [http://wiki.archlinux.org/index.php/Reiser4FShowto#Packages known to work] out of the box. To install GRUB on a Reiser4 partition, [[Reiser4_Howto/GRUB|a few more steps are needed]].
 
For Reiser4, LiLo is [http://wiki.archlinux.org/index.php/Reiser4FShowto#Packages known to work] out of the box. To install GRUB on a Reiser4 partition, [[Reiser4_Howto/GRUB|a few more steps are needed]].
  
=== Links ===
+
= Links =
  
 +
* [[Reiser4 checksums]]
 +
* [[Reiser4 Mirrors and Failover]]
 +
* [[Debug Reiser4|Reiser4 Debugging]]
 
* [http://web.archive.org/web/20061113154749/www.namesys.com/install_v4.html Getting started with Reiser4] (from archive.org, 2006-11-13)
 
* [http://web.archive.org/web/20061113154749/www.namesys.com/install_v4.html Getting started with Reiser4] (from archive.org, 2006-11-13)
  
 
[[category:ReiserFS]]
 
[[category:ReiserFS]]
 
[[category:Reiser4]]
 
[[category:Reiser4]]

Revision as of 00:56, 1 November 2017

Contents

Reiser4

As reiser4 is not in mainline yet, we have to apply the right patch to get this working:

wget http://downloads.sourceforge.net/project/reiser4/reiser4-for-linux-4.x/reiser4-for-4.13.0.patch.gz
cd /usr/src/linux
gzip -dc ~/reiser4-for-4.13.0.patch.gz | patch -p1

Now enable CONFIG_REISER4_FS and build (and install) your kernel. Do not enable debugging option: this is for developers only. Reboot.

If your kernel older than 4.10, make sure that your operating system uses a swap partition of standard recommended size.

To create/check/debug Reiser4 filesystems, you'll need the reiser4progs.

Format your partition with mkfs.reiser4 utility. To protect your metadata by checksums use mkfs option "-o node=node41". If you create reiser4 on SSD drive, then use mkfs option "-d".

NOTE: mkfs.reiser4 of version 1.1.0 by default turns intelligent compression on. To disable compression, override it by mkfs option "create=reg40". Compression is highly recommended e.g. for root partitions, which contain system data. It is because default reiser4 intelligent compression heuristic works perfectly on a mix of well-compressible text files and non-compressible binaries. However, intelligent compression is suboptimal for large media-files (ISO images, MP4, etc). Currently it is impossible to specify compression per-file, or per-directory, so for large media-files we recommend to use a separate partition with disabled compression.


Choose a transaction model, which is most suitable for you:

Mount option Description Intended for Default
txmod=journal Classic journaling with wandering logs. All blocks of a transaction are overwritten. HDD users, who performs a lot of random overwrites (e.g. databases) no
txmod=wa Classic Write-Anywhere aka Copy-on-Write. All blocks of a transaction except system ones get new location on disk. SSD users no
txmod=hybrid Hybrid transaction model. Some blocks are overwritten, other ones are written to new location on disk. HDD users, who don't perform a lot of random overwrites yes

Mount your reiser4 partition. Use the mount option "-o discard" for SSD drives. More details are here.

Report bugs if something is going wrong.

ReiserFS

Since reiserfs is in mainline, just enable the following options in your kernel .config:

 CONFIG_REISERFS_FS
 CONFIG_REISERFS_FS_XATTR  (optional)
 CONFIG_REISERFS_FS_POSIX_ACL (optional)
 CONFIG_REISERFS_FS_SECURITY (optional)

Todays distributions should have this options enabled already, no need to build your kernel. However, not every Linux distribution supports reiserfs. But if you disregard your distribution's recommended settings, you'll probably know what you're doing anyway.

To create/check/debug/resize ReiserFS filesystems, you'll need the reiserfsprogs.

Booting off a ReiserFS/Reiser4 partition

Booting off a ReiserFS/Reiser4 partition: what we mean here is that the kernel (usually a file in /boot) is actually located on a ReiserFS/Reiser4 partition. If you have a separate partition for /boot (e.g. a (readonly-mounted) ext2 partition at the beginning of your disk) and your root-filesystem is on a ReiserFS/Reiser4 partition, you only need to make sure that ReiserFS/Reiser4 support is enabled in your kernel - but that's true for every filesystem and has nothing to to with the bootloader.

As far as the writer is informed, booting off a ReiserFS partition is fully supported by LiLo or GRUB.

For Reiser4, LiLo is known to work out of the box. To install GRUB on a Reiser4 partition, a few more steps are needed.

Links

Personal tools