resize disk space no reboot

虛擬化,雲端運算
回覆文章
yehlu
Site Admin
文章: 3245
註冊時間: 2004-04-15 17:20:21
來自: CodeCharge Support Engineer

resize disk space no reboot

文章 yehlu »

root@erpdev:/home/yehlu#

代碼: 選擇全部

 ls /sys/class/scsi_device/
 
2:0:0:0 32:0:0:0
root@erpdev:/home/yehlu#

代碼: 選擇全部

echo 1 > /sys/class/scsi_device/2\:0\:0\:0/device/rescan
root@erpdev:/home/yehlu#

代碼: 選擇全部

echo 1 > /sys/class/scsi_device/32\:0\:0\:0/device/rescan
root@erpdev:/home/yehlu#

代碼: 選擇全部

parted
GNU Parted 3.2
使用 /dev/sda
歡迎使用 GNU Parted!輸入 'help' 來檢視命令列表。
(parted)

代碼: 選擇全部

resizepart 2 160G
(parted)

代碼: 選擇全部

resizepart 5 160G
(parted)

代碼: 選擇全部

q
資訊: 您也許會需要更新 /etc/fstab。

root@erpdev:/home/yehlu#

代碼: 選擇全部

mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,relatime,size=2004520k,nr_inodes=501130,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=403388k,mode=755)
/dev/mapper/erpdev--vg-root on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
none on /sys/fs/cgroup type tmpfs (rw,relatime,size=4k,mode=755)
none on /sys/fs/fuse/connections type fusectl (rw,relatime)
none on /sys/kernel/debug type debugfs (rw,relatime)
none on /sys/kernel/security type securityfs (rw,relatime)
none on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
none on /run/shm type tmpfs (rw,nosuid,nodev,relatime)
none on /run/user type tmpfs (rw,nosuid,nodev,noexec,relatime,size=102400k,mode=755)
none on /sys/fs/pstore type pstore (rw,relatime)
/dev/sda1 on /boot type ext2 (rw,relatime)
systemd on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,name=systemd)
/dev/mapper/erpdev--vg-root on /var/lib/docker type ext4 (rw,relatime,errors=remount-ro,data=ordered)
cgmfs on /run/cgmanager/fs type tmpfs (rw,relatime,size=100k,mode=755)
root@erpdev:/home/yehlu#

代碼: 選擇全部

 lvresize -l +100%FREE /dev/mapper/erpdev--vg-root
Size of logical volume erpdev-vg/root changed from 91.74 GiB (23485 extents) to 144.77 GiB (37062 extents).
Logical volume root successfully resized.
root@erpdev:/home/yehlu#

代碼: 選擇全部

resize2fs /dev/mapper/erpdev--vg-root
resize2fs 1.42.13 (17-May-2015)
Filesystem at /dev/mapper/erpdev--vg-root is mounted on /; on-line resizing required
old_desc_blocks = 6, new_desc_blocks = 10
The filesystem on /dev/mapper/erpdev--vg-root is now 37951488 (4k) blocks long.
yehlu
Site Admin
文章: 3245
註冊時間: 2004-04-15 17:20:21
來自: CodeCharge Support Engineer

New size (37768 extents) matches existing size (37768 extents)

文章 yehlu »

sudo pvresize /dev/sda5
回覆文章

回到「VMware」