亚洲无码视频在线播放 linux 利用另一块硬盘扩展指定目录的大小:
1.加入一块新硬盘
2.建立分区:
2.1 查看硬盘信息 fdisk -l
2.2 开始分区 fdisk /dev/sdb
command action (m for help) : n
--(建立分区:
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) //扩展功能
)
e extended
p primary partition
# p
partition number (1-4):2 #创建第二个主分区
first cylinder (11-522,default 11):11
last cylinder ...(11-522,default 522): +100M #自定义分区大小
2.2 格式化
#mkfs -t ext3 -c /dev/sdb1
.....
100%后
2.3 挂载到/www
mount /dev/sdb1 /www
注意:mount 后原来/www目录下的,但是后挂载的会把前面的覆盖(前一分区的数据还在,只是从目录上就只能看见后一分区的数据)
两个分区“叠加”到同一个目录的话要用aufs来挂载。
本文出自:亿恩科技【www.sdyiwande.com】
服务器租用/服务器托管中国五强!虚拟主机域名注册顶级提供商!15年品质保障!--亿恩科技[sdyiwande.com]
|