|
|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
8 |: \/ l! F0 k! Q
首先分区:& `3 M% o0 {0 R2 Q8 q6 G( X4 o
# fdisk /dev/sda
, z8 q& `+ }( a- }- V1 U. KThe number of cylinders for this disk is set to 60801.' O9 t# J" L: ]" `4 s, J: m# o
There is nothing wrong with that, but this is larger than 1024,% n6 Z8 P2 T; a7 S6 b& c
and could in certain setups cause problems with:6 j7 h1 O8 m* ^- K/ r, L- i
1) software that runs at boot time (e.g., old versions of LILO)6 ~( L9 g7 t# s. d
2) booting and partitioning software from other OSs
% \! }% @/ s ]1 { (e.g., DOS FDISK, OS/2 FDISK)
) c" X& u3 c, F" ]2 cCommand (m for help):p3 c Z; M& \3 u6 j3 U9 j- Z
Disk /dev/sda: 500.1 GB, 500107862016 bytes8 r* T, M+ Y4 q3 T
255 heads, 63 sectors/track, 60801 cylinders! ~$ f8 r; M% s0 _( x$ C/ x
Units = cylinders of 16065 * 512 = 8225280 bytes ~# R/ @ D2 ?" P+ y! _: q
Device Boot Start End Blocks Id System
+ g# _. v' J' t9 Y/dev/sda1 * 1 12748 102398278+ 83 Linux7 v0 ^/ G% r1 C+ C3 s& c: ^
/dev/sda2 12749 13270 4192965 82 Linux swap / Solaris
: n S! Z% J# _1 @6 ?0 f0 _/ @" XCommand (m for help): n
2 l% d7 _2 P+ }! X; z/ M* ACommand action
8 g/ l8 Z8 f! s; |: s3 d/ n e extended9 ?" f4 Q3 \9 i
p primary partition (1-4)2 i$ N6 N2 Y( N, W/ C
p
7 s/ h7 `8 [* T4 B/ kPartition number (1-4): 35 J* k* Q, e) E5 i) x% X! C
First cylinder (13271-60801, default 13271): % A8 S q; D- V \+ d* h
Using default value 13271
( }& f2 f. f1 ^8 wLast cylinder or +size or +sizeM or +sizeK (13271-60801, default 60801): 8 Y2 e: e! ~, t7 r9 d
Using default value 60801
) `0 D# D2 S8 [0 _6 oCommand (m for help): t* S9 y. _& D; S0 F& p
Partition number (1-4): 3$ U( G" P& y H9 s6 i9 s* X
Hex code (type L to list codes): 8e
! H& c! p/ e% a8 y' w0 q. sChanged system type of partition 3 to 8e (Linux LVM)
- S" H2 T" i0 X$ a. _Command (m for help): w# v( c2 M% d" J/ r( O- s
The partition table has been altered!( Z" L; _5 W; @. y+ b
Calling ioctl() to re-read partition table." \( W7 Z6 I' y, q: D! Q
执行下面的命令不必重启机器:4 A) n' [5 H; C5 L; F( {7 Y
# partprobe 这个命令必须记住,老是忘记: m; P' v2 ?, l! d+ z5 D
创建物理卷:
* f+ U; J8 Z' q) G5 y" d1 a# pvcreate /dev/sda3# r" N8 O5 v( V8 b1 C
创建卷组:
3 D v6 D* X0 W# [# vgcreate xenvg /dev/sda3
z- Q0 Q* V! v1 W创建逻辑卷:
! M# W- i7 F2 r* M& ?4 D i! u9 s8 f# lvcreate -L 10G -n test xenvg |
|