Getting new hardware - can I just move the disk?

Bo Berglund bo.berglund at gmail.com
Mon Oct 11 07:40:22 UTC 2021


On Sun, 10 Oct 2021 12:54:42 +0200, Liam Proven <lproven at gmail.com> wrote:

>> Well, I have this in /etc/fstab so I guess it is moved to use UID-strings
>> instead of drive names:
>>
>> # <file system> <mount point>   <type>  <options>       <dump>  <pass>
>> # / was on /dev/sda1 during installation
>> UUID=ec0e8708-8a6a-4bbf-93ba-0a09b1e2ddc1 /               ext4
>> errors=remount-ro 0       1
>> # swap was on /dev/sda5 during installation
>> UUID=a77b40db-2377-4d25-b304-8d233664d1ca none            swap    sw
>> 0       0
>>
>> And checking with df shows sda in use
>> (I have removed lines showing external mounts):
>
>If it were me, I'd change to /dev/sdX notation, copy it, then once
>working, change it back. Depending on how you copy the disks, GUIDs
>might not be copied.
>

I checked in the GParted documentation here:
https://gparted.org/display-doc.php%3Fname%3Dhelp-manual#gparted-copy-and-paste-partition

It looks like a copy of a partition from a disk to anaother actually also copies
the UUID!
Here is what it says:
"The copy of the partition has the same file system label and Universally Unique
Identifier (UUID) as the source partition. This can cause a problem when
booting, or when mount actions use the file system label or UUID to identify the
partition. "

In my case it will be fine, in fact better since no matter what the device the
copy winds up as its UUID will match what is in /etc/fstab so it will be mounted
correctly!

I have still to find a time to do the disk partition copy to the new SSD since
the server is busy most hours of the day...

ADDITIONAL QUESTION ABOUT GParted:
---------------------------------
When I copy a partition from one disk to another (as I will in this case) does
it copy all of the bytes in the partition so it processes all of the 500GB of
data even though the 500GB partition only contains 40 GB of file data (as
reported by df -h or similar utilities?

I am asking because I need the cloning to be fast since the system has to be
taken down during the process and I want to limit the down time.
I actually have a video store on the drive of about 180GB and if I delete these
will GParted copy the partition quicker?
Or is it actually doing a byte-by-byte copy so it does not matter?


-- 
Bo Berglund
Developer in Sweden





More information about the ubuntu-users mailing list