目前已经在我的networking服务器上安装了一个VMware上的一个linux盒子,其中有两个外部驱动器。这两个驱动器都是2TB驱动器,这是您可以添加到VMware中的限制。 我想使用lvm来扩展sdc1,使其达到5TB。
Filesystem Size Used Avail Use% Mounted on /dev/sda1 19G 15G 3.5G 81% / udev 24G 4.0K 24G 1% /dev tmpfs 9.5G 300K 9.5G 1% /run none 5.0M 0 5.0M 0% /run/lock none 24G 0 24G 0% /run/shm /dev/sdc1 2.0T 1.3T 657G 66% /mnt/sdc1 /dev/sdb1 2.0T 199M 1.9T 1% /mnt/sdb1
我打算通过VMware添加另外两个磁盘到虚拟机,但我不是100%的最佳方法来实现这一目标?
ls -al /dev/sdc*
findsdc的新分区号
pvdisplay
看看有没有
vgcreate VolGroup /dev/sdc2
我不确定如何获得VolGroup inoformation?
lvdisplay
获取新的path
lvcreate -L??GB -n root_new VolGroup?
分配逻辑大小并创build一个新的逻辑卷
lvextend /dev/mapper/?? /dev/sdc2
扩展根分区
lvdisplay
检查大小是否有差异
resize2fs /dev/mapper/VolGroup-lv_root
调整分区大小
df -h
检查是否工作
我想我不确定步骤是否正确? 如何获得音量组? 如果这是最好的方法
干杯
增加:fdisk -l
Disk /dev/sdb: 2147.5 GB, 2147483648000 bytes 89 heads, 61 sectors/track, 772573 cylinders, total 4194304000 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 identifier: 0x2bf21c23 Device Boot Start End Blocks Id System /dev/sdb1 2048 4194303999 2097150976 83 Linux Disk /dev/sdc: 2179.7 GB, 2179695902720 bytes 153 heads, 49 sectors/track, 567856 cylinders, total 4257218560 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 identifier: 0x5a098214 Device Boot Start End Blocks Id System /dev/sdc1 2048 4257218559 2128608256 83 Linux Disk /dev/sda: 21.5 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders, total 41943040 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 identifier: 0x00081a14 Device Boot Start End Blocks Id System /dev/sda1 * 2048 39845887 19921920 83 Linux /dev/sda2 39847934 41940991 1046529 5 Extended /dev/sda5 39847936 41940991 1046528 82 Linux swap / Solaris
我会把这个作为答案。 这里做的最好的事情是备份数据。 删除sdc1并重新创build由新的3个物理卷组成的LVM LV。 您也可以尝试使用mdadm以线性(0.9)元数据条带化3个磁盘,几乎像raid0。
最危险的select,你可以使用这个工具在现有的设置上做你想做的
"LVMIFY" - https://github.com/g2p/lvmify#readme
但是在继续之前,您必须非常小心,并做好备份或快照。