On Linux systems, if you want to expand disk capacity, you can create new virtual disk space. After the new virtual disk is restarted, it will take effect. Of course, if you have any important tasks to perform and do not want to restart, there is a way. This article will introduce how Linux extends disks under VMware.
1: VMware Virtual Disk Expansion
As shown below, after VMware virtual disk expansion, you can't see any changes using fdisk -l
[root@localhost ~]# Fdisk -l
Disk /dev/sda: 171.7 GB, 171798691840 bytes
255 heads, 63 sectors/track, 20886 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 15665 125724690 8e Linux LVM
/dev/sda3 15666 15795 1044225 83 Linux
/dev/sda4 15796 20886 40893457+ 83 Linux
Disk /dev/dm-0: 126.6 GB, 126600871936 bytes
255 heads, 63 sectors/track, 15391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/dm-0 doesn‘t contain a valid partition table
Disk /dev/dm-1: 2113 MB, 2113929216 bytes
255 heads, 63 sectors/track, 257 cyli nders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev /dm-1 doesn & rsquo; t contain a valid partition table
Method 1: Echo 1 》 /sys/class/scsi_device/device/rescan
[root@localhost ~]# cd /sys/class/scsi_disk/
[root@localhost scsi_disk]# ls
0:0:0:0
[root@localhost scsi_disk]# cd 0\\:0\\:0\\:0/
[root@localhost 0:0: 0:0]# echo ‘1’ ” device/rescan
[root@localhost 0:0:0:0]# fdisk -l
Disk /dev/sda: 173.9 GB , 173946175488 bytes
255 heads, 63 sectors/track, 21147 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 15665 125724690 8e Linux LVM
/dev/sda3 15666 15795 1044225 83 Linux
/dev/sda4 15796 20886 40893457+ 83 Linux
Disk /dev/dm-0: 126.6 GB, 126600871936 bytes
255 heads, 63 sectors/track, 15391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/dm-0 doesn<quo;t contain a valid partition table
Disk /dev/dm-1: 2113 MB, 2113929216 bytes
255 heads, 63 sectors /track, 257 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev /dm-1 doesn & rsquo; t contain a valid partition table
Method 2: Rescan specific SCSI Device
echo 1 》 /sys/block/$DEVICE/device/rescan Replace $DEVICE
with sda, sdb, sdc, etc. [root@ Localhost ~]# echo 1 》 /sys/block/sda/device/rescan
2: VMware added virtual disk
First find your host bus number
[ Root@localhost ~]# grep mpt /sys/class/scsi_host/host? /proc_name
/sys/class/scsi_host/host0/proc_name:mptspi
Use the following command to scan the SCSI bus
[root@localhost ~]# echo “- - -” 》 /sys/class/scsi_host/host0/scan
The above is how Linux expands the disk under VMware. Use the above two steps to expand the disk, no need to restart the system, the virtual disk Can be immediately recognized by the system.
The files and pictures we usually create contain a lot of information, which is easy to be used, so
After installing Ubuntu system in the notebook, there are problems such as fast power consumption, w
Some Linux users find that their SSH server has experienced 1 errors during the transfer when using
AMD and nVidia are graphics card drivers, usually come with a computer when you buy it, in Ubuntu sy
How to install Mongo extensions on Linux systems
How to solve the problem of Linux system Swap exhaustion
How to install and configure DenyHosts tool
Application of mkdir command in Linux
The specific usage of the tee command in Linux system
Linux system to delete the specified time period file method
How CentOS uses FPM to make RPM packages
How to modify the image name in batches under Linux
Linux system how to re-mount var partition
How to create and use XFS system in Linux system
XP's most concerned issues and solutions (1)
Adjusting Windows 7 system restore space
What should I do if I open the group policy after Win10 10240 upgrades the 10565 system?
Win7 virtual memory setting method
How does Win10 use Bluetooth to transfer files? Win10 uses Bluetooth to transfer files
How does the Win10 system completely shut down the periodd.exe process?
Basic Strategies and Principles for Setting NTFS Permissions in Windows XP
Solution for ip address loss after Win7 computer restart