The software described in this documentation is either in Extended Support or Sustaining Support. See https://www.oracle.com/us/support/library/enterprise-linux-support-policies-069172.pdf for more information.
Oracle recommends that you upgrade the software described by this documentation as soon as possible.
Before performing a root file system conversion, make a full system backup from which you can restore its state.
To convert a root ext2 file system to ext3:
Use the following command with the block device corresponding to the root file system:
#
tune2fs -jdeviceThe command adds an ext3 journal to the file system as the file
/.journal.Run the mount command to determine the device that is currently mounted as the root file system.
In the following example, the root file system corresponds to the disk partition
/dev/sda2:#
mount/dev/sda2 on / type ext2 (rw)Shut down the system.
Boot the system from an Oracle Linux boot CD, DVD or ISO. You can download the ISO from https://edelivery.oracle.com/linux.
From the installation menu, select Rescue Installed System. When prompted, choose a language and keyboard, select Local CD/DVD as the installation media, select No to bypass starting the network interface, and select Skip to bypass selecting a rescue environment.
Select Start shell to obtain a
bashshell prompt (bash-4.1#) at the bottom of the screen.If the existing root file system is configured as an LVM volume, use the following command to start the volume group (for example,
vg_host01):bash-4.1#
lvchange -ay vg_host01Use fsck.ext3 to check the file system.
bash-4.1#
fsck.ext3 -fdevicewhere
deviceis the root file system device (for example,/dev/sda2).The command moves the
.journalfile to the journal inode.Create a mount point (
/mnt1) and mount the converted root file system on it.bash-4.1#
mkdir /mnt1bash-4.1#mount -t ext3device/mnt1Use the
vicommand to edit/mnt1/etc/fstab, and change the file system type of the root file system toext3, for example:/dev/sda2 / ext3 defaults 1 1
Create the file
.autorelabelin the root of the mounted file system.bash-4.1#
touch /mnt1/.autorelabelThe presence of the
.autorelabelfile in/instructs SELinux to recreate the security attributes of all files on the file system.NoteIf you do not create the
.autorelabelfile, you might not be able to boot the system successfully. If you forget to create the file and the reboot fails, either disable SELinux temporarily by specifyingselinux=0to the kernel boot parameters, or run SELinux in permissive mode by specifyingenforcing=0.Unmount the converted root file system.
bash-4.1#
umount /mnt1Remove the boot CD, DVD, or ISO, and reboot the system.
For more information, see the tune2fs(8) manual
page.

