跨磁盘扩容根目录

您所在的位置:网站首页 vg扩容 跨磁盘扩容根目录

跨磁盘扩容根目录

#跨磁盘扩容根目录| 来源: 网络整理| 查看: 265

跨磁盘扩容根目录LVM 的基本概念

物理卷 Physical Volume (PV):可以在上面建立卷组的媒介,可以是硬盘分区,也可以是硬盘本身或者回环文件(loopback file)。物理卷包括一个特殊的 header,其余部分被切割为一块块物理区域(physical extents)

卷组 Volume group (VG):将一组物理卷收集为一个管理单元

逻辑卷 Logical volume (LV):虚拟分区,由物理区域(physical extents)组成

物理区域 Physical extent (PE):硬盘可供指派给逻辑卷的最小单位(通常为 4MB)

查看磁盘关系# 查看磁盘关系 root@hello:~# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS loop0 7:0 0 55.6M 1 loop /snap/core18/2667 loop1 7:1 0 55.6M 1 loop /snap/core18/2679 loop2 7:2 0 63.2M 1 loop /snap/core20/1738 loop3 7:3 0 63.3M 1 loop /snap/core20/1778 loop4 7:4 0 91.8M 1 loop /snap/lxd/23991 loop5 7:5 0 91.8M 1 loop /snap/lxd/24061 loop6 7:6 0 49.6M 1 loop /snap/snapd/17883 loop7 7:7 0 49.8M 1 loop /snap/snapd/17950 sda 8:0 0 100G 0 disk ├─sda1 8:1 0 1M 0 part ├─sda2 8:2 0 1G 0 part /boot └─sda3 8:3 0 99G 0 part └─ubuntu--vg-ubuntu--lv 253:0 0 98.5G 0 lvm / sdb 8:16 0 100G 0 disk root@hello:~#新建分区# 新建分区 root@hello:~# fdisk /dev/sdb Welcome to fdisk (util-linux 2.37.2). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Device does not contain a recognized partition table. Created a new DOS disklabel with disk identifier 0xd97cd23b. Command (m for help): g Created a new GPT disklabel (GUID: CED3C27F-6F17-D940-A99F-191D881FCD91). Command (m for help): n Partition number (1-128, default 1): First sector (2048-209715166, default 2048): Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-209715166, default 209715166): Created a new partition 1 of type 'Linux filesystem' and of size 100 GiB. Command (m for help): p Disk /dev/sdb: 100 GiB, 107374182400 bytes, 209715200 sectors Disk model: QEMU HARDDISK Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: CED3C27F-6F17-D940-A99F-191D881FCD91 Device Start End Sectors Size Type /dev/sdb1 2048 209715166 209713119 100G Linux filesystem Command (m for help): w The partition table has been altered. Calling ioctl() to re-read partition table. Syncing disks. root@hello:~#查看磁盘关系# 查看磁盘关系 root@hello:~# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS loop0 7:0 0 55.6M 1 loop /snap/core18/2667 loop1 7:1 0 55.6M 1 loop /snap/core18/2679 loop2 7:2 0 63.2M 1 loop /snap/core20/1738 loop3 7:3 0 63.3M 1 loop /snap/core20/1778 loop4 7:4 0 91.8M 1 loop /snap/lxd/23991 loop5 7:5 0 91.8M 1 loop /snap/lxd/24061 loop6 7:6 0 49.6M 1 loop /snap/snapd/17883 loop7 7:7 0 49.8M 1 loop /snap/snapd/17950 sda 8:0 0 100G 0 disk ├─sda1 8:1 0 1M 0 part ├─sda2 8:2 0 1G 0 part /boot └─sda3 8:3 0 99G 0 part └─ubuntu--vg-ubuntu--lv 253:0 0 98.5G 0 lvm / sdb 8:16 0 100G 0 disk └─sdb1 8:17 0 100G 0 part root@hello:~#创建PV并查看# 创建PV并查看 root@hello:~# pvdisplay --- Physical volume --- PV Name /dev/sda3 VG Name ubuntu-vg PV Size


【本文地址】


今日新闻


推荐新闻


    CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3