Hello all,
I have GNS3 VM in VMware Workstation Pro.
GNS3 provides ready-made VMs and we can directly import them in VMware Workstation Pro and start working with it.
The current GNS3 VM is running on Ubuntu 20.04.4 LTS as you can see from the output below.
I have also taken outputs of some important commands so that you can see the structure of all the drives and directories.
The /opt directory is on different disk i.e. sdb1 and / is on different disk i.e. sda2
So I want to move entire sdb1 to sda2 without losing any data in sdb1 or sda2. And if I copy any data to /opt which is now in sdb1, but after the transfer of /opt to sda2, any data that I copy to /opt should go to sda2.
And after all this is successfully completed, I hope I can remove the second hard disk in VMware which contains /opt now, right?
Please help. I have also attached the VMware disks screenshot to this thread.
I have GNS3 VM in VMware Workstation Pro.
GNS3 provides ready-made VMs and we can directly import them in VMware Workstation Pro and start working with it.
The current GNS3 VM is running on Ubuntu 20.04.4 LTS as you can see from the output below.
I have also taken outputs of some important commands so that you can see the structure of all the drives and directories.
The /opt directory is on different disk i.e. sdb1 and / is on different disk i.e. sda2
So I want to move entire sdb1 to sda2 without losing any data in sdb1 or sda2. And if I copy any data to /opt which is now in sdb1, but after the transfer of /opt to sda2, any data that I copy to /opt should go to sda2.
And after all this is successfully completed, I hope I can remove the second hard disk in VMware which contains /opt now, right?
Please help. I have also attached the VMware disks screenshot to this thread.
Code:
root@gns3vm:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.4 LTS
Release: 20.04
Codename: focal
Code:
root@gns3vm:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 16G 0 16G 0% /dev
tmpfs 3.2G 1.5M 3.2G 1% /run
/dev/sda2 20G 6.3G 12G 35% /
tmpfs 16G 0 16G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 16G 0 16G 0% /sys/fs/cgroup
/dev/loop0 62M 62M 0 100% /snap/core20/1494
/dev/sdb1 1.5T 7.0G 1.4T 1% /opt
/dev/loop1 62M 62M 0 100% /snap/core20/1518
/dev/loop2 68M 68M 0 100% /snap/lxd/21835
/dev/loop3 47M 47M 0 100% /snap/snapd/16010
/dev/loop4 45M 45M 0 100% /snap/snapd/15904
/dev/loop5 68M 68M 0 100% /snap/lxd/22753
tmpfs 3.2G 0 3.2G 0% /run/user/1000
Code:
root@gns3vm:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 61.9M 1 loop /snap/core20/1494
loop1 7:1 0 61.9M 1 loop /snap/core20/1518
loop2 7:2 0 67.2M 1 loop /snap/lxd/21835
loop3 7:3 0 47M 1 loop /snap/snapd/16010
loop4 7:4 0 44.7M 1 loop /snap/snapd/15904
loop5 7:5 0 67.8M 1 loop /snap/lxd/22753
sda 8:0 0 19.5G 0 disk
├─sda1 8:1 0 1M 0 part
└─sda2 8:2 0 19.5G 0 part /
sdb 8:16 0 1.5T 0 disk
└─sdb1 8:17 0 1.5T 0 part /opt
Code:
root@gns3vm:~# fdisk -l
Disk /dev/loop0: 61.94 MiB, 64925696 bytes, 126808 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 /dev/loop1: 61.95 MiB, 64933888 bytes, 126824 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 /dev/loop2: 67.25 MiB, 70508544 bytes, 137712 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 /dev/loop3: 46.98 MiB, 49233920 bytes, 96160 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 /dev/loop4: 44.72 MiB, 46870528 bytes, 91544 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 /dev/loop5: 67.83 MiB, 71106560 bytes, 138880 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 /dev/sda: 19.54 GiB, 20971520000 bytes, 40960000 sectors
Disk model: VMware Virtual S
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: BFA768D8-7456-4147-A732-1F8B08825581
Device Start End Sectors Size Type
/dev/sda1 2048 4095 2048 1M BIOS boot
/dev/sda2 4096 40957951 40953856 19.5G Linux filesystem
Disk /dev/sdb: 1.48 TiB, 1610612736000 bytes, 3145728000 sectors
Disk model: VMware Virtual S
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x083b1967
Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 3145727966 3145725919 1.5T 83 Linux