VMware Linux Guest 增加磁盘无需重启的方法
摘要
操作步骤
1 编辑Linux Guest配置,增加磁盘

2 扫描SCSI Bus,添加SCSI设备
[root@BendSha_RHEL5_5_x64 /]# fdisk -l
Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 38 305203+ 83 Linux
/dev/sda2 39 2353 18595237+ 83 Linux
/dev/sda3 2354 2610 2064352+ 82 Linux swap / Solaris
Disk /dev/sdb: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 1305 10482381 83 Linux
[root@BendSha_RHEL5_5_x64 /]# ls /sys/class/scsi_host
host0 host11 host14 host17 host2 host22 host25 host28 host30 host6 host9
host1 host12 host15 host18 host20 host23 host26 host29 host4 host7
host10 host13 host16 host19 host21 host24 host27 host3 host5 host8
[root@BendSha_RHEL5_5_x64 /]# echo "- - -" > /sys/class/scsi_host/host0/scan
[root@BendSha_RHEL5_5_x64 /]#
[root@BendSha_RHEL5_5_x64 /]# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: VMware, Model: VMware Virtual S Rev: 1.0
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 01 Lun: 00
Vendor: VMware, Model: VMware Virtual S Rev: 1.0
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 00 Lun: 00
Vendor: NECVMWar Model: VMware SATA CD00 Rev: 1.00
Type: CD-ROM ANSI SCSI revision: 05
Host: scsi0 Channel: 00 Id: 02 Lun: 00
Vendor: VMware, Model: VMware Virtual S Rev: 1.0
Type: Direct-Access ANSI SCSI revision: 02
[root@BendSha_RHEL5_5_x64 /]# fdisk -l
Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 38 305203+ 83 Linux
/dev/sda2 39 2353 18595237+ 83 Linux
/dev/sda3 2354 2610 2064352+ 82 Linux swap / Solaris
Disk /dev/sdb: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 1305 10482381 83 Linux
Disk /dev/sdc: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdc doesn't contain a valid partition table
3 格式化并创建挂载点
[root@BendSha_RHEL5_5_x64 /]# mkfs.ext4 /dev/sdc
mke4fs 1.41.12 (17-May-2010)
/dev/sdc is entire device, not just one partition!
Proceed anyway? (y,n) y
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
......
[root@BendSha_RHEL5_5_x64 /]# mkdir /data
[root@BendSha_RHEL5_5_x64 /]# mount /dev/sdc /data/
[root@BendSha_RHEL5_5_x64 /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 18G 11G 5.5G 67% /
/dev/sda1 289M 30M 245M 11% /boot
tmpfs 941M 0 941M 0% /dev/shm
/dev/sdb1 9.9G 220M 9.2G 3% /logvol
/dev/sdc 20G 172M 19G 1% /data
拓展
[root@BendSha_RHEL5_5_x64 /]# ls /sys/block/
fd0 ram0 ram10 ram12 ram14 ram2 ram4 ram6 ram8 sda sdc
md0 ram1 ram11 ram13 ram15 ram3 ram5 ram7 ram9 sdb sr0
[root@BendSha_RHEL5_5_x64 /]# echo 1 > /sys/block/sdc/device/delete
[root@BendSha_RHEL5_5_x64 /]# ls /sys/block/
fd0 ram0 ram10 ram12 ram14 ram2 ram4 ram6 ram8 sda sr0
md0 ram1 ram11 ram13 ram15 ram3 ram5 ram7 ram9 sdb
[root@BendSha_RHEL5_5_x64 /]# echo "scsi add-single-device 0 0 2 0">/proc/scsi/scsi
[root@BendSha_RHEL5_5_x64 /]# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: VMware, Model: VMware Virtual S Rev: 1.0
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 01 Lun: 00
Vendor: VMware, Model: VMware Virtual S Rev: 1.0
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 00 Lun: 00
Vendor: NECVMWar Model: VMware SATA CD00 Rev: 1.00
Type: CD-ROM ANSI SCSI revision: 05
Host: scsi0 Channel: 00 Id: 02 Lun: 00
Vendor: VMware, Model: VMware Virtual S Rev: 1.0
Type: Direct-Access ANSI SCSI revision: 02
[root@BendSha_RHEL5_5_x64 /]# fdisk -l
Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 38 305203+ 83 Linux
/dev/sda2 39 2353 18595237+ 83 Linux
/dev/sda3 2354 2610 2064352+ 82 Linux swap / Solaris
Disk /dev/sdb: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 1305 10482381 83 Linux
Disk /dev/sdd: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdd doesn't contain a valid partition table
VMware Linux Guest 增加磁盘无需重启的方法的更多相关文章
- VMware虚拟机Linux中增加磁盘空间的扩容操作
VMwareware虚拟机安装的Red Hat Enterprise Linux系统剩余空间不足,造成软件无法正常安装.如果重新装一遍系统就需要重新配置好开发环境和软件的安装配置.结合自己的实践,总结 ...
- linux下增加磁盘改变指定文件路径分区挂载点和迁移数据
Centos7 系统上原有目录/data 挂载根目录下,空间有点小,我们需要把/data目录挂载到另一个磁盘,同时把数据迁移. 1.查看分区情况 fdisk -l 2.查看路径对应分区情况 df -l ...
- VMware Workstation 12 增加磁盘容量 Windows Server 2012 系统
1.安装虚拟机后,检查C盘容量大小,发现C盘现在的空间是59.9GB,如下图: 2.使用window+R键,出现运行窗口,输入‘cmd’——>‘cd C:\Program Files (x86) ...
- VMware Workstation 12 增加磁盘容量 Windows Server 2012 系统 扩展
1.安装虚拟机后,检查C盘容量大小,发现C盘现在的空间是59.9GB,如下图: 2.使用window+R键,出现运行窗口,输入‘cmd’——>‘cd C:\Program Files (x86) ...
- linux下面增加磁盘空间
1.先看看情况 [root@localhost tmp]# fdisk -l Disk /dev/sda: 3221 MB, 3221225472 bytes 255 heads, 63 sector ...
- VMware Linux 共享文件夹 虚拟机无共享文件解决方法
恢复虚拟机ubuntu后,首先,点击 虚拟机——安装VMware Tools(Install VMware Tools),这时我们会在Ubuntu系统桌面上发现VMware Tools的光盘图标. 双 ...
- vmware虚拟机挂载Windows磁盘的两种方法
第一种 vmware虚拟机通过ntfs-3g挂接windows盘 1.共享windows盘虚拟机设置——>添加硬盘——>选择IDE——>使用物理磁盘——>选择本地盘(单分区)— ...
- [CentOS7] [VMWARE] 增加磁盘空间后扩大逻辑分区
Learn to rescan disk in Linux VM when its backed vdisk in vmware is extended. This method does not r ...
- 【转载】VMware下LINUX的虚拟机增加磁盘空间
转载自:http://space.itpub.net/24435147/viewspace-694200 VMware6.7安装目录下有一个命令行工具vmware-vdiskmanager.exe 程 ...
随机推荐
- ios10 no route to host
IdTCPClient1 ios10 no route to host IOS 9 正常 IOS10 出错,参考下面的设置解决问题 http://www.sh-huhe.com/solution/14 ...
- 时间服务器:NTP 服务器
15.1 关于时区与网络校时的通讯协议 使得每一部主机的时间同步化. DHCP 客户端/服务器端所需要的租约时间限制. 网络侦测时所需要注意的时间点.刚刚谈到的登录文件分析功能.具有相关性的主 ...
- Could not find the following Boost libraries: boost_python3
安装Boost.NumPy时报错: CMake Error at /usr/share/cmake/Modules/FindBoost.cmake:1794 (message): Unable to ...
- stapes文档翻译
1.引言 写一个Stapes 模型如下: 2.创建方法 这些方法用来帮助创建和扩展类或模块.这些术语在文档中可交换的. subclass Module.subclass([object]) st ...
- SQL select 语法(转)
SQL 里面最常用的命令是 SELECT 语句,用于检索数据.语法是: SELECT [ ALL | DISTINCT [ ON ( expression [, ...] ) ] ] * | expr ...
- DGV表头双行
try { if (e.RowIndex < 0) { RectangleF _rect = e.CellBounds; Pen _pen = new Pen(Color.Black); Pen ...
- js 赋值 要用 toString() ; 太坑了。
js 赋值 要用 toString() ; 太坑了. js 赋值 要用 toString() ; 太坑了. js 赋值 要用 toString() ; 太坑了.
- 小白如何进入IOS,答案就在这里
***对于进来看过我博客的博友们,请看一下最后面的几道题,觉得可以的可以自己私下做一下,有不懂的我们可以相互交流*** 现在我来说一下我们IOS需要的基础,现在用的比较多的就是swift语言. 首先, ...
- <一>Angular.js学习
angular.module(name, [a], [b]); // angular.module()创建.获取.注册angular中的模块 name:字符串类型,代表模块的名称: a:字符串的数组 ...
- linux随笔2
---恢复内容开始--- 2016,12,20 在linux里面不写这些扩展名,也是可以的,但是写这些扩展名是为了个管理员写的,好区分,但是linux本身不依靠扩展名来区分文件类型 ~~~~~~~~~ ...