|
Embedded Linux Primer: A Practical, Real-World ApproachWhenever the file system is subject to a change (such as a write operation) the changes are first written to the journal. The file system drivers make sure that this write is committed to the journal before the actual changes are posted and committed to the storage media (disk or Flash, for example). After the changes have been logged in the journal, the driver posts the changes to the actual file and metadata on the media. If a power failure occurs during the media write and a reboot occurs, all that is necessary to restore consistency to the file system is to replay the changes in the journal. One of the most significant design goals for the ext3 file system was that it be both backward and forward compatible with the ext2 file system. It is possible to convert an ext2 file system to ext3 file system and back again without reformatting or rewriting all the data on the disk. Let's see how this is done.[73]PListing 9-6 details the procedure. Listing 9-6. Converting ext2 File System to ext3 File System # mount /dev/sdb1 /mnt/flash <<< Mount the ext2 file system # tune2fs -j /dev/sdb1 <<< Create the journal tune2fs 1.37 (21-Mar-2005) Creating journal inode: done This filesystem will be automatically checked every 23 mounts or 180 days, whichever comes first ...» | Код для вставки книги в блог HTML
phpBB
текст
|
|