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 realize data disk mounting in CentOS7

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

Share

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

Editor to share with you how to achieve data disk mount in CentOS7, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

Linux system partitioning, formatting, mounting, and file system creation: https://www.qcloud.com/document/product/362/6735

View hard disk list information: df-h fdisk-l

View hard disk device information: file-s / dev/vdb

View file system type: df-T

Partition, format, mount data disk.

Fdisk-l / / look at the hard drive information and you can see that the hard drive is not mounted. For example: Disk / dev/vdb: 53.7 GBfdisk / dev/vdb / / Partition n / / New Partition p / / New Primary Partition 1 / / use the first Primary Partition / / use default configuration / / use default configuration wq / / Save and exit fdisk-l / / check the hard disk information again You can see that the area has been divided. For example, / dev/vdb1 2048ls-l / dev/disk/by-path/ View the mapping mkfs.xfs / dev/vdb1 / / is formatted as xfs (the default file system of centos7), or you can format ext4mount / dev/vdb1 / data / / mount the data disk to the / data directory

Automatically mount the data disk and mount it through elastic cloud disk soft link (bypath).

Cp / etc/fstab / etc/fstab.bak / / backup configuration file vim / etc/fstab / / modify the configuration file

Add the following configurations:

/ dev/disk/by-path/virtio-pci-0000:00:05.0-part1 / data xfs defaults nofail 0 2

Restart the system using reboot, and then execute df-h to see if the data disk is mounted automatically.

These are all the contents of the article "how to mount a data disk in CentOS7". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

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