我们有一组配置有 100GB/tmp
和 400GB/scratch
分区的 Centos7 机器。我们正在使用的工具消耗的/tmp
空间比预期的要多,因此我们需要重新分配一些/scratch
空间给/tmp
.
我们的系统在 RAID-1 中设置了两个 1TB NVME 驱动器;相关的 lsblk 输出:
nvme0n1 259:0 0 894.3G 0 disk
├─nvme0n1p1 259:4 0 1G 0 part
│ └─md126 9:126 0 1023M 0 raid1 /boot
├─nvme0n1p2 259:6 0 201M 0 part
│ └─md125 9:125 0 201M 0 raid1 /boot/efi
└─nvme0n1p3 259:8 0 893.1G 0 part
└─md127 9:127 0 893G 0 raid1
├─centos-root 253:0 0 200G 0 lvm /
├─centos-swap 253:1 0 256G 0 lvm [SWAP]
├─centos-tmp 253:3 0 100G 0 lvm /tmp
└─centos-scratch 253:4 0 300G 0 lvm /scratch
nvme1n1 259:1 0 894.3G 0 disk
├─nvme1n1p1 259:3 0 1G 0 part
│ └─md126 9:126 0 1023M 0 raid1 /boot
├─nvme1n1p2 259:5 0 201M 0 part
│ └─md125 9:125 0 201M 0 raid1 /boot/efi
└─nvme1n1p3 259:7 0 893.1G 0 part
└─md127 9:127 0 893G 0 raid1
├─centos-root 253:0 0 200G 0 lvm /
├─centos-swap 253:1 0 256G 0 lvm [SWAP]
├─centos-tmp 253:3 0 100G 0 lvm /tmp
└─centos-scratch 253:4 0 300G 0 lvm /scratch
我正在努力确定如何将 的大小缩小/scratch
100GB,并将大小增加/tmp
100GB。fdisk
找不到分区图:
[root /tmp]# fdisk /dev/md127
Welcome to fdisk (util-linux 2.23.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
Building a new DOS disklabel with disk identifier 0x6fb1c8c6.
Command (m for help): p
Disk /dev/md127: 958.8 GB, 958774902784 bytes, 1872607232 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x6fb1c8c6
Device Boot Start End Blocks Id System
我可以为此过程使机器脱机,但不清楚从哪里开始。如何缩小 RAID-1 上一个卷的大小并使用该空间扩展另一个卷?