![更改分区驱动器空间](https://linux22.com/image/65522/%E6%9B%B4%E6%94%B9%E5%88%86%E5%8C%BA%E9%A9%B1%E5%8A%A8%E5%99%A8%E7%A9%BA%E9%97%B4.png)
好吧,我在这里遇到了一些麻烦 - 对 Linux 环境还很陌生,需要一些帮助。我有一个 2.7 TB 的 RAID 阵列,有人配置了大约 200 GB 的分区,但它确实需要更大,比如 2.2 TB。如何让分区变大?
而且看起来还有一个重复的 2.2 TB 分区。
我需要将磁盘/dev/mapper/vg_orchestrator1-lv_home
219.9 GB 分区变为 2.2 TB,并且我不确定如何/是否可以调整该分区的大小,或者是否需要制作新内容并复制内容。
这是我运行的一些命令的一些信息。
使用的光盘列表fdisk
[root@orchestrator1 ~]# fdisk -l
Disk /dev/sda: 299.4 GB, 299439751168 bytes
255 heads, 63 sectors/track, 36404 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000d0e98
Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 36405 291908608 8e Linux LVM
Disk /dev/sdb: 2698.6 GB, 2698581639168 bytes
255 heads, 63 sectors/track, 328083 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x3d468517
Device Boot Start End Blocks Id System
/dev/sdb1 1 60735 487849952+ 83 Linux
Disk /dev/mapper/vg_orchestrator1-lv_root: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/vg_orchestrator1-lv_swap: 25.4 GB, 25367150592 bytes
255 heads, 63 sectors/track, 3084 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/3600508e000000000cad0b2b5c22f8d02: 2698.6 GB, 2698581639168 bytes
255 heads, 63 sectors/track, 328083 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x3d468517
Device Boot Start End Blocks Id System
/dev/mapper/3600508e000000000cad0b2b5c22f8d02p1 1 60735 487849952+ 83 Linux
Disk /dev/mapper/3600508e000000000cad0b2b5c22f8d02p1: 2199.0 GB, 2199020350464 bytes
255 heads, 63 sectors/track, 267348 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
Disk /dev/mapper/vg_orchestrator1-lv_home: 219.9 GB, 219857027072 bytes
255 heads, 63 sectors/track, 26729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/3600508e000000000cad0b2b5c22f8d02p1p1: 2199.0 GB, 2199020318208 bytes
255 heads, 63 sectors/track, 267348 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
df -h
命令
[root@orchestrator1 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_orchestrator1-lv_root
50G 45G 1.7G 97% /
tmpfs 24G 80K 24G 1% /dev/shm
/dev/sda1 477M 123M 325M 28% /boot
/dev/mapper/vg_orchestrator1-lv_home
202G 61M 192G 1% /home
并cat /etc/fstab
命令:
[root@orchestrator1 ~]# cat /etc/fstab
#
# /etc/fstab
# Created by anaconda on Mon Apr 27 13:14:35 2015
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
/dev/mapper/vg_orchestrator1-lv_root / ext4 defaults 1 1
UUID=62e2c26b-9f29-4de4-96b1-d76ff142d23d /boot ext4 defaults 1 2
/dev/mapper/vg_orchestrator1-lv_home /home ext4 defaults 1 2
/dev/mapper/vg_orchestrator1-lv_swap swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/sdb /home ext4 defaults 1 2
光伏发电
[root@orchestrator1 ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/disk/by-id/scsi-3600508e000000000e30eb35adb098c03-part2 vg_orchestrator1 lvm2 a-- 278.38g 0
LVS
[root@orchestrator1 ~]# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
lv_home vg_orchestrator1 -wi-ao---- 204.76g
lv_root vg_orchestrator1 -wi-ao---- 50.00g
lv_swap vg_orchestrator1 -wi-ao---- 23.62g