In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
In this article, the editor introduces in detail "how to mount a new data disk in CentOS". The content is detailed, the steps are clear, and the details are handled properly. I hope this article "how to mount a new data disk in CentOS" can help you solve your doubts.
Fdisk-l view disk list
[[email protected] /] # fdisk-l disk / dev/vda:42.9 gb, 42949672960 bytes 83886080 sector units = sector of 1 * 512 = 512 bytes sector size (logical / physical): 512byte / 512byte iUnix size (min / best): 512byte / 512byte disk label type: dos disk identifier: 0x635e6c7d device boot start end blocks id system/dev/vda1 2048 83886079 41942016 83 linux disk / dev/vdb:107.4 gb, 107374182400 bytes 209715200 sector units = sector of 1 * 512 = 512 bytes sector size (logical / physical): 512 bytes / 512 bytes iUnix size (minimum / optimal): 512 bytes / 512 bytes
Found that the / dev/vdb device is not yet in use
Partition fdisk / dev/vdb
Enter n p 1 in turn, then enter enter twice, and then enter wq to wait for completion. [[email protected] /] # fdisk / dev/vdb Welcome to fdisk (util-linux 2.23.2). The changes remain in memory until you decide to write them to disk. Think twice before using the write command. Device does not contain a recognized partition table uses the disk identifier 0xe9d7e5a8 to create a new dos disk label. Command (enter m for help): npartition type: P primary (0 primary, 0 extended, 4 free) e extendedselect (default p): P partition number (1-4, default 1): 1 starting sector (2048-209715199, default is 2048): the default value 2048last sector will be used, + sector or + size {kjingmlingg} (2048-209715199, default is 209715199): partition 1 will be set to linux type 209715199 Set the size to 100 gib command (enter m for help): wqthe partition table has been altered calling ioctl () to re-read partition table. Synchronizing disks.
Fdisk-l re-view the disk list
[[email protected] /] # fdisk-l disk / dev/vda:42.9 gb, 42949672960 bytes 83886080 sector units = sector of 1 * 512 = 512 bytes sector size (logical / physical): 512byte / 512byte iUnix size (min / best): 512byte / 512byte disk label type: dos disk identifier: 0x635e6c7d device boot start end blocks id system/dev/vda1 2048 83886079 41942016 83 linux disk / dev/vdb:107.4 gb, 107374182400 bytes 209715200 sector units = sector of 1 * 512 = 512 bytes sector size (logical / physical): 512byte / 512byte iUnix size (minimum / optimal): 512byte / 512byte disk label type: dos disk identifier: 0xe9d7e5a8 device boot start end blocks id system/dev/vdb1 2048 209715199 104856576 83 linux
Format partition mkfs.ext4 / dev/vdb1
[[email protected] /] # mkfs.ext4 / dev/vdb1mke2fs 1.42.9 (28-dec-2013) File system tag = os type: linux Block size = 4096 (log=2) Block size = 4096 (log=2) stride=0 blocks, stripe width=0 blocks6553600 inodes, 26214144 blocks1310707 blocks (5.00%) reserved for the super user first data block = 0maximum filesystem blocks=2174746624800 block groups32768 blocks per group, 32768 fragments per group8192 inodes per groupsuperblock backups stored on blocks: 3276898304,163840,229376,294912,819200,884736,1605632,2654208,4096000, 7962624,1123942420480000 23887872allocating group tables: finish writing inode table: complete creating journal (32768 blocks): complete writing superblocks and filesystem accounting information: complete
This data disk is formatted into ext4 file format.
Mount the device to the specified directory
Mount / dev/vdb1 / home
Take mounting to the / home directory as an example.
Save to file system table / etc/fstab
When the system restarts, the system automatically reads information from this file and automatically mounts the file system specified in this file to the specified directory.
Echo / dev/vdb1 / home ext4 defaults 00 > > / etc/fstab here, the article "how to mount a new data disk on CentOS" has been introduced. If you want to master the knowledge of this article, you still need to practice and use it. If you want to know more about related articles, you are 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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.