|
|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
3 F2 F) M' T+ L! D1 b( V
首先分区:7 O+ t$ ^0 G$ j! j. Z' D
# fdisk /dev/sda
: ?0 s. b: I$ ] x. kThe number of cylinders for this disk is set to 60801.; T$ P V' @2 h( A" X) v
There is nothing wrong with that, but this is larger than 1024,- Q4 P R) _) M" L8 H, }/ M% s
and could in certain setups cause problems with:. E* D( C; P* M! c+ U) A, d
1) software that runs at boot time (e.g., old versions of LILO)
8 t0 V6 g" e4 \; y9 } Q2) booting and partitioning software from other OSs
6 w1 k, t+ p; d5 k2 { (e.g., DOS FDISK, OS/2 FDISK)
7 v! e9 W. B3 v1 ~7 vCommand (m for help):p6 n. p8 a+ p. t3 ^7 h) w2 l
Disk /dev/sda: 500.1 GB, 500107862016 bytes. h, p2 l+ k- N
255 heads, 63 sectors/track, 60801 cylinders
$ h- b Y0 i1 F B4 W% Z& PUnits = cylinders of 16065 * 512 = 8225280 bytes8 w" `9 S( A: @7 @5 c$ u# N3 {# I
Device Boot Start End Blocks Id System0 l8 u/ L1 k& c) X6 F! ^7 K% |! q& j
/dev/sda1 * 1 12748 102398278+ 83 Linux& b0 \7 d6 s, }+ f1 ~% U
/dev/sda2 12749 13270 4192965 82 Linux swap / Solaris3 z3 ]* M1 v: r E/ l5 s# [
Command (m for help): n
) c6 _* p" ^0 |) A1 \( wCommand action
* U7 ?) v2 o1 e0 [: f e extended
) U4 {6 _5 K) ] p primary partition (1-4)
' r2 o% ^: v' Gp2 T' ^; `1 G9 N' P
Partition number (1-4): 3
, X$ M4 ]$ a7 M( TFirst cylinder (13271-60801, default 13271): % p5 s/ ]" k! l& q4 ^1 G8 ~
Using default value 13271; G$ X1 p) ?+ v% F4 _# U
Last cylinder or +size or +sizeM or +sizeK (13271-60801, default 60801): % A# P% P/ X& _5 _0 }5 ~
Using default value 608015 y$ T: I9 b9 _) |* i$ v
Command (m for help): t
. w4 {' E9 d6 ?, O# b% ` j8 FPartition number (1-4): 38 R/ Q$ c2 w* O+ O n& D: k6 x
Hex code (type L to list codes): 8e8 }& P% w/ q. S, A; ~) o3 w. [) d! |
Changed system type of partition 3 to 8e (Linux LVM)4 R. l/ \: y( Y6 k
Command (m for help): w9 I4 x' p( P6 K4 c! N
The partition table has been altered!
* P; D4 ]1 L5 N' g+ L- DCalling ioctl() to re-read partition table.& v8 _* Q8 u K% ?& f( d ?
执行下面的命令不必重启机器:2 g. E- p. Q+ H5 \3 X; B, ?
# partprobe 这个命令必须记住,老是忘记
4 {+ }& H9 i$ C3 Z. n4 }创建物理卷:7 U& ?: ]# Z; L0 E* B
# pvcreate /dev/sda30 Q J9 X# }' |0 O( D4 i' K
创建卷组:& [5 g7 h- l8 I: y/ x! Q
# vgcreate xenvg /dev/sda3 : |; V# Q3 e- |
创建逻辑卷:
% }0 I) B* r6 Z0 x- q* A# lvcreate -L 10G -n test xenvg |
|