扩展 SDA5(Linux VMWare 实例)
Extend SDA5 (Linux VMWare instance)
我想扩展我的 sda5 分区。
我通过 VMWare GUI 扩展了磁盘,然后,使用 gparted,我试图扩展我的 sda5 分区,但似乎我不能。
https://pasteboard.co/JUfr2G7.png
我想要以下方法之一:
- 将 /home 移动到 sda3
- 扩展/sda5(最好是这个)
此致!
我用de 1方法解决了:
cd /mnt/
ls
mount /dev/sda3 /mnt/
cd /mnt/
rm -rf lost+found/
cp -rp /home/* /mnt/
mv /home/ /home.orig
mkdir /home
cd /
umount /dev/sda3
mount /dev/sda3 /home/
df /dev/sda3
------------------------------------------------------------------------
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda3 51342396 7936608 40767968 17% /home
------------------------------------------------------------------------
cp /etc/fstab /etc/fstab.orig
nano /etc/fstab
将此行添加到 fstab:
/dev/sda3 /home ext4 默认值 0 0
rm -r /home.orig
df -u
结果是:
Filesystem Size Used Avail Use% Mounted on
udev 3.4G 0 3.4G 0% /dev
tmpfs 689M 1.8M 688M 1% /run
/dev/sda5 29G 19G 9.1G 68% /
tmpfs 3.4G 0 3.4G 0% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 3.4G 0 3.4G 0% /sys/fs/cgroup
/dev/loop1 219M 219M 0 100% /snap/gnome-3-34-1804/66
/dev/loop3 33M 33M 0 100% /snap/snapd/11107
/dev/loop2 65M 65M 0 100% /snap/gtk-common-themes/1514
/dev/loop0 56M 56M 0 100% /snap/core18/1988
/dev/loop4 33M 33M 0 100% /snap/snapd/11402
/dev/loop5 52M 52M 0 100% /snap/snap-store/518
/dev/sda3 49G 7.6G 39G 17% /home
/dev/sda1 511M 4.0K 511M 1% /boot/efi
tmpfs 689M 20K 689M 1% /run/user/1000
干净利落
我想扩展我的 sda5 分区。
我通过 VMWare GUI 扩展了磁盘,然后,使用 gparted,我试图扩展我的 sda5 分区,但似乎我不能。
https://pasteboard.co/JUfr2G7.png
我想要以下方法之一:
- 将 /home 移动到 sda3
- 扩展/sda5(最好是这个)
此致!
我用de 1方法解决了:
cd /mnt/
ls
mount /dev/sda3 /mnt/
cd /mnt/
rm -rf lost+found/
cp -rp /home/* /mnt/
mv /home/ /home.orig
mkdir /home
cd /
umount /dev/sda3
mount /dev/sda3 /home/
df /dev/sda3
------------------------------------------------------------------------
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda3 51342396 7936608 40767968 17% /home
------------------------------------------------------------------------
cp /etc/fstab /etc/fstab.orig
nano /etc/fstab
将此行添加到 fstab:
/dev/sda3 /home ext4 默认值 0 0
rm -r /home.orig
df -u
结果是:
Filesystem Size Used Avail Use% Mounted on
udev 3.4G 0 3.4G 0% /dev
tmpfs 689M 1.8M 688M 1% /run
/dev/sda5 29G 19G 9.1G 68% /
tmpfs 3.4G 0 3.4G 0% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 3.4G 0 3.4G 0% /sys/fs/cgroup
/dev/loop1 219M 219M 0 100% /snap/gnome-3-34-1804/66
/dev/loop3 33M 33M 0 100% /snap/snapd/11107
/dev/loop2 65M 65M 0 100% /snap/gtk-common-themes/1514
/dev/loop0 56M 56M 0 100% /snap/core18/1988
/dev/loop4 33M 33M 0 100% /snap/snapd/11402
/dev/loop5 52M 52M 0 100% /snap/snap-store/518
/dev/sda3 49G 7.6G 39G 17% /home
/dev/sda1 511M 4.0K 511M 1% /boot/efi
tmpfs 689M 20K 689M 1% /run/user/1000
干净利落