|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
8 V8 {$ L( j/ h% c& l0 R+ m
首先分区:
* U9 U5 _5 Y4 S+ T6 ?# v" b" A( D' _# fdisk /dev/sda
$ |9 y2 P7 f0 [/ `3 ?" c8 wThe number of cylinders for this disk is set to 60801.
) g8 W5 ?' [4 M, CThere is nothing wrong with that, but this is larger than 1024, F P* x) X. G
and could in certain setups cause problems with:
" ^7 w7 T/ \& _! N1 P1) software that runs at boot time (e.g., old versions of LILO)
/ J" }0 t) L, z+ I9 V% V1 `2) booting and partitioning software from other OSs
$ x' I1 n7 C r3 G$ o( \9 \ (e.g., DOS FDISK, OS/2 FDISK)3 V6 n p% \' Y
Command (m for help):p! C& n- R, N! Q2 [1 D8 `6 {
Disk /dev/sda: 500.1 GB, 500107862016 bytes. t$ ]9 {0 C, S: L a. B' M( C- Z
255 heads, 63 sectors/track, 60801 cylinders
; |; w( d. |* _0 Q0 c8 o$ rUnits = cylinders of 16065 * 512 = 8225280 bytes
3 k/ |% |! e! N. c( C5 Y0 H" I Device Boot Start End Blocks Id System( E9 \& j. U( ?! r
/dev/sda1 * 1 12748 102398278+ 83 Linux
3 Q) M" v0 G0 q2 A8 y% W/dev/sda2 12749 13270 4192965 82 Linux swap / Solaris
3 k. F$ y0 j0 j9 Q& C1 ECommand (m for help): n
# E2 h4 _9 ^0 C; L: S! FCommand action
$ O9 h. Z1 w+ v% W2 F2 ^ e extended* Q0 h3 S% C& {! b3 P$ w% G
p primary partition (1-4)
; p9 h/ T( Y2 f* s6 P) yp
* z- w- @7 O+ oPartition number (1-4): 3
$ f5 p3 J. {2 [/ XFirst cylinder (13271-60801, default 13271):
: T) R+ ?. L! k, e9 [' \: rUsing default value 13271
! {+ j. {* d, v }& m, rLast cylinder or +size or +sizeM or +sizeK (13271-60801, default 60801): ( f' A5 W5 ]! h, L' M w& _. U
Using default value 60801
2 [( K, Z$ A# [1 p2 KCommand (m for help): t
: [. X7 o) Q% L; Z% d& R3 WPartition number (1-4): 38 S/ P7 q b3 N. |4 M
Hex code (type L to list codes): 8e$ I: k7 o! y B7 J! i. V
Changed system type of partition 3 to 8e (Linux LVM)
" H5 J7 i" [- P+ S+ e, j/ vCommand (m for help): w
8 u* i! y! T. Z4 b" cThe partition table has been altered!1 v3 _0 U9 _5 V' x( K" y' B- c, B/ }
Calling ioctl() to re-read partition table.1 m: ~: w6 l( F H
执行下面的命令不必重启机器:
& o7 ]- w3 T& {' V# partprobe 这个命令必须记住,老是忘记; Q" {# g/ ~# |3 g1 d0 h
创建物理卷:
1 ^* F4 N$ y! m3 I& G% ~# pvcreate /dev/sda3$ S0 y, O. p# x7 i; V
创建卷组:
7 S& A+ [; H! F! e- o6 E9 ?# vgcreate xenvg /dev/sda3
- s: R0 u& f; w3 W创建逻辑卷:
0 Q8 N; H8 F. Z" B# lvcreate -L 10G -n test xenvg |
|