gmirror for RAID1

The doc entitled RAID1 - Mirroring states the following:

Warning: Creating a mirror out of the boot drive may result in data loss if any data has been stored on the last sector of the disk. This risk is reduced if creating the mirror is done promptly after a fresh install of FreeBSD.

If I have a machine that is not a fresh install, is there a way to test for this potential problem?

Is there a workaround?

I would like to mirror the drives, but knowing that the procedure "may result in data loss" is prohibitively risky.

Any input would be appreciated.

Thanks.
 
Well, if you used a sane partitioning scheme and you have everything backed up, it shouldn't affect the machine much to have to restore that partition which would be affected, even if you DO overwrite a bit of data.
 
gmirror will prompt when you have data in the sector. If you have data there, it's a bit of work to find out what file occupies it.
Check the fsdb(8) manpage, specifically the findblk command. You can then mv the file to a different partition, then put it back and most likely the file won't occupy that space anymore.
 
Back
Top