File systems break files down into two logical categories: Shareable vs. unsharable files Variable vs. static files Shareable files are those that can be accessed locally and by remote hosts; unsharable files are only available locally. Variable files, such as documents, can be changed at any time; static files, such as binaries, do not change without an action from the system administrator.
Filesystem Hierarchy Standard (FHS) Red Hat nter!rise "inu# uses the Filesystem Hierarchy Standard $FHS% file system structure, which defines the names, locations, and !ermissions for many file ty!es and directories. The /boot/ Directory - contains static files re&uired to boot the system, such as the "inu# kernel. 'hese files are essential for the system to boot !ro!erly. The /dev/ Directory - contains device nodes that either re!resent devices that are attached to the system or virtual devices that are !rovided by the kernel. 'hese device nodes are essential for the system to function !ro!erly. 'he udev demon takes care of creating and removing all these device nodes in (dev(.
Filesystem Hierarchy Standard (FHS) #am!les of common files in the (dev include: (dev(hda ) the master device on !rimary *+ channel. (dev(hdb ) the slave device on !rimary *+ channel. (dev(tty, ) first virtual console. (dev(tty- ) second virtual console. (dev(sda ) first device on !rimary S.S* or S/'/ channel. (dev(l!, ) first !arallel !ort. The /etc/ Directory - reserved for configuration files that are local to the machine. 0o binaries are to be !laced in (etc(. /ny binaries that were once located in (etc( should be !laced into (sbin( or (bin(.
Filesystem Hierarchy Standard (FHS) The /lib/ Directory - contain only those libraries needed to e#ecute the binaries in (bin( and (sbin(. 'hese shared library images are !articularly im!ortant for booting the system and e#ecuting commands within the root file system. The /media/ Directory - contains subdirectories used as mount !oints for removeable media such as usb storage media, +V+s, .+)R12s, and 3i! disks. The /mnt/ Directory - reserved for tem!orarily mounted file systems, such as 0FS file system mounts.
Filesystem Hierarchy Standard (FHS) The /ot/ Directory - !rovides storage for most a!!lication software !ackages. The /roc/ Directory - contains s!ecial files that either e#tract information from or send information to the kernel. #am!les include system memory, c!u information, hardware configuration etc. The /sbin/ Directory - stores e#ecutables used by the root user. 'he e#ecutables in (sbin( are used at boot time, for system administration and to !erform system recovery o!erations.
'he e#t4 file system is essentially an enhanced version of the e#t5 file system. /dvantages are: !vailability /fter an !ower failure or system crash $also called an unclean system shutdown%, each mounted e#t5 file system on the machine must be checked for consistency by the e"fsc# !rogram. 'his is a time)consuming !rocess that can delay system boot time significantly, es!ecially with large volumes. 'he 6ournaling !rovided by the e#t4 file system means that this sort of file system check is no longer necessary after an unclean system shutdown. 'he only time a consistency check occurs using e#t4 is in certain rare hardware failure cases, such as hard drive failures. Data $nte%rity 'he e#t4 file system !revents loss of data integrity in the event that an unclean system shutdown occurs. 'he e#t4 file system allows you to choose the ty!e and level of !rotection that your data receives. Seed +es!ite writing some data more than once, e#t4 has a higher through!ut in most cases than e#t5 because e#t47s 6ournaling o!timi8es hard drive head motion. &asy Transition *t is easy to migrate from e#t5 to e#t4 and gain the benefits of a robust 6ournaling file system without reformatting. Feature of e't( file system
'o create a new e#t4 file system. m#fs)e't( /dev/sda* Creatin% an e't( file system
'he tune"fs allows you to convert an e#t5 filesystem to e#t4. /lways use the e"fsc# utility to check your filesystem before and after using tune5fs. / default installation of Red Hat nter!rise "inu# uses e#t4 for all file systems. 'o convert an e#t5 filesystem to e#t4, log in as root and ty!e the following command in a terminal: /sbin/tune"fs -+ <block_device> Convertin% to e't( file system
For revertin% a artition from e't( to e't" for any reason, you must first unmount the artition by lo%%in% in as root and tyin%, umount /dev/sdaN *e't, chan%e the file system tye to e't", /sbin/tune"fs -- .has/+ournal /dev/sdaN Chec# the artition for errors, /sbin/e"fsc# -y /dev/sdaN Then mount the artition a%ain as e't", mount -t e't" /dev/sdaN /mount/oint 0emove the )+ournal file at the root level of the artition, rm -f )+ournal ------------- you have no1 e't" artition $f you 1ant to ermanently chan%e the artition to e't", udate the /etc/fstab file) 0evertin% bac# to e't" file system