Solved Hard Drive change

Hi everyone,

Due to errors with the boot drive and despite it still working fine I decided to clone it to a brand new drive with a larger capacity using ...

pv -tpreb /dev/ada0 | dd of=/dev/ada2 bs=1G conv=noerror

The cloning completed successfully and I extended the disk using this page ...

https://www.freebsd.org/doc/handbook/disks-growing.html

The new drive successfully boots to a login prompt and no errors are seen. However MySQL refuses to start. The only thing I could find was regarding the location of the "MySQL.sock" file which was missing in the /tmp directory. On the original hard drive the "MySQL.sock" file is there and is of type "socket".

Does this mean DD isn't copying files of this type or if that isn't relevant how do I recreate this "socket" file so I can start MySQL.
 
There shouldn't be a socket file if MySQL was correctly shutdown. That file is only there when MySQL is running.
 
In that case how do I check to see why MySQL isn't starting ?

From what I'm reading dd does a sector by sector copy so everything should be in place.
 
dd(1) does not understand what it copies. It is usually the wrong tool for copying filesystems. Please start a new thread for the MySQL problems, along with a full error message.
 
If dd is the wrong tool for copying filesystems then which tool is?

There is no point in me fixing MySQL if there may be other areas which may also not function correctly.
 
For UFS, dump(8) and restore(8) are usually the best: Backup Options For FreeBSD.

On ZFS, there is zfs send and zfs recv. High-level file copies with cp, scp, rsync, or other file copying utilities can also be used, although some of these have difficulties with special or linked files. rsync(1) has a long list of options for handling things like hard and soft links.
 
Back
Top