90 Chapter 5. The ext3 File System
Once you have assigned each partition a label, add the partitions to /etc/fstab. To do this, log in
as root and type:
pico -w /etc/fstab
Then add a line to /etc/fstab for each labeled partition similar to this:
LABEL=/mount/point /mount/point ext3 defaults 1 2
In the above entry in /etc/fstab, replace each occurrence of /mount/point with the mount
point you intend to use for the partition.
If you need more information on the various options available to you in /etc/fstab, type man
fstab.
If there are partitions whose label you are unsure of, type the following command:
/sbin/tune2fs -l /dev/hdbX |grep volume
In the above command, replace hdb with the drive letter and X with the partition number.
This will return something similar to the output below:
Filesystem volume name: /mount/point
In this output, /mount/point is the volume label.
After completing the above steps, you will have successfully added a new ext3 disk to the system. The
next section demonstrates how to convert an ext2 disk partition to an ext3 partition.
5.3. Converting to an ext3 File System
The tune2fs program can add a journal to an existing ext2 file system without altering the data
already on the partition. If the file system is already mounted while it is being transitioned, the journal
will be visible as the file .journal in the root directory of the file system. If the file system is not
mounted, the journal will be hidden and will not appear in the file system at all.
To convert an ext2 file system to ext3, log in as root and type:
/sbin/tune2fs -j /dev/hdbX
In the above command, replace hdb with the drive letter and X with the partition number.
After doing this, be certain to change the partition type from ext2 to ext3 in /etc/fstab.
If you are transitioning your root file system, you will have to use an initrd image (or RAM disk) to
boot. To create this, run the mkinitrd program. For information on using the mkinitrd command,
type man mkinitrd. Also make sure your LILO or GRUB configuration loads the initrd.
If you fail to make this change, the system will still boot, but the root file system will be mounted as
ext2 instead of ext3.
5.4. Reverting to an ext2 File System
Because ext3 is relatively new, some disk utilities do not yet support it. For example, you may need
to shrink a partition with resize2fs, which does not yet support ext3. In this situation, it may be
necessary to temporarily revert a file system to ext2.
To revert a partition, you must first unmount the partition by logging in as root and typing:
Commenti su questo manuale