In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to manage RHEL7 disks. The content of the article is of high quality, so the editor will share it for you as a reference. I hope you will have some understanding of the relevant knowledge after reading this article.
With the gradual increase of things stored in the virtual machine, the hard disk of the virtual machine is also in urgent need, so there is an urgent need to expand a new virtual disk. Here is how to add a new virtual disk to VMware:
View existing disk
[root@chao ~] # lsblkNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTsda 8:0 0 20G 0 disk ├─ sda1 8:1 0 1G 0 part / boot └─ sda2 8:2 0 19G 0 part ├─ centos-root 253 sda2 0 017G 0 lvm / └─ centos-swap 253 ├─ 10 0 2G 0 lvm [SWAP] sr0 11:0 14.2 G 0 rom
Add disk
Select hard disk
Select Typ
New disk
Set Siz
Restart the server
[root@chao ~] # reboot
Create Partition
[root@chao ~] # lsblkNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTsda 8:0 0 20G 0 disk ├─ sda1 8:1 0 1G 0 part / boot └─ sda2 8:2 0 19G 0 part ├─ centos-root 253 sda2 0 017G 0 lvm / └─ centos-swap 253 Switzerland 1 0 2G 0 lvm [SWAP] sdb 8:16 0 20G 0 disk sr0 11:0 14.2G 0 rom [root@chao ~] # fdisk / dev/sdb 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 0x934745d5 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-41943039, default is 2048): the default value 2048Last sector will be used, + sector or + size {K Magg G} (2048-41943039, default is 41943039): will use the default value 41943039 partition 1 has been set to Linux type Set the size to 20 GiB command (enter m for help): P disk / dev/sdb:21.5 GB, 21474836480 bytes 41943040 sector Units = sector of 1 * 512 = 512 bytes sector size (logical / physical): 512byte / 512byte I size (min / best): 512byte / 512byte disk label type: dos disk identifier: 0x934745d5 device Boot Start End Blocks Id System/dev/sdb1 2048 41943039 20970496 83 Linux command (enter m for help): wThe partition Table has been altered calling ioctl () to re-read partition table. Synchronizing disks.
Formatting
[root@chao ~] # lsblkNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTsda 8:0 0 20G 0 disk ├─ sda1 8:1 0 1G 0 part / boot └─ sda2 8:2 0 19G 0 part ├─ centos-root 253 sda2 0 017G 0 lvm / └─ centos-swap 253 Switzerland 1 0 2G 0 lvm [SWAP] sdb 8:16 0 20G 0 disk └─ sdb1 8:17 020G 0 part sr0 11:0 1.4.2G 0 rom [root@chao ~] # mkfs.ext4 / dev/sdb1mke2fs 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 blocks1310720 inodes, 5242624 blocks262131 blocks (5.00%) reserved for the super user first data block = 0Maximum filesystem blocks=2153775104160 block groups32768 blocks per group, 32768 fragments per group8192 inodes per groupSuperblock backups stored on blocks: 32768,98304,163840,229376,294912,819200,884736,1605632,2654208 4096000Allocating group tables: finish writing inode table: complete Creating journal (32768 blocks): complete Writing superblocks and filesystem accounting information: complete
Mounting
[root@chao ~] # mount / dev/sdb1 test/ [root@chao ~] # df-h / root/test/ file system capacity used available mount point / dev/sdb1 20g 45m 19G 1% / root/test [root@chao ~] #
In this way, it can be used normally!
On how to carry out RHEL7 disk management to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it 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.
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.