suse linux分区及逻辑卷划分
目 录
A 划分磁盘阵列和创建逻辑卷A-1
A.1 创建磁盘阵列分区A-2
A.2 创建逻辑卷组和逻辑卷A-5
A.3 绑定逻辑卷和裸设备A-9
B 硬件连线示意图B-1
B.1.1 ATAE交换板和磁盘阵列硬件连线B-1
C 术语C-3
D 缩略语D-1
划分磁盘阵列和创建逻辑卷
关于本章
本章描述内容如下表所示。
标题内容A.1 创建磁盘阵列分区介绍如何创建磁盘阵列分区。A.2 创建逻辑卷组和逻辑卷介绍如何创建逻辑卷组和逻辑卷。A.3 绑定逻辑卷和裸设备介绍如何绑定逻辑卷和裸设备。
创建磁盘阵列分区
任务说明
执行此任务可以手动格式化磁盘阵列并根据需要创建新的分区。
本节以在双机上创建分区/dev/sdc1为例,给出手动创建磁盘分区的方法。操作时请根据实际的安装规划调整分区的具体信息。
操作指引
创建磁盘阵列的磁盘分区操作步骤如下:
以root用户登录主节点。
检查磁盘阵列的分区信息。
# fdisk -l
屏幕显示信息如下(供参考)。
Disk /dev/sda: 40.0 GB, 40007756288 bytes
64 heads, 32 sectors/track, 38154 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 1024 1048560 82 Linux swap
/dev/sda2 1025 11264 83 Linux
/dev/sda3 11265 38154 83 Linux
Disk /dev/sdb: 128.8 GB, 128849018880 bytes
255 heads, 63 sectors/track, 15665 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdb doesn't contain a valid partition table
Disk /dev/sdc: 73.1 GB, 73139224576 bytes
255 heads, 63 sectors/track, 8892 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdc doesn't contain a valid partition table
从以上加粗的信息可以看出磁盘阵列里的逻辑盘sdb和sdc没有划分分区。
格式化磁盘。
# fdisk /dev/sdc
屏幕显示信息如下(供参考)。
The number of cylinders for this disk is set to 8892.
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)
查看fdisk命令的参数。
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