JFS

From Gentoo Wiki
Jump to:navigation Jump to:search
This page is a translated version of the page JFS and the translation is 21% complete.
Outdated translations are marked like this.
Resources

JFS (Journaled File System) è un filesystem journaling a 64 bit creato da IBM. Un'implementazione per il kernel Linux è disponibile come software gratuito secondo i termini della GNU General Public License. È a basso consumo di risorse e relativamente veloce nell'eseguire tutti i tipi di operazioni sul filesystem (invece di essere specializzato in alcuni, ad esempio XFS è veloce con file di grandi dimensioni, ma più lento con quelli piccoli). In quanto tale, JFS è particolarmente adatto per l'utilizzo con dispositivi alimentati a batteria come i laptop.

Installazione

Kernel

JFS è supportato nel kernel Linux standard:

KERNEL Enabling JFS support
File systems  --->
   <*> JFS filesystem support

Funzionalità JFS opzionali:

KERNEL Adding optional JFS features
File systems  --->
   <*> JFS filesystem support
   [*]   JFS POSIX Access Control Lists
   [*]   JFS Security Labels
   [ ]   JFS debugging
   [*]   JFS statistics

Emerge

Le utilità del filesystem sono disponibili nel pacchetto sys-fs/jfsutils:

root #emerge --ask sys-fs/jfsutils

Usage

Creation

root #mkfs.jfs /dev/sda1

Mount

root #mount -t jfs /dev/sda1 /path/to/mountpoint

Extracting a Fsck Log

jfs_fscklog can extract the fsck log from a JFS device.

root #jfs_fscklog -d /dev/sda1 -f fsck.log

Tuning

jfs_tune can change different parameters, to change the UUID:

root #jfs_tune -l -U random /dev/sda1

Utilities

Utility Description[1] Man page
fsck.jfs A hard link to jfs_fsck.
jfs_fsck Checks a JFS filesystem for corruption. jfs_fsck(8)
mkfs.jfs A hard link to jfs_mkfs.
jfs_mkfs Creates a new JFS filesystem. jfs_fsck(8)
jfs_debugfs A utility to perform low-level actions on a JFS filesystem. jfs_debugfs(8)
jfs_fscklog Extracts the fsck log from a JFS filesystem. jfs_fscklog(8)
jfs_logdump Dumps the journal of a filesystem into ./jfslog.dmp. jfs_logdump(8)
jfs_tune Adjusts tunable parameters of a filesystem. jfs_tune(8)

Troubleshooting

Fsck

Importante
Unmount the filesystem to prevent file damage.

To check a JFS filesystem for corruption, run fsck.jfs:

root #fsck.jfs /dev/sda1

Debugfs

jfs_debugfs can be used to perform low-level actions on a JFS filesystem.

In this example, a JFS filesystem with the layout:

Tree

test/
├── a
├── b
├── c

First, the inode needs to be known for the root of the directory.

Importante
The 2 is the inode number
user $ls -id
2 .

Next, enter the debugfs interface with jfs_debugfs:

root #jfs_debugfs /dev/sda1

Now list the directory using the inode number:

>dir 2
idotdot = 2
 
4096	test

4096 is the inode of the test directory, now list the contents of that directory:

>dir 4096
idotdot = 2
 
4097	a
4098	b
4099	c

To see everything that the debugfs interface do, read the man-page jfs_debugfs(8).

Vedere anche

  • XFS — un filesystem journaling ad alte prestazioni
  • Ext4 — un open source filesystem e la versione più recente della serie estesa di filesystem.

References