December 8, 2022

SharewarePile.com – Latest Web Hosting News

Latest Web Development and Hosting News

Migrating to new drive using Clonezilla

I am running out of disk space on my 1TB drive, most notably on my root partition. So, I thought I should migrate, cloning to a 2TB drive. I thought this would allow me to then use gparted or such to move and resize partitions on the new drive after swapping them out, and having a backup should I mess things up.

I put the new drive into an enclosure and connected it via USB-C. Clonezilla is installed on a thumb drive. Booting the machine with both the new drive and Clonezilla attached, Disks shows three disks, the 1.0 TB, a device just labeled Hard Disk with no size information (Realtek RTL9210 – odd for it is a Samsung drive), and the USB Disk. Clicking on either the original or thumb drive, I see partitions, device names, etc. Whereas the new drive has no data other than device name /dev/sdb. The following probably sheds more light for those of you having greater understanding of these things…

H/W path             Device     Class          Description
==========================================================
/0/100/14/1/4                   storage        USB DISK 3.0
/0/100/17                       storage        Q170/Q150/B150/H170/H110/Z170/CM2
/0/100/1c/0/2/0/0/2             storage        RTL9210B-CG
/0/b                 scsi0      storage        
/0/b/0.0.0           /dev/sda   disk           1TB WDC WDS100T1B0B-
/0/c                 scsi4      storage        
/0/c/0.0.0           /dev/sdb   disk           RTL9210
/0/d                 scsi5      storage        
/0/d/0.0.0           /dev/sdc   disk           31GB USB DISK 3.0
/0/d/0.0.0/0         /dev/sdc   disk           31GB 

Using Clonezilla to do the migration seemed like a no brainer after reading this article: https://www.davidpace.de/linux-server-how-to-clone-a-hd-ssd-to-a-larger-hd-ssd/. I boot into the Clonezilla drive. However, when I get to the step wherein I am supposed to select the target drive, the new drive is not displayed.

Since I have little experience, I presume I might need to initialize the new drive somehow before doing the migration, or, I should be using a different instructions for migration than the ones in the article above said to follow: https://clonezilla.org/fine-print-live-doc.php?path=./clonezilla-live/doc/03_Disk_to_disk_clone/00-prepare-clonezilla-live.doc

NOTE 1: I thought that perhaps I needed to format the drive first. When I select the drive in Disks, only the Edit Mount Options menu item is available from the gear. I see in the main menu there are options for New Disk Image and Attach Disk Image. Perhaps one of these?

NOTE 2: My machine is uEFI.

NOTE3: My source disk has has four partitions. According to the messages I see, it seems it is the root partition that is running out of space, though I am not positive that is what I see. Disk Analyzer often shows “/” as having very little space and I get warnings about low disk space at the same time. I have deleted a bunch of stuff and Disk Analyzer currently shows 7.6 GB, but this is quickly eaten up when I run my development tools (I am a software engineer). Here is the result from lsblk:

lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0    7:0    0     4K  1 loop /snap/bare/5
loop1    7:1    0   114M  1 loop /snap/core/13425
loop2    7:2    0 164.8M  1 loop /snap/gnome-3-28-1804/161
loop3    7:3    0   2.6M  1 loop /snap/gnome-system-monitor/178
loop4    7:4    0 140.7M  1 loop /snap/gnome-3-26-1604/104
loop5    7:5    0 424.2M  1 loop /snap/kde-frameworks-5-91-qt-5-15-3-core20/1
loop6    7:6    0    62M  1 loop /snap/core20/1611
loop7    7:7    0 141.1M  1 loop /snap/chromium/2064
loop8    7:8    0 105.5M  1 loop /snap/slack/64
loop9    7:9    0 883.5M  1 loop /snap/intellij-idea-community/384
loop10   7:10   0  91.7M  1 loop /snap/gtk-common-themes/1535
loop11   7:11   0 175.4M  1 loop /snap/postman/133
loop12   7:12   0  20.6M  1 loop /snap/keepassxc/1563
loop13   7:13   0 303.3M  1 loop /snap/google-cloud-sdk/266
loop14   7:14   0  54.2M  1 loop /snap/snap-store/558
loop15   7:15   0  55.6M  1 loop /snap/core18/2538
loop16   7:16   0 400.8M  1 loop /snap/gnome-3-38-2004/112
loop17   7:17   0  10.7M  1 loop /snap/kubectl/2537
loop18   7:18   0 424.2M  1 loop /snap/kde-frameworks-5-qt-5-15-3-core20/8
loop19   7:19   0   219M  1 loop /snap/gnome-3-34-1804/77
sda      8:0    0 931.5G  0 disk 
├─sda1   8:1    0   512M  0 part /boot/efi
├─sda2   8:2    0  32.8G  0 part /
├─sda3   8:3    0  34.5G  0 part [SWAP]
└─sda4   8:4    0 863.7G  0 part /home
sdc      8:32   1  28.9G  0 disk 
└─sdc1   8:33   1  28.9G  0 part /media/worldwidewilly/USB DISK

What am I missing? Any suggestions?


Go to Source of this post
Author Of this post: Bill Turner
Title Of post: Migrating to new drive using Clonezilla
Author Link: {authorlink}