This will delete the page "Ubunt系统挂接数据盘". Please be certain.
准备数据数据盘
不详细介绍
启动Ubuntu,root用户登录。 在终端输入:
fdisk -l ,可以看到Disk /dev/sda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000af383
Device Boot Start End Blocks Id System
/dev/sda1 * 1 1244 9992398+ 83 Linux
Disk /dev/vdb: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
这里可以看到/dev/vdb 就是新添加的硬盘,需要给新的硬盘分区。
在终端输入:fdisk /dev/vdb
之后键入:m,可以看到帮助信息,
键入:n,添加新分区
键入:p,选择添加主分区
键入:l,选择主分区编号为1,这样创建后的主分区为sdb1
之后,fdisk会让你选择该分区的开始值和结束值,直接回车
最后键入:w,保存所有并退出,完成新硬盘的分区。
格式化磁盘 在终端输入:mkfs -t ext3 /dev/vdb1 用ext3格式对/dev/vdb1 进行格式化
挂载该分区到 /home: echo /dev/vdb1 /home ext3 defaults 0 0 >> /etc/fstab cat /etc/fstab 命令查看
挂载新分区 使用“mount -a”命令挂载新分区,然后用“df -h”命令查看,出现以下信息就说明挂载成功,可以开始使用新的分区了。
This will delete the page "Ubunt系统挂接数据盘". Please be certain.