ccd.4 (3f4f4a1465e1b9e6174d6bac813020768efd18b3) ccd.4 (d5bd01d2136ab3597c686edfa5b63ba33312c4f8)
1.\" $NetBSD: ccd.4,v 1.5 1995/10/09 06:09:09 thorpej Exp $
2.\"
3.\" Copyright (c) 1994 Jason Downs.
4.\" Copyright (c) 1994, 1995 Jason R. Thorpe.
5.\" All rights reserved.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions

--- 159 unchanged lines hidden (view full) ---

168.Nm
169and one of the disks fail, you cannot mount and use the remaining
170partition as itself; you have to configure it as a one-disk
171.Nm .
172You cannot replace a disk in a mirrored
173.Nm
174partition without first backing up the partition, then replacing the disk,
175then restoring the partition.
1.\" $NetBSD: ccd.4,v 1.5 1995/10/09 06:09:09 thorpej Exp $
2.\"
3.\" Copyright (c) 1994 Jason Downs.
4.\" Copyright (c) 1994, 1995 Jason R. Thorpe.
5.\" All rights reserved.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions

--- 159 unchanged lines hidden (view full) ---

168.Nm
169and one of the disks fail, you cannot mount and use the remaining
170partition as itself; you have to configure it as a one-disk
171.Nm .
172You cannot replace a disk in a mirrored
173.Nm
174partition without first backing up the partition, then replacing the disk,
175then restoring the partition.
176.Ss Linux compatibility
177The Linux compatibility mode does not try to read the label that Linux'
178md(4) driver leaves on the raw devices. You will have to give the order
179of devices and the interleave factor on your own. When in Linux
180compatibility mode, ccd will convert the interleave factor from Linux
181terminology. That means you give the same interleave factor that you
182gave as chunk size in Linux.
176.Ss Linux Compatibility
177The
178.Tn Linux
179compatibility mode does not try to read the label that
180.Tn Linux Ns '
181.Xr md 4
182driver leaves on the raw devices.
183You will have to give the order
184of devices and the interleave factor on your own.
185When in
186.Tn Linux
187compatibility mode,
188.Nm
189will convert the interleave factor from
190.Tn Linux
191terminology.
192That means you give the same interleave factor that you
193gave as chunk size in
194.Tn Linux .
183.Pp
195.Pp
184If you have a Linux md(4) device in "legacy" mode, do not use the
185CCD_LINUX flag in
196If you have a
197.Tn Linux
198.Xr md 4
199device in
200.Dq legacy
201mode, do not use the
202.Dv CCDF_LINUX
203flag in
186.Xr ccdconfig 8 .
204.Xr ccdconfig 8 .
187Use the CCD_NO_OFFSET flag instead. In that case you have to convert
188the interleave factor on your own, usually it is Linux' chunk size
189multiplied by two.
205Use the
206.Dv CCDF_NO_OFFSET
207flag instead.
208In that case you have to convert
209the interleave factor on your own, usually it is
210.Tn Linux Ns '
211chunk size multiplied by two.
190.Pp
212.Pp
191Using a Linux raid this way is potentially dangerous and can destroy
192the data in there. Since FreeBSD does not read the label used by
193Linux, changes in Linux might invalidate the compatibility layer.
213Using a
214.Tn Linux
215RAID this way is potentially dangerous and can destroy
216the data in there.
217Since
218.Fx
219does not read the label used by
220.Tn Linux ,
221changes in
222.Tn Linux
223might invalidate the compatibility layer.
194.Pp
195However, using this is reasonably safe if you test the compatibility
224.Pp
225However, using this is reasonably safe if you test the compatibility
196before mounting a raid read-write for the first time. Just using
197ccdconfig without mounting does not write anything to the Linux raid.
198Then you do a fsck.ex2fs on the ccd device using the -n flag. You can
199mount the filesystem readonly to check files in there. If all this
200works, it is unlikely that there is a problem with ccd. Keep in mind
201that even when the Linux compatibility mode in ccd is working
202correctly, bugs in FreeBSD's ex2fs implementation would still destroy
226before mounting a RAID read-write for the first time.
227Just using
228.Xr ccdconfig 8
229without mounting does not write anything to the
230.Tn Linux
231RAID.
232Then you do a
233.Nm fsck.ext2fs Pq Pa ports/sysutils/e2fsprogs
234on the
235.Nm
236device using the
237.Fl n
238flag.
239You can mount the file system read-only to check files in there.
240If all this works, it is unlikely that there is a problem with
241.Nm .
242Keep in mind that even when the
243.Tn Linux
244compatibility mode in
245.Nm
246is working correctly, bugs in
247.Fx Ap s
248.Nm ex2fs
249implementation would still destroy
203your data.
204.Sh WARNINGS
205If just one (or more) of the disks in a
206.Nm
207fails, the entire
208file system will be lost unless you are mirroring the disks.
209.Pp
210If one of the disks in a mirror is lost, you should still

--- 30 unchanged lines hidden ---
250your data.
251.Sh WARNINGS
252If just one (or more) of the disks in a
253.Nm
254fails, the entire
255file system will be lost unless you are mirroring the disks.
256.Pp
257If one of the disks in a mirror is lost, you should still

--- 30 unchanged lines hidden ---