Introduction to the use of Linux XFS File System (2)

Source: Internet
Author: User

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.

  1. Introduction to Linux XFS file system I)
  2. A Brief Introduction to manual release of Linux memory
  3. Detailed analysis of Linux folder execution Permissions
  4. Decrypts an important Linux system directory 1)
  5. A Brief Introduction to how to obtain the file path of a Linux Process

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.