A few questions about gmirror.

1. Whether need umount the filesystem?

For example, I mount /dev/da2 as /usr in my fstable, now I want set a mirror for /usr directory.

In such circumstance, whether need umount /usr before config gmirror?

2. It is safe to set gmirror on a system which have been running for a long time?

Acorrding the the handbook 19.4: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/geom-mirror.html

There is a warning:

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.

I don't understand it exactly, but I know geom need save some information on the last sector, so the warning is because of this reason?

If that is the reason, can I go around this problem?

And, it is safe to set gmirror on a system that have been running a long time .
 
fender0107401 said:
1. Whether need umount the filesystem?

For example, I mount /dev/da2 as /usr in my fstable, now I want set a mirror for /usr directory.

In such circumstance, whether need umount /usr before config gmirror?
Depends where you want to configure the mirror. If you want to use da2 for your mirror, you will need to umount /usr first (and backup the data on it beforehand).

fender0107401 said:
2. It is safe to set gmirror on a system which have been running for a long time?
System uptime doesn't matter. What matters is what data is currently on the device you want to use for your mirror. If you've been using it to store data then you should back that data up before configuring a mirror on it.
 
Recently I was thinking about the last sector on my mirror also. If a disk is labeled with "gmirror label" afterwards (means after it is bsdlabeled) then the last sector is used for gmirror metadata. What does this mean as the filesystem doesn't know that it must not touch the last sector anymore? Is the last sector blocked by geom in any way? I mean it's not that destructive with gmirror, but with geli for example it definitely is.
 
Back
Top