Fix markup and some typos.
This commit is contained in:
parent
c943ffcc29
commit
d5bd01d213
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=157748
@ -130,7 +130,10 @@ The component devices need to name partitions of type
|
|||||||
as shown by
|
as shown by
|
||||||
.Xr disklabel 8 ) .
|
.Xr disklabel 8 ) .
|
||||||
.Pp
|
.Pp
|
||||||
If you want to use the Linux md(4) compatibility mode, please be sure
|
If you want to use the
|
||||||
|
.Tn Linux
|
||||||
|
.Xr md 4
|
||||||
|
compatibility mode, please be sure
|
||||||
to read the notes in
|
to read the notes in
|
||||||
.Xr ccd 4 .
|
.Xr ccd 4 .
|
||||||
.Sh FILES
|
.Sh FILES
|
||||||
@ -165,13 +168,19 @@ and assigned to ccd0.
|
|||||||
# ccdconfig ccd0 128 CCDF_MIRROR /dev/da8s2 /dev/da9s3
|
# ccdconfig ccd0 128 CCDF_MIRROR /dev/da8s2 /dev/da9s3
|
||||||
.Ed
|
.Ed
|
||||||
.Pp
|
.Pp
|
||||||
The following are matching commands in Linux and FreeBSD to create a
|
The following are matching commands in
|
||||||
raid-0 in Linux and read it from FreeBSD.
|
.Tn Linux
|
||||||
|
and
|
||||||
|
.Fx
|
||||||
|
to create a RAID-0 in
|
||||||
|
.Tn Linux
|
||||||
|
and read it from
|
||||||
|
.Fx .
|
||||||
.Bd -literal
|
.Bd -literal
|
||||||
# Create a raid-0 on Linux:
|
# Create a RAID-0 on Linux:
|
||||||
mdadm --create --chunk=32 --level=0 --raid-devices=2 /dev/md0 \\
|
mdadm --create --chunk=32 --level=0 --raid-devices=2 /dev/md0 \\
|
||||||
/dev/hda1 /dev/hdb1
|
/dev/hda1 /dev/hdb1
|
||||||
# Make the raid-0 just created available on FreeBSD:
|
# Make the RAID-0 just created available on FreeBSD:
|
||||||
ccdconfig -c /dev/ccd0 32 linux /dev/ad0s1 /dev/ad0s2
|
ccdconfig -c /dev/ccd0 32 linux /dev/ad0s1 /dev/ad0s2
|
||||||
.Ed
|
.Ed
|
||||||
.Pp
|
.Pp
|
||||||
|
@ -173,33 +173,80 @@ You cannot replace a disk in a mirrored
|
|||||||
.Nm
|
.Nm
|
||||||
partition without first backing up the partition, then replacing the disk,
|
partition without first backing up the partition, then replacing the disk,
|
||||||
then restoring the partition.
|
then restoring the partition.
|
||||||
.Ss Linux compatibility
|
.Ss Linux Compatibility
|
||||||
The Linux compatibility mode does not try to read the label that Linux'
|
The
|
||||||
md(4) driver leaves on the raw devices. You will have to give the order
|
.Tn Linux
|
||||||
of devices and the interleave factor on your own. When in Linux
|
compatibility mode does not try to read the label that
|
||||||
compatibility mode, ccd will convert the interleave factor from Linux
|
.Tn Linux Ns '
|
||||||
terminology. That means you give the same interleave factor that you
|
.Xr md 4
|
||||||
gave as chunk size in Linux.
|
driver leaves on the raw devices.
|
||||||
|
You will have to give the order
|
||||||
|
of devices and the interleave factor on your own.
|
||||||
|
When in
|
||||||
|
.Tn Linux
|
||||||
|
compatibility mode,
|
||||||
|
.Nm
|
||||||
|
will convert the interleave factor from
|
||||||
|
.Tn Linux
|
||||||
|
terminology.
|
||||||
|
That means you give the same interleave factor that you
|
||||||
|
gave as chunk size in
|
||||||
|
.Tn Linux .
|
||||||
.Pp
|
.Pp
|
||||||
If you have a Linux md(4) device in "legacy" mode, do not use the
|
If you have a
|
||||||
CCD_LINUX flag in
|
.Tn Linux
|
||||||
|
.Xr md 4
|
||||||
|
device in
|
||||||
|
.Dq legacy
|
||||||
|
mode, do not use the
|
||||||
|
.Dv CCDF_LINUX
|
||||||
|
flag in
|
||||||
.Xr ccdconfig 8 .
|
.Xr ccdconfig 8 .
|
||||||
Use the CCD_NO_OFFSET flag instead. In that case you have to convert
|
Use the
|
||||||
the interleave factor on your own, usually it is Linux' chunk size
|
.Dv CCDF_NO_OFFSET
|
||||||
multiplied by two.
|
flag instead.
|
||||||
|
In that case you have to convert
|
||||||
|
the interleave factor on your own, usually it is
|
||||||
|
.Tn Linux Ns '
|
||||||
|
chunk size multiplied by two.
|
||||||
.Pp
|
.Pp
|
||||||
Using a Linux raid this way is potentially dangerous and can destroy
|
Using a
|
||||||
the data in there. Since FreeBSD does not read the label used by
|
.Tn Linux
|
||||||
Linux, changes in Linux might invalidate the compatibility layer.
|
RAID this way is potentially dangerous and can destroy
|
||||||
|
the data in there.
|
||||||
|
Since
|
||||||
|
.Fx
|
||||||
|
does not read the label used by
|
||||||
|
.Tn Linux ,
|
||||||
|
changes in
|
||||||
|
.Tn Linux
|
||||||
|
might invalidate the compatibility layer.
|
||||||
.Pp
|
.Pp
|
||||||
However, using this is reasonably safe if you test the compatibility
|
However, using this is reasonably safe if you test the compatibility
|
||||||
before mounting a raid read-write for the first time. Just using
|
before mounting a RAID read-write for the first time.
|
||||||
ccdconfig without mounting does not write anything to the Linux raid.
|
Just using
|
||||||
Then you do a fsck.ex2fs on the ccd device using the -n flag. You can
|
.Xr ccdconfig 8
|
||||||
mount the filesystem readonly to check files in there. If all this
|
without mounting does not write anything to the
|
||||||
works, it is unlikely that there is a problem with ccd. Keep in mind
|
.Tn Linux
|
||||||
that even when the Linux compatibility mode in ccd is working
|
RAID.
|
||||||
correctly, bugs in FreeBSD's ex2fs implementation would still destroy
|
Then you do a
|
||||||
|
.Nm fsck.ext2fs Pq Pa ports/sysutils/e2fsprogs
|
||||||
|
on the
|
||||||
|
.Nm
|
||||||
|
device using the
|
||||||
|
.Fl n
|
||||||
|
flag.
|
||||||
|
You can mount the file system read-only to check files in there.
|
||||||
|
If all this works, it is unlikely that there is a problem with
|
||||||
|
.Nm .
|
||||||
|
Keep in mind that even when the
|
||||||
|
.Tn Linux
|
||||||
|
compatibility mode in
|
||||||
|
.Nm
|
||||||
|
is working correctly, bugs in
|
||||||
|
.Fx Ap s
|
||||||
|
.Nm ex2fs
|
||||||
|
implementation would still destroy
|
||||||
your data.
|
your data.
|
||||||
.Sh WARNINGS
|
.Sh WARNINGS
|
||||||
If just one (or more) of the disks in a
|
If just one (or more) of the disks in a
|
||||||
|
Loading…
Reference in New Issue
Block a user