The Linux XFS file system allows us to experience the data completeness, transmission characteristics, scalability, and transmission bandwidth Features of The XFS File System on Linux machines, however, you must migrate the Linux File System to use the Linux XFS file system.
File System migration
To make other partitions in the system use the XFS file system, another step is to migrate the file system. We recommend that you back up the data and files on the disk before migrating the file system to avoid loss that cannot be rolled back, it is best to back up the entire system completely. There are many methods in this step. This article only describes the author's migration method. You can do this in the way you are used.
If you want a pure xfs system (all file systems in the system use XFS file systems), you must format the root file system as an xfs file system. This is actually a complex step. Because the root file system cannot be umount, you must first create a partition, the file system is the ext2 file system, and then all the files and directories on the current root partition, copy the original data to this partition, change the/etc/fstab file, and replace the original root partition.
The method is as follows:
$ Mkfs-t ext2/dev/hda4
$ Mkdir/mnt/temp
$ Mount-t ext2/dev/hda4/mnt/temp
$ Cd/
$ Tar lcvf-. | (cd/mnt/temp; tar xpvf -)
The preceding operations are to package all the files in the root partition and copy them to the newly created partition. Of course, you can also use the following command to copy files.
# Cp-dpR // mnt/temp
Next, change the root partition to the/dev/hda4 partition, change the/etc/fstab file and/etc/lilo. conf, and then run lilo.
After restart, the new root partition is/dev/hda4.
Next, create an xfs file system partition:
$ Mkfs-t xfs/dev/hda2
Load this partition. Copy the content of the root partition to this partition in two ways.
$ Mount-t xfs/dev/hda2/mnt/temp
In the root partition, run
$ Cd/
$ Tar lcvf-. | (cd/mnt/temp; tar xpvf -)
Change/etc/fstab and/etc/lilo. conf again, and replace the original ext2 primary partition with the newly created xfs partition. As follows:
/Dev/hda2/xfs defaults 1 1
Use the newly created xfs partition as the root partition and save the preceding settings. Check the configuration file again, and then restart the system. If all your settings are correct, you will have a Linux XFS file system after the system is successfully started.
- Introduction to Linux XFS file system I)
- A Brief Introduction to manual release of Linux memory
- Detailed analysis of Linux folder execution Permissions
- Decrypts an important Linux system directory 1)
- A Brief Introduction to how to obtain the file path of a Linux Process