|
|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
0 g5 E$ |% }$ C0 d$ W$ z
首先分区:
" t3 b9 J' R. Q V( a+ {6 V# fdisk /dev/sda
3 Z# V( c4 j- C; W8 I' t7 J$ eThe number of cylinders for this disk is set to 60801.) u6 D8 n |/ Z- G# c1 t" @0 _
There is nothing wrong with that, but this is larger than 1024,
9 ?- G$ P1 |( K( C5 \7 l1 s1 t7 nand could in certain setups cause problems with:- Q3 R- p/ R/ `1 H6 {) {
1) software that runs at boot time (e.g., old versions of LILO)& |3 ]& F3 t. ~+ g. h/ z& V8 f6 m
2) booting and partitioning software from other OSs. G, {; ?* `6 ?* E3 O: m
(e.g., DOS FDISK, OS/2 FDISK): Y; @( c* r" J& Z
Command (m for help):p6 T( e5 e( @7 p2 k, W* T
Disk /dev/sda: 500.1 GB, 500107862016 bytes
( p1 o7 Y' B% J9 H6 {255 heads, 63 sectors/track, 60801 cylinders
# f1 s8 A( t( ]5 w9 u5 F) m9 JUnits = cylinders of 16065 * 512 = 8225280 bytes
/ w3 }6 \. g% _0 C, o. R Device Boot Start End Blocks Id System* ^& G2 w5 {& R( y3 O$ N
/dev/sda1 * 1 12748 102398278+ 83 Linux
& O% o4 R' }; |: h E4 [/dev/sda2 12749 13270 4192965 82 Linux swap / Solaris6 E2 q; V8 t% ^( g: } \" P4 e
Command (m for help): n
- U0 q" I! u [& jCommand action
+ m- N+ y7 z& B) U6 ? e extended
6 I% u5 F: b" X p primary partition (1-4)$ z1 x$ v- c2 u" r5 v+ L3 d
p/ f) b, [! q" ]6 ~' ]. n) l4 k" m
Partition number (1-4): 35 }' p5 X# T2 g8 l3 A
First cylinder (13271-60801, default 13271): + a$ G( u1 G' G
Using default value 132718 M4 m' ~* p- Y. g6 W; y6 |
Last cylinder or +size or +sizeM or +sizeK (13271-60801, default 60801): ( r* C7 m$ S. r* B
Using default value 608019 R. U F+ O B' O
Command (m for help): t
, H" Y# \/ f0 Z& ~Partition number (1-4): 3
2 d+ p% ]/ p5 ]Hex code (type L to list codes): 8e
; V' C! {7 `( @4 a1 u! b6 hChanged system type of partition 3 to 8e (Linux LVM)
4 g; k: [* ?: O. a' L+ k$ s8 lCommand (m for help): w
, A1 }9 B j! h0 c* q% ^The partition table has been altered!+ G4 r- b5 g% s$ B; V
Calling ioctl() to re-read partition table.
1 V) R2 @4 _% s* P执行下面的命令不必重启机器:/ w$ {3 c5 k9 S) {. ?
# partprobe 这个命令必须记住,老是忘记
?' {1 ~' @0 o1 N X' S3 T创建物理卷:
. O6 [4 x; X, d, _& n# pvcreate /dev/sda33 H+ i' S( w5 S4 A: H) w
创建卷组:
$ }% f. Q" V0 m/ q( @, N0 i# vgcreate xenvg /dev/sda3
6 ]/ r- M" @+ b. g创建逻辑卷:
( K' H( }# w! \9 |- d+ m+ j# lvcreate -L 10G -n test xenvg |
|