标签: lvm

  • LVM扩容swap分区

    swapoff -a
    lvresize /dev/pve/swap -L 32G
    mkswap /dev/pve/swap
    swapon -a
    

    新建swap分区

    lvcreate ubuntu-vg -L 16G -n swap
    mkswap /dev/ubuntu-vg/swap
    echo "/dev/ubuntu-vg/swap swap swap defaults 0 0" >> /etc/fstab
    swapon -a
    

    Views: 53

  • LVM创建瘦池和瘦卷

    • 常用LVM命令
      lvm commands
    • 创建瘦池
      wipefs -a -b /dev/sdc
      wipefs -a -b /dev/sdb1
      pvcreate /dev/sdb1
      pvcreate /dev/sdc
      vgcreate hdd-raid /dev/sdb1 /dev/sdc
      lvcreate -l 100%FREE -T hdd-raid/vm-pool
    • 在瘦池上创建瘦卷
      lvcreate -V 4T -T hdd-raid/vm-pool -n backup2
      mkfs -t ext4 /dev/hdd-raid/backup2

    Views: 356