In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you the "Linux virtual machine root partition disk expansion example analysis", the content is easy to understand, well-organized, hope to help you solve your doubts, the following let the editor lead you to study and learn "Linux virtual machine root partition disk expansion example analysis" this article.
Cause: want to make the Linux virtual machine in VM11 full screen display, want to support seamless copy and paste between the virtual machine and the physical machine. The installation of vmware tools causes insufficient space, as shown below
Find a solution after searching on the Internet:
Yum remove gnome-power-manageryum install gnome-power-manager
Appears after execution:
The hint is that there is insufficient space
To view:
Sure enough, 100% space utilization
The question turns to:
1. Why is it used so fast?
two。 How to expand?
Question 1:
This is the root directory, where everything is installed. (this is too brief and has not been studied in depth.)
Main topic:
As a result, it took about 2 hours to solve the problem, and the record is as follows:
1. Disk expansion
Fill in the size of the disk you need, the value you fill in-the size of the current hard drive = what you have increased
two。 View
Command: fdisk-l (root user)
[ding@master] $sudo fdisk-lDisk / dev/sda: 21.5GB, 21474836480 bytes255 heads, 63 sectors/track 2610 cylindersUnits = cylinders of 16065 * 8225280 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x000c82f5 Device Boot Start End Blocks Id System/dev/sda1 * 1 64 512000 83 LinuxPartition 1 does not end on cylinder boundary./dev/sda2 64 1045 7875584 8e Linux LVMDisk / dev/mapper/vg_master-lv_root: 7205 MB, 7205814272 bytes255 heads, 63 sectors/track 876 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x00000000Disk / dev/mapper/vg_master-lv_swap: 855 MB, 855638016 bytes255 heads, 63 sectors/track, cylindersUnits = cylinders of 16065 * 512 = 8225 280 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x00000000
It is found that it has become 21.5 GB.
3. Operation partition table
Command:
Fdisk / dev/sda
Type p to view the number of partitions and get:
Judging from this, we should add the partition number to 3 (dev/sda1,dev/sda2... It should be dev/sda3 next)
Type n, add a partition, and get:
Type p, primary partition, and type 3 (number):
Default start and end sectors (type Enter twice)
Type t to change the partition type to 8e:
Type w, write the partition table, and then restart:
4. Formatting
Mkfs.etx4 / dev/sda3
.ext4 is your own file system type. If you don't know, you can query:
Parted / dev/sda (parted) print list1parted
5. Volume expansion, add to LVM group:
Lvm > pvcreate / dev/sda3 initialize the partition just now
Lvm > vgextend vg_master / dev/sda3 adds the initialized partition to the virtual volume group vg_master
Lvm > lvextend-L + 12G / dev/vg_master/lv_root extend the capacity of existing volumes
Lvm > pvdisplay View Volume capacity
Lvm > quit
6. File system expansion
Resize2fs / dev/vg_master/lv_root
The above is all the contents of the article "example Analysis of disk expansion of Virtual Machine Root Partition disk in Linux". 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.
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.