resize disk space no reboot
發表於 : 2019-07-05 11:08:36
root@erpdev:/home/yehlu#
2:0:0:0 32:0:0:0
root@erpdev:/home/yehlu#
root@erpdev:/home/yehlu#
root@erpdev:/home/yehlu#
GNU Parted 3.2
使用 /dev/sda
歡迎使用 GNU Parted!輸入 'help' 來檢視命令列表。
(parted)
(parted)
(parted)
資訊: 您也許會需要更新 /etc/fstab。
root@erpdev:/home/yehlu#
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#
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 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.
代碼: 選擇全部
ls /sys/class/scsi_device/
root@erpdev:/home/yehlu#
代碼: 選擇全部
echo 1 > /sys/class/scsi_device/2\:0\:0\:0/device/rescan
代碼: 選擇全部
echo 1 > /sys/class/scsi_device/32\:0\:0\:0/device/rescan
代碼: 選擇全部
parted
使用 /dev/sda
歡迎使用 GNU Parted!輸入 'help' 來檢視命令列表。
(parted)
代碼: 選擇全部
resizepart 2 160G
代碼: 選擇全部
resizepart 5 160G
代碼: 選擇全部
q
root@erpdev:/home/yehlu#
代碼: 選擇全部
mount
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
Logical volume root successfully resized.
root@erpdev:/home/yehlu#
代碼: 選擇全部
resize2fs /dev/mapper/erpdev--vg-root
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.