<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>fdisk on 小碼哥的博客</title>
    <link>https://lewang.dev/tags/fdisk/</link>
    <description>Recent content in fdisk on 小碼哥的博客</description>
    <image>
      <title>小碼哥的博客</title>
      <url>https://lewang.dev/lewangdev-cover.png</url>
      <link>https://lewang.dev/lewangdev-cover.png</link>
    </image>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Thu, 03 Aug 2017 23:55:00 +0000</lastBuildDate><atom:link href="https://lewang.dev/tags/fdisk/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>LVM 实战记录</title>
      <link>https://lewang.dev/posts/2017-08-03-lvm-in-action/</link>
      <pubDate>Thu, 03 Aug 2017 23:55:00 +0000</pubDate>
      
      <guid>https://lewang.dev/posts/2017-08-03-lvm-in-action/</guid>
      <description>背景 阿里云云主机两块 100G 的云盘合一个逻辑卷（LV）来使用，单个的 100G 磁盘不够用，需要合在一起使用，并且方便以后扩容
基本知识 磁盘 /dev/xvdb /dev/xvdc 分区, 使用 fdisk 进行分区 fdisk &amp;gt; n &amp;gt; p &amp;gt; 1..4, 主分区最多只有 4 个 准备分区后，将分区类型变为 LVM 分区，fdisk &amp;gt; t &amp;gt; 8e, 8e 是 LVM 类型 ID 物理卷（PV），卷组（VG），逻辑卷（LV），从磁盘分区创建 PV，通过 PV 创建 VG 或者把 PV 加入已有的 VG，在 VG 上创建 LV，LV 看起来就是逻辑的上磁盘，使用和真实的磁盘没什么明显区别, 在 LV 上构建文件系统 创建 创建物理卷 pvcreate /dev/xvdb1，对分区进行操作 创建 vg0 卷组 vgcreate vg0 /dev/xvdb1 查看卷组 vgdisplay， 可以看到卷组有多大 在 vg0 上创建 data 逻辑卷 lvcreate -L 99G -n data vg0 或者 lvcreate -l 25556 -n data vg0 创建文件系统 mkfs.</description>
    </item>
    
  </channel>
</rss>
