|
|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
1 h# E, V% X n- Q" U. K首先分区:1 p1 }5 f% [# Y: Q
# fdisk /dev/sda
6 |2 w/ P& O% l4 Y( p& BThe number of cylinders for this disk is set to 60801.
& m0 x' x3 O! d' R+ P# ?There is nothing wrong with that, but this is larger than 1024,
3 x7 _* {' \ a* Iand could in certain setups cause problems with:
6 W, f( A- ]3 {4 o1) software that runs at boot time (e.g., old versions of LILO)
0 A0 w2 A. a1 X8 J5 H% d2) booting and partitioning software from other OSs
/ P' _( n+ U0 o$ ], O( U (e.g., DOS FDISK, OS/2 FDISK)
# G f8 `9 ?9 b Z6 U, x* `% c4 OCommand (m for help):p
2 L& a; s5 w4 K$ m- R. ^' y. `& WDisk /dev/sda: 500.1 GB, 500107862016 bytes
3 I6 @3 N! c- c* G, r% ?( |# Y( R255 heads, 63 sectors/track, 60801 cylinders: O; U- Q* P" u* b) |/ s
Units = cylinders of 16065 * 512 = 8225280 bytes) w; s* i; z3 r( k, A0 L8 Z
Device Boot Start End Blocks Id System
. \0 I$ \+ G( \2 l/dev/sda1 * 1 12748 102398278+ 83 Linux% M4 b$ X) m. G; b
/dev/sda2 12749 13270 4192965 82 Linux swap / Solaris
+ [ ` I4 o6 y! L1 u* M1 KCommand (m for help): n) o5 @% H' `; z* n& l
Command action
3 b) I, r, B) f& ]% \ n e extended
2 R7 n7 {( `/ ]/ D1 { p primary partition (1-4)
3 O, L6 n( `1 J$ M Jp3 t! o- V1 r! @; o6 m% g
Partition number (1-4): 30 L& F* {5 O/ j1 g7 P+ D7 P# E
First cylinder (13271-60801, default 13271):
! m0 \+ E: [+ f& c) o$ VUsing default value 132715 [/ S0 T O+ X
Last cylinder or +size or +sizeM or +sizeK (13271-60801, default 60801): , ?2 x- N9 i& s' M6 |# v8 i
Using default value 60801. U& _ R+ |4 @0 Q: z7 y5 M4 T: `
Command (m for help): t
/ G8 @7 Z2 J( ~" h% F, y' E6 }Partition number (1-4): 3
7 G) z2 x# K1 @4 ]) c8 Z2 r" k1 ]; zHex code (type L to list codes): 8e
+ a- j+ L7 G" N2 B! o; N/ u, RChanged system type of partition 3 to 8e (Linux LVM)3 a/ p7 s& S5 I, z
Command (m for help): w
- l5 O2 P6 m1 F( ]0 r% gThe partition table has been altered!
, m9 n& f/ V! y# |# HCalling ioctl() to re-read partition table.; ^9 j( Q! |" d- ^& t$ u
执行下面的命令不必重启机器:
" _0 Q: Q& T! E+ a1 z' r# partprobe 这个命令必须记住,老是忘记
) j7 ^4 v3 ^" Q0 Z7 p" P* l ^创建物理卷:
" n- J! z- m4 ~: R- M& r9 x) G! P# pvcreate /dev/sda3
c/ }+ q) y0 U/ c% {2 h创建卷组:" M, ?1 G0 I8 O: ~8 f+ b
# vgcreate xenvg /dev/sda3 ' P% X2 E# Y: v& e3 |6 j- r
创建逻辑卷:! ?9 w& [( Y8 {- ~- t' d
# lvcreate -L 10G -n test xenvg |
|