找回密码
 注册
关于网站域名变更的通知
查看: 263|回复: 1
打印 上一主题 下一主题

快来了解一下创建逻辑卷的过程吧

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2020-1-20 10:40 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

推荐内容上一条 /1 下一条

EDA365公众号

关于我们|手机版|EDA365电子论坛网 ( 粤ICP备18020198号-1 )

GMT+8, 2025-11-25 14:07 , Processed in 0.156250 second(s), 24 queries , Gzip On.

深圳市墨知创新科技有限公司

地址:深圳市南山区科技生态园2栋A座805 电话:19926409050

快速回复 返回顶部 返回列表