WMware下linux增加一个虚拟的硬盘

1. 在虚拟机下再添加一块硬盘,在vm菜单setting里面添加硬盘
添加一块SCSI的8G的虚拟硬盘,在linux下是shb,b表示第2个的意思

然后我们进入终端模式
输入fdisk  /dev/sdb
出现Unable to open /dev/sdb
要确保VM setting-->hardware中出现:hard disk 2

 fdisk /dev/sdb
若正确会提示
The number of cylinders for this disk is set to 1044.
Command (m for help):
输入m回车

Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete 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 partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)

输入n创建分区
Command (m for help): n
Command action
e extended
p primary partition (1-4)
e是创建扩展分区
p是创建主分区

输入p
Partition number (1-4): 1 回车
First cylinder (1-1044, default 1): 1/起始柱头
Last cylinder or +size or +sizeM or +sizeK (1-1044, default 1044): 1044//终点
柱头
Command (m for help): w
输入w保存退出

2. 格式化


mkfs -t ext3 /dev/sdb1 或者mkfs.ext3 /dev/sdb1格式化

O C1Ebx V z-U3. 挂载分区 育学网3{Y/f O%T WQ#Fn0J2eA 育学网 a[*qP6{[kU/

编辑/etc/fstab文件,加入下面的内容育学网w2n]VxwE6ps

育学网Jl pRCL.P&l/f 5kh(Z+WkP

[yr'Il&lduY#G;a/dev/sdb1 /usr/newspace  ext3 defaults 1 1

&GZx2nWAa2zH 育学网+V~/@$s:Z3X+?H+{"M-e
mkdir /usr/newspace
mount /dev/sdb1 /usr/newspace
df
(df命令是查看)
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值