Linux的逻辑卷管理
上一篇 / 下一篇 2008-03-18 15:27:31 / 个人分类:操作系统
在Linux的逻辑卷管理,下面的步骤包括新建一个逻辑卷以及怎样增加逻辑卷的大小。ITPUB个人空间i6F9e#MS9S
1、新挂载一个硬盘设备
K:Q3}mUz0使用fdisk -l查看设备名称
D y {q"Z/gE([0在这里,我们使用的是 /dev/sdc
2、使用fdisk创建LVM分区
3z%Urt}WR0G0[root@localhost etc]# fdisk /dev/sdc
Command (m for help): nITPUB个人空间(~G
{$d Ms4t
[4{4o
Command action
OCVN!A4F*uE0l logical (5 or over)ITPUB个人空间3{_yL FpL4M4v/h
p primary partition (1-4)ITPUB个人空间`$f}3pK;o;e/Wh*G
p
iK)})y@z5Cg`0Partition number (1-4): 1ITPUB个人空间D)r.C7R j-s7{a5O7ix
Partition 1 is already defined. Delete it before re-adding it.
9U:yHX@5YC5M0
Command (m for help): dITPUB个人空间HgN-kGcO8C+Vj
Selected partition 1
Command (m for help): mITPUB个人空间._o4C*b1s5{`[C9Icx
Command action
_4fwj#K2\GB0a toggle a bootable flagITPUB个人空间 O!x9B
d2cn
b edit bsd disklabelITPUB个人空间*E[$m O!{pv
c toggle the dos compatibility flagITPUB个人空间v`+@){'`]
d delete a partition
c8z}z(uVlq0l list known partition types
O6l-Wg,@qS'z
n0m print this menu
dL IFX@E(|:`0n add a new partitionITPUB个人空间Y-Ol._.oS8A
o create a new empty DOS partition table
;Z V*m0sZm'^J4\8~0h Q+Q0p print the partition table
vr2o3EDp*l0q quit without saving changesITPUB个人空间dv#Rq
S"A_\k
s create a new empty Sun disklabel
;o2E7f-jF8D?0t change a partition's system id
Q9g`uogq5F3J0u change display/entry unitsITPUB个人空间^!ak5a~$J8Im
W
v verify the partition table
KSR.tgG6tx5?-S0w write table to disk and exit
#MS%P:H8r'HJ;f0x extra functionality (experts only)
Command (m for help): d /dev/sdc1 --因为这里原来就使用了sdc设备,所以需要先删除ITPUB个人空间9w{B{-{
No partition is defined yet!
Command (m for help): p
Disk /dev/sdc: 1073 MB, 1073741824 bytesITPUB个人空间eSdo;i fS5S
64 heads, 32 sectors/track, 1024 cylindersITPUB个人空间X'DJ%hp4V2T+F
Units = cylinders of 2048 * 512 = 1048576 bytes
Device Boot Start End Blocks Id System
Command (m for help): nITPUB个人空间X#WQr:z t0S.S
Command action
}[@L.?{.^W0e extendedITPUB个人空间/S#qj:MBZb
p primary partition (1-4) --在这里选择p,选择扩展将无法转换lvm格式ITPUB个人空间([5j'Z\8_8s
vR?
p