Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the Linux XFS file system

2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Today, I would like to talk to you about the use of the Linux XFS file system, many people may not know much about it. In order to make you understand better, the editor has summarized the following content for you. I hope you can get something according to this article.

Linux XFS file system enables us to experience the data completeness, transfer characteristics, scalability and transmission bandwidth of XFS file system on the Linux system machine, but we must complete the migration of Linux file system before we can use Linux XFS file system.

Migration of file system

Another step to get other partitions in the system to use the XFS file system is to migrate the file system. It is recommended that when migrating a file system, the data and files on the disk should be backed up first to avoid irrevocable losses. During the file system conversion, the entire system can be fully backed up. There are many methods for this step, and this paper only describes the author's migration method. You can do it in the way you are used to.

If you want a pure xfs system (all file systems in the system use the XFS file system), you also have to format the root file system as the xfs file system. This is actually a rather complicated step. Because the root file system cannot be umount, you must first create a partition whose file system is the ext2 file system, then copy all the files and directories on the current root partition to this partition, and then change the / etc/fstab file to replace the original root partition.

The methods are 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 above operation is to package and copy all the files on the root partition to the newly created partition. Of course, you can also use the following command to copy the file directly.

# cp-dpR / / mnt/temp

Next, change the root partition of the next boot to the / dev/hda4 partition, change the / etc/fstab file and / etc/lilo.conf, and then run lilo.

After reboot, the new root partition is already / dev/hda4.

Next, create a partition of the xfs file system:

$mkfs-t xfs / dev/hda2

Load this partition and copy the contents of the root partition to this partition in a different way

$mount-t xfs / dev/hda2 / mnt/temp

Under the root partition, run

$cd /

$tar lcvf -. | (cd / mnt/temp; tar xpvf -)

Change / etc/fstab, / etc/lilo.conf again to replace the original xfs primary partition with the new ext2 partition. As follows:

/ dev/hda2 / xfs defaults 1 1

Use the newly created xfs partition as the root partition and save the above settings. Check the contents of the configuration file again, make sure it is correct, and then restart the system. If your settings are all correct, then after the system boots successfully, you will have a pure Linux XFS file system.

After reading the above, do you have any further understanding of how to use the Linux XFS file system? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report