I got "mount: /dev/ada0p1: No such file or directory" problem

I just had the same problem with my FreeBSD desktop PC (/dev/ada0p1 got corrupted), no idea how or why it happened, but luckily I use a ZFS mirror, so a simple cat /dev/ada1p1 > /dev/ada0p1 made my system boot again. The /dev/ada0p1 partition is still marked as dirty, so I need to fix that next - but everything else is working again. :)
Please please don't do this. And anyone who reads this, don't copy that mistake.

To begin with, every ZFS physical disk has a signature written on it. Now you have two disks with the same signature, meaning two disks that ZFS sort of thinks are identical (except that they have different physical hardware being used, but I don't know whether ZFS checks that). Next, there is no guarantee that the data structures on two physical volumes of a mirror are identical; matter-of-fact, if the mirror was running in degraded mode or was resilvered, they probably are not. And you did all the copying without checksum verification, so if there were any errors on the source disk, you now replicated the errors and wiped out the only good copy (which was perhaps no longer reachable). Lastly, this is inefficient, as you end up copying lots of unallocated disk space needlessly.

The correct way to do this is to use ZFS internal commands to rebuild the mirror.
 
Which ZFS commands are you referring to?
I just did a zfs scrub but there were no errors.
If all fails I'll just reinstall FreeBSD and restore from backup...
zpool replace. Please read the man pages yourself; the last time I had to use it, I also read the ZFS section of the handbook first, it has great examples.
 
zpool replace. Please read the man pages yourself; the last time I had to use it, I also read the ZFS section of the handbook first, it has great examples.
As a pleasant side effect, while reading the ZFS chapter of the Handbook, I found a solution to another problem I've been having, I really should read the Handbook more often.

Edit

I just tried to go into single user mode, but that is as far as I can get:
Before I did the dirty "fix", FreeBSD would not even boot, showing a similar pattern...
I'd say I'm better off going the reinstall route, as I don't know if this is fixable (or worth my time).
FreeBSD Single User Mode.jpg
 
From the boot loader use GOP (Graphics Output Protocol) to change the resolution.
gop list
gop set {number}
boot

Edit:
pls don't mix different topics in one forum thread
 
Back
Top