linux虚拟服务器新增磁盘怎么挂载,如何在vmware虚拟机Linux中增加硬盘的方法(教程)...
前期准备:创建虚拟硬盘
1、关闭VM中正在运行的虚拟系统;
2、在虚拟系统名称上点右键-》Virtual Machine Settings;
3、在Hardware页点“Add”-》Add a hard disk-》Create a new virtual disk-》SCSI(recommended)-》分配空间大小-》OK;
4、可以看见Hardware中出现了一块新的硬盘Hard Disk 2。
实施阶段:对虚拟硬盘进行分区和格式化
1、查看目前系统上有几块硬盘
[iyunv@cncmail data1]# fdisk -l
第一块硬盘信息
Disk /dev/sda: 36.4 GB, 36401479680 bytes
255 heads, 63 sectors/track, 4425 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 255 2048256 83 Linux
/dev/sda2 256 1530 10241437+ 83 Linux
/dev/sda3 4296 4425 1044225 82 Linux swap
/dev/sda4 1531 4295 22209862+ f Win95 Extd (LBA)
/dev/sda5 1531 2805 10241406 83 Linux
/dev/sda6 2806 4295 11968393+ 83 Linux
Partition table entries are not in disk order
第二块硬盘信息
Disk /dev/sdb: 36.7 GB, 36703918080 bytes ## 这里发现/dev/sdb,容量36.7G,切未被分区
255 heads, 63 sectors/track, 4462 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdc doesnt contain a valid partition table
第二块硬盘没有分区表
[iyunv@linux root]# fdisk /dev/sdb
对第二块硬盘进行分区
The number of cylinders for this disk is set to 4462.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partitions system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
Command (m for help): p
## 打印出目前该硬盘下的分区列表
Disk /dev/sdb: 36.7 GB, 36703918080 bytes
255 heads, 63 sectors/track, 4462 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
Command (m for help): n
## 增加一个分区
Command action
e extended
p primary partition (1-4)
## 因为通常选择主分区,所以这里打一个p
p
Partition number (1-4): 1 ## 这里因为是第一个分却,所以只选择1,如果是第二个分区,则选择2,依次类推
First cylinder (1-4462, default 1): ## 新分区起始的磁盘块数
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-4462, default 4462): 如果要分区10G,这里可以直接输入:+10240M,因为这里要全部使用硬盘空间,则用默认
Using default value 4462
Command (m for help): p
Disk /dev/sdb: 36.7 GB, 36703918080 bytes
255 heads, 63 sectors/track, 4462 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 4462 35840983+ 83 Linux
## 这里第一个分区已经分好了,接下去得把这个分区写入硬盘,用w
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
下面的工作就是对该硬盘进行格式,我这里是格式化成ext3
[iyunv@linux root]# mkfs.ext3 /dev/sdb1 (这里原来的命令是:mke2fs -j /dev/sdb1,试了一下不成 功,改了)
mke2fs 1.32 (09-Nov-2002)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
4480448 inodes, 8960245 blocks
448012 blocks (5.00%) reserved for the super user
First data block=0
274 block groups
32768 blocks per group, 32768 fragments per group
16352 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 23 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
检查一下,是否已经格式好
[iyunv@linux root]# fdisk -l
Disk /dev/sda: 36.4 GB, 36401479680 bytes
255 heads, 63 sectors/track, 4425 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 255 2048256 83 Linux
/dev/sda2 256 1530 10241437+ 83 Linux
/dev/sda3 4296 4425 1044225 82 Linux swap
/dev/sda4 1531 4295 22209862+ f Win95 Extd (LBA)
/dev/sda5 1531 2805 10241406 83 Linux
/dev/sda6 2806 4295 11968393+ 83 Linux
Partition table entries are not in disk order
Disk /dev/sdb: 36.7 GB, 36703918080 bytes
255 heads, 63 sectors/track, 4462 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 4462 35840983+ 83 Linux
挂载虚拟硬盘
分区分好,也格式化好了,下面就是挂载
我把/dev/sdb1挂载到/data1下
[iyunv@linux root]# mkdir /data1 ## 首先建立挂载的目录data1
[iyunv@linux root]# mount /dev/sdb1 /data1 ##将sdb1挂载到data1
重启系统之后,查看是否挂载成功:
[iyunv@linux data1]# df -h
文件系统 容量 已用 可用 已用% 挂载点
/dev/sda1 2.0G 454M 1.4G 25% /
/dev/sda6 12G 53M 11G 1% /bak
/dev/sdb1 34G 33M 32G 1% /data1
none 250M 0 250M 0% /dev/shm
/dev/sda2 9.7G 1.5G 7.7G 17% /usr
/dev/sda5 9.7G 8.6G 559M 95% /var
这里看到/dev/sda6 12G 53M 11G 1% /bak
说明已经挂载成功了。到根目录“/”下可以查看到这个挂载好的data1。
linux虚拟服务器新增磁盘怎么挂载,如何在vmware虚拟机Linux中增加硬盘的方法(教程)...相关推荐
- 服务器虚拟机挂载光驱,如何在VMware vSphere client中安装光驱的方法步骤(图文教程)...
VMware vSphere作为服务器虚拟化领域最具影响力的软件,帮助了众多企业解决服务器工作负载等问题,而VMware vSphere Client是VMware vSphere中最重要的套件之一, ...
- 威联通服务器显示磁盘为挂载,如何在 QNAP NAS 上使用虚拟磁盘?
Virtual Disk Drive(VDD)增加了储存扩充的弹性,且便于管理 通过虚拟磁盘,管理员能更弹性地扩充NAS的容量.您可通过内置的iSCSI initiator功能来连接网络上其他的iSC ...
- 虚拟服务器能插usb口吗,在VMware虚拟机中使用主机USB接口、虚拟机共享USB接口、设置虚拟机USB接口的方法...
在网络管理中,我们经常会用到虚拟机,有时候在虚拟机里面运行一些程序需要用到U盘.U盾等USB设备,那么如何将主机的USB接口共享给虚拟机呢,也就是在主机的USB接口插入USB设备之后,可以在虚拟机里面 ...
- 基于redhat linux虚拟服务器的web负载均衡集群(piranha+LVS)
基于redhat linux虚拟服务器的web负载均衡集群 硬件环境 分发机 LB1:192.168.0.129 LB2:192.168.0.130 真实节点主机 NODE1:192.168.0.13 ...
- linux虚拟实验服务,Linux虚拟服务器(LVS)实验文档PDF
这个Linux虚拟服务器(LVS)实验文档时我看过最好的实验文档,里面介绍了LVS/nat LVS/DR LVS/TUN以及综合实验,讲解了常用的算法和调度. 由于 ARP 的对应关系,是通过广播学到 ...
- LVS(Linux Virtual Server,Linux虚拟服务器)开源软件创始人——章文嵩
章文嵩是技术专家,也是LVS(Linux Virtual Server,Linux虚拟服务器)开源软件创始人,曾经是TelTel公司的首席科学家,ChinaCluster的共同创办人.他对自己的看法是 ...
- linux加权命令,ipvsadm命令 – linux 虚拟服务器管理
ipvsadm命令用于在Linux内核中设置,维护或检查虚拟服务器表. Linux虚拟服务器可用于基于两个或更多节点的集群构建可伸缩网络服务. 群集的主节点将服务请求重定向到将实际执行服务的服务器主机 ...
- Linux CentOS 8(磁盘的挂载与卸载)
Linux CentOS 8(磁盘的挂载与卸载) 目录 一.项目介绍 二.相关概念 三.任务操作 任务:挂载与卸载 一.项目介绍 本节介绍一下Linux(Centos 8)中磁盘的挂载与卸载. 二.相 ...
- LVS 集群架构介绍 (linux 虚拟服务器)
目录 一.集群介绍 1.集群的含义 2.为什么需要使用群集 3.集群类型 1.负载均衡群集(Load Balance Cluster)----简称:LB 2.高可用群集(High Availabili ...
最新文章
- java 039 s rule_Java开发架构篇:DDD模型领域层决策规则树服务设计
- 多个iframe加载遇到的问题
- python 换脸 github_人脸识别和换脸相关深度学习开源项目github汇总
- 隐马尔科夫模型及Viterbi算法的应用
- 如果要在mFC客户区添加控件怎么办
- 【blog】用emoji-java解决Emoji存储MySQL乱码问题
- untiy3d坐标系以及向量运算
- 2020 微信头像圣诞帽来啦,快给 TA 戴帽子吧~
- 立方车场系统显示电脑连不上服务器,立方停车场车辆出入智能管理系统.ppt
- 【音视频基础】(六):CIE颜色空间二之CIE-XYZ及Y的含义
- 华为折叠x2是鸿蒙系统吗,华为发布折叠旗舰Mate X2:各种黑科技设计,率先升级鸿蒙系统...
- 天大18年6月考试财务报表分析4
- java 匿名内部类存储泛型参数,即类型参数
- Notes of JNCIP_OSPF
- ERPNext关键业务流程
- 罗振宇折戟创业板/ B站回应HR称用户是Loser/ 腾讯罗技年内合推云游戏掌机...今日更多新鲜事在此...
- Java面试常见问题及答案
- nat123外网访问内网网站FTP数据库远程控制等等
- 172.16.82.0/25的含义,IP段,掩码
- 火灾检测-fire,fire
热门文章
- MyEclipse下安装MyBatis Generator代码反向生成工具
- easyUI 添加CheckBox选择到DataGrid
- 陕西省高级职称 计算机要求,陕西省卫生高级职称评审申报条件
- springcloud gateway 自定义 accesslog elk
- springboot : Failed to decode downloaded font 和 OTS parsing error
- vue js xlsx 读取 本地 excel
- typescript 动态给class添加方法
- C# 全角半角相互转换
- ubuntu ifconfig只有lo没有ens33的问题
- 谭浩强c语言规范化的指数形式,C语言程序设计谭浩强第四期末复习重点.docx