• Ubuntu创建lvm


    # fdisk -l
    Disk /dev/vdb: 8796.1 GB, 8796093022208 byte
    # pvcreate /dev/vdb
      Physical volume "/dev/vdb" successfully created
    # vgcreate data_vga1 /dev/vdb
      Volume group "data_vga1" successfully created
    # lvcreate -L 8790G -n data_lv1 data_vga1
      Volume group "data_vga1" has insufficient free space (2097151 extents): 2250240 required.
    #报错,区块错误,我们查看一下
    # vgdisplay
    PE Size               4.00 MiB
    Free  PE / Size       2097151 / 8.00 TiB
    #可以看到2097151X4= 8388604/1024=8191.996,我们可以这样
    # lvcreate -L 8191G -n data_lv1 data_vga1或者
    #lvcreate -l2097151 -n data_lv1 data_vga1
    #lvs
      LV       VG        Attr      LSize  Pool Origin Data%  Move Log Copy%  Convert
      root     backup-vg -wi-ao--- 75.72g                                           
      swap_1   backup-vg -wi-ao---  4.00g                                           
      data_lv1 data_vga1 -wi-a----  8.00t 

    格式化

    # mkfs.ext4 /dev/data_vga1/data_lv1 
    Writing superblocks and filesystem accounting information:            
    done
  • 相关阅读:
    DTV_SI 汇总 & 兼谈LCN
    Java 泛型 五:泛型与数组
    Java 泛型 四 基本用法与类型擦除
    Java 泛型 三
    Java 泛型 二
    Java 泛型 一
    Java集合类解析 ***
    Java 集合类
    MySQL入门01-MySQL源码安装
    如何彻底杀掉不良用户会话
  • 原文地址:https://www.cnblogs.com/dthum/p/11996675.html
Copyright © 2020-2023  润新知