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 extend XFS File system under Linux

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article is about how to extend the XFS file system under Linux. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

XFS is a high-performance file system. Because of its high performance, XFS has become the first choice for many enterprise systems, especially those with large amounts of data that require structured scalability and stability.

Extended XFS

To extend an existing XFS file system, you can use the command line tool xfs_growfs, which is available by default on most Linux distributions. Because XFS supports online resizing, the destination file system can be mounted or unmounted.

The basic usage of xfs_growfs is shown below:

As a target XFS file system extension, you can specify mount points, disk partitions, or logical volumes (when using LVM), and use the number of blocks to specify the size of the new XFS file system. You can use the xfs_info command line tool to check the block size and number:

To extend the XFS file to 1986208:

$sudo xfs_growfs / dev/centos/root-D 1986208

If you do not use the "- D" option to specify the size, xfs_growfs will automatically extend the XFS file system to the maximum available size.

$sudo xfs_growfs / dev/centos/root

Note that when you extend an existing XFS file system, you must be prepared to add space for XFS file system extension in advance. While this is obvious, there is nothing xfsgrowfs can do if there is no free space on the partition or disk volume on which it is located. At the same time, if you try to extend the size of the XFS file system to more than the size of the disk partition or volume, xfsgrowfs will fail.

Thank you for reading! This is the end of this article on "how to expand the XFS file system under Linux". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!

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

Development

Wechat

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

12
Report