1 .\" Hey, Emacs, edit this file in -*- nroff-fill -*- mode
3 .\" Copyright (c) 1997, 1998
4 .\" Nan Yang Computer Services Limited. All rights reserved.
6 .\" This software is distributed under the so-called ``Berkeley
9 .\" Redistribution and use in source and binary forms, with or without
10 .\" modification, are permitted provided that the following conditions
12 .\" 1. Redistributions of source code must retain the above copyright
13 .\" notice, this list of conditions and the following disclaimer.
14 .\" 2. Redistributions in binary form must reproduce the above copyright
15 .\" notice, this list of conditions and the following disclaimer in the
16 .\" documentation and/or other materials provided with the distribution.
17 .\" 3. All advertising materials mentioning features or use of this software
18 .\" must display the following acknowledgement:
19 .\" This product includes software developed by Nan Yang Computer
21 .\" 4. Neither the name of the Company nor the names of its contributors
22 .\" may be used to endorse or promote products derived from this software
23 .\" without specific prior written permission.
25 .\" This software is provided ``as is'', and any express or implied
26 .\" warranties, including, but not limited to, the implied warranties of
27 .\" merchantability and fitness for a particular purpose are disclaimed.
28 .\" In no event shall the company or contributors be liable for any
29 .\" direct, indirect, incidental, special, exemplary, or consequential
30 .\" damages (including, but not limited to, procurement of substitute
31 .\" goods or services; loss of use, data, or profits; or business
32 .\" interruption) however caused and on any theory of liability, whether
33 .\" in contract, strict liability, or tort (including negligence or
34 .\" otherwise) arising in any way out of the use of this software, even if
35 .\" advised of the possibility of such damage.
37 .\" $FreeBSD: src/share/man/man4/vinum.4,v 1.22.2.9 2002/04/22 08:19:35 kuriyama Exp $
44 .Nd Logical Volume Manager
46 .Cd "pseudo-device vinum"
49 is a logical volume manager inspired by, but not derived from, the Veritas
51 It provides the following features:
54 It provides device-independent logical disks, called
57 not restricted to the size of any disk on the system.
59 The volumes consist of one or more
61 each of which contain the
62 entire address space of a volume.
63 This represents an implementation of RAID-1
65 Multiple plexes can also be used for
66 .\" XXX What about sparse plexes? Do we want them?
69 Increased read throughput.
71 will read data from the least active disk, so if a volume has plexes on multiple
72 disks, more data can be read in parallel.
74 reads data from only one plex, but it writes data to all plexes.
76 Increased reliability.
77 By storing plexes on different disks, data will remain
78 available even if one of the plexes becomes unavailable.
80 RAID-5 plex (see below), using multiple plexes requires more storage space, but
81 gives better performance, particularly in the case of a drive failure.
83 Additional plexes can be used for on-line data reorganization.
85 additional plex and subsequently detaching one of the older plexes, data can be
86 moved on-line without compromising access.
88 An additional plex can be used to obtain a consistent dump of a file system.
90 attaching an additional plex and detaching at a specific time, the detached plex
91 becomes an accurate snapshot of the file system at the time of detachment.
92 .\" Make sure to flush!
95 Each plex consists of one or more logical disk slices, called
97 Subdisks are defined as a contiguous block of physical disk storage.
99 consist of any reasonable number of subdisks (in other words, the real limit is
100 not the number, but other factors, such as memory and performance, associated
101 with maintaining a large number of subdisks).
103 A number of mappings between subdisks and plexes are available:
106 .Em "Concatenated plexes"
107 consist of one or more subdisks, each of which
108 is mapped to a contiguous part of the plex address space.
111 consist of two or more subdisks of equal size.
113 address space is mapped in
115 integral fractions of the subdisk
117 Consecutive plex address space is mapped to stripes in each subdisk in
131 "plex 0" at SD0.n+(0,.2)
132 "subdisk 0" rjust at SD0.w-(.2,0)
133 "subdisk 1" rjust at SD1.w-(.2,0)
134 "subdisk 2" rjust at SD2.w-(.2,0)
138 The subdisks of a striped plex must all be the same size.
141 require at least three equal-sized subdisks.
143 resemble striped plexes, except that in each stripe, one subdisk stores parity
145 This subdisk changes in each stripe: in the first stripe, it is the
146 first subdisk, in the second it is the second subdisk, etc.
150 will recover the data based on the information stored on the remaining subdisks.
151 This mapping is particularly suited to read-intensive access.
153 RAID-5 plex must all be the same size.
154 .\" Make sure to flush!
158 are the lowest level of the storage hierarchy.
159 They represent disk special
163 offers automatic startup.
168 volumes contain all the configuration information needed to ensure that they are
169 started correctly when the subsystem is enabled.
170 This is also a significant
171 advantage over the Veritas\(tm File System.
172 This feature regards the presence
174 It does not mean that the volumes will be mounted
175 automatically, since the standard startup procedures with
177 perform this function.
179 .Sh KERNEL CONFIGURATION
181 is currently supplied as a KLD module, and does not require
183 As with other klds, it is absolutely necessary to match the kld
184 to the version of the operating system.
185 Failure to do so will cause
187 to issue an error message and terminate.
189 It is possible to configure
191 in the kernel, but this is not recommended.
192 To do so, add this line to the
193 kernel configuration file:
195 .D1 Cd "pseudo-device vinum"
197 The current version of
199 both the kernel module and the user program
201 include significant debugging support.
202 It is not recommended to remove
203 this support at the moment, but if you do you must remove it from both the
204 kernel and the user components.
205 To do this, edit the files
206 .Pa /usr/src/sbin/vinum/Makefile
208 .Pa /sys/dev/raid/vinum/Makefile
211 variable to remove the
217 into the kernel, either specify the line
219 .D1 Cd "options VINUMDEBUG"
221 in the kernel configuration file or remove the
224 .Pa /usr/src/sbin/vinum/Makefile
229 variables do not match,
231 will fail with a message
232 explaining the problem and what to do to correct it.
235 was previously available in two versions: a freely available version which did
236 not contain RAID-5 functionality, and a full version including RAID-5
237 functionality, which was available only from Cybernet Systems Inc.
241 includes the RAID-5 functionality.
247 It does not require installation.
248 To start it, start the
250 program, which will load the kld if it is not already present.
253 it must be configured.
256 for information on how to create a
260 Normally, you start a configured version of
278 is loaded as a kld (the recommended way), the
280 command will unload it
283 You can also do this with the
287 The kld can only be unloaded when idle, in other words when no volumes are
288 mounted and no other instances of the
291 Unloading the kld does not harm the data in the volumes.
292 .Ss Configuring and Starting Objects
295 utility to configure and start
300 calls are intended for the use of the
302 configuration program only.
303 They are described in the header file
304 .Pa /sys/dev/raid/vinum/vinumio.h .
306 Conventional disk special devices have a
308 in the second sector of the device.
312 This disk label describes the layout of the partitions within
315 does not subdivide volumes, so volumes do not contain a physical disk label.
318 implements the ioctl calls
322 (get partition information),
324 (write partition information) and
326 (set partition information).
331 representation of the disk label which is not present on the volume.
343 serves no useful purpose on a
351 .Dv DIOCSDINFO ioctls, since there is nothing to change.
352 As a result, any attempt to modify the disk label will be silently ignored.
353 .Sh MAKING FILE SYSTEMS
356 volumes do not contain partitions, the names do not need to conform to the
357 standard rules for naming disk partitions.
358 For a physical disk partition, the
359 last letter of the device name specifies the partition identifier (a to p).
361 volumes need not conform to this convention, but if they do not,
363 will complain that it cannot determine the partition.
364 To solve this problem,
369 For example, if you have a volume
371 use the following command to create a
375 .Dl "newfs -v /dev/vinum/concat"
378 assigns default names to plexes and subdisks, although they may be overridden.
379 We do not recommend overriding the default names.
382 volume manager, which allows arbitrary naming of objects, has shown that this
383 flexibility does not bring a significant advantage, and it can cause confusion.
385 Names may contain any non-blank character, but it is recommended to restrict
386 them to letters, digits and the underscore characters.
387 The names of volumes,
388 plexes and subdisks may be up to 64 characters long, and the names of drives may
389 up to 32 characters long.
390 When choosing volume and plex names, bear in mind
391 that automatically generated plex and subdisk names are longer than the name
392 from which they are derived.
397 creates or deletes objects, it creates a directory
399 in which it makes device entries for each volume.
405 in which it stores device entries for the plexes and subdisks. In addition, it
406 creates two more directories,
409 .Pa /dev/vinum/drive ,
410 in which it stores hierarchical information for volumes and drives.
414 creates three super-devices,
415 .Pa /dev/vinum/control ,
416 .Pa /dev/vinum/Control
418 .Pa /dev/vinum/controld .
419 .Pa /dev/vinum/control
422 when it has been compiled without the
425 .Pa /dev/vinum/Control
428 when it has been compiled with the
431 .Pa /dev/vinum/controld
435 The two control devices for
437 are used to synchronize the debug status of kernel and user modules.
443 volumes are not subdivided into partitions, and thus do not contain a disk
445 Unfortunately, this confuses a number of utilities, notably
447 which normally tries to interpret the last letter of a
449 volume name as a partition identifier.
450 If you use a volume name which does not
459 in order to tell it to ignore this convention.
462 Plexes do not need to be assigned explicit names.
463 By default, a plex name is
464 the name of the volume followed by the letters
466 and the number of the
468 For example, the plexes of volume
471 .Pa vol3.p0 , vol3.p1
473 These names can be overridden, but it is not recommended.
475 Like plexes, subdisks are assigned names automatically, and explicit naming is
477 A subdisk name is the name of the plex followed by the letters
479 and a number identifying the subdisk.
480 For example, the subdisks of
484 .Pa vol3.p0.s0 , vol3.p0.s1
490 This makes it possible to move a drive to a different location
491 and still recognize it automatically.
492 Drive names may be up to 32 characters
498 objects described in the section
499 .Sx "CONFIGURATION FILE"
505 .Bd -literal -offset indent
508 crwxr-xr-- 1 root wheel 91, 2 Mar 30 16:08 concat
509 crwx------ 1 root wheel 91, 0x40000000 Mar 30 16:08 control
510 crwx------ 1 root wheel 91, 0x40000001 Mar 30 16:08 controld
511 drwxrwxrwx 2 root wheel 512 Mar 30 16:08 drive
512 drwxrwxrwx 2 root wheel 512 Mar 30 16:08 plex
513 drwxrwxrwx 2 root wheel 512 Mar 30 16:08 rvol
514 drwxrwxrwx 2 root wheel 512 Mar 30 16:08 sd
515 crwxr-xr-- 1 root wheel 91, 3 Mar 30 16:08 strcon
516 crwxr-xr-- 1 root wheel 91, 1 Mar 30 16:08 stripe
517 crwxr-xr-- 1 root wheel 91, 0 Mar 30 16:08 tinyvol
518 drwxrwxrwx 7 root wheel 512 Mar 30 16:08 vol
519 crwxr-xr-- 1 root wheel 91, 4 Mar 30 16:08 vol5
523 crw-r----- 1 root operator 4, 15 Oct 21 16:51 drive2
524 crw-r----- 1 root operator 4, 31 Oct 21 16:51 drive4
528 crwxr-xr-- 1 root wheel 91, 0x10000002 Mar 30 16:08 concat.p0
529 crwxr-xr-- 1 root wheel 91, 0x10010002 Mar 30 16:08 concat.p1
530 crwxr-xr-- 1 root wheel 91, 0x10000003 Mar 30 16:08 strcon.p0
531 crwxr-xr-- 1 root wheel 91, 0x10010003 Mar 30 16:08 strcon.p1
532 crwxr-xr-- 1 root wheel 91, 0x10000001 Mar 30 16:08 stripe.p0
533 crwxr-xr-- 1 root wheel 91, 0x10000000 Mar 30 16:08 tinyvol.p0
534 crwxr-xr-- 1 root wheel 91, 0x10000004 Mar 30 16:08 vol5.p0
535 crwxr-xr-- 1 root wheel 91, 0x10010004 Mar 30 16:08 vol5.p1
539 crwxr-xr-- 1 root wheel 91, 0x20000002 Mar 30 16:08 concat.p0.s0
540 crwxr-xr-- 1 root wheel 91, 0x20100002 Mar 30 16:08 concat.p0.s1
541 crwxr-xr-- 1 root wheel 91, 0x20010002 Mar 30 16:08 concat.p1.s0
542 crwxr-xr-- 1 root wheel 91, 0x20000003 Mar 30 16:08 strcon.p0.s0
543 crwxr-xr-- 1 root wheel 91, 0x20100003 Mar 30 16:08 strcon.p0.s1
544 crwxr-xr-- 1 root wheel 91, 0x20010003 Mar 30 16:08 strcon.p1.s0
545 crwxr-xr-- 1 root wheel 91, 0x20110003 Mar 30 16:08 strcon.p1.s1
546 crwxr-xr-- 1 root wheel 91, 0x20000001 Mar 30 16:08 stripe.p0.s0
547 crwxr-xr-- 1 root wheel 91, 0x20100001 Mar 30 16:08 stripe.p0.s1
548 crwxr-xr-- 1 root wheel 91, 0x20000000 Mar 30 16:08 tinyvol.p0.s0
549 crwxr-xr-- 1 root wheel 91, 0x20100000 Mar 30 16:08 tinyvol.p0.s1
550 crwxr-xr-- 1 root wheel 91, 0x20000004 Mar 30 16:08 vol5.p0.s0
551 crwxr-xr-- 1 root wheel 91, 0x20100004 Mar 30 16:08 vol5.p0.s1
552 crwxr-xr-- 1 root wheel 91, 0x20010004 Mar 30 16:08 vol5.p1.s0
553 crwxr-xr-- 1 root wheel 91, 0x20110004 Mar 30 16:08 vol5.p1.s1
557 crwxr-xr-- 1 root wheel 91, 2 Mar 30 16:08 concat
558 drwxr-xr-x 4 root wheel 512 Mar 30 16:08 concat.plex
559 crwxr-xr-- 1 root wheel 91, 3 Mar 30 16:08 strcon
560 drwxr-xr-x 4 root wheel 512 Mar 30 16:08 strcon.plex
561 crwxr-xr-- 1 root wheel 91, 1 Mar 30 16:08 stripe
562 drwxr-xr-x 3 root wheel 512 Mar 30 16:08 stripe.plex
563 crwxr-xr-- 1 root wheel 91, 0 Mar 30 16:08 tinyvol
564 drwxr-xr-x 3 root wheel 512 Mar 30 16:08 tinyvol.plex
565 crwxr-xr-- 1 root wheel 91, 4 Mar 30 16:08 vol5
566 drwxr-xr-x 4 root wheel 512 Mar 30 16:08 vol5.plex
568 /dev/vinum/vol/concat.plex:
570 crwxr-xr-- 1 root wheel 91, 0x10000002 Mar 30 16:08 concat.p0
571 drwxr-xr-x 2 root wheel 512 Mar 30 16:08 concat.p0.sd
572 crwxr-xr-- 1 root wheel 91, 0x10010002 Mar 30 16:08 concat.p1
573 drwxr-xr-x 2 root wheel 512 Mar 30 16:08 concat.p1.sd
575 /dev/vinum/vol/concat.plex/concat.p0.sd:
577 crwxr-xr-- 1 root wheel 91, 0x20000002 Mar 30 16:08 concat.p0.s0
578 crwxr-xr-- 1 root wheel 91, 0x20100002 Mar 30 16:08 concat.p0.s1
580 /dev/vinum/vol/concat.plex/concat.p1.sd:
582 crwxr-xr-- 1 root wheel 91, 0x20010002 Mar 30 16:08 concat.p1.s0
584 /dev/vinum/vol/strcon.plex:
586 crwxr-xr-- 1 root wheel 91, 0x10000003 Mar 30 16:08 strcon.p0
587 drwxr-xr-x 2 root wheel 512 Mar 30 16:08 strcon.p0.sd
588 crwxr-xr-- 1 root wheel 91, 0x10010003 Mar 30 16:08 strcon.p1
589 drwxr-xr-x 2 root wheel 512 Mar 30 16:08 strcon.p1.sd
591 /dev/vinum/vol/strcon.plex/strcon.p0.sd:
593 crwxr-xr-- 1 root wheel 91, 0x20000003 Mar 30 16:08 strcon.p0.s0
594 crwxr-xr-- 1 root wheel 91, 0x20100003 Mar 30 16:08 strcon.p0.s1
596 /dev/vinum/vol/strcon.plex/strcon.p1.sd:
598 crwxr-xr-- 1 root wheel 91, 0x20010003 Mar 30 16:08 strcon.p1.s0
599 crwxr-xr-- 1 root wheel 91, 0x20110003 Mar 30 16:08 strcon.p1.s1
601 /dev/vinum/vol/stripe.plex:
603 crwxr-xr-- 1 root wheel 91, 0x10000001 Mar 30 16:08 stripe.p0
604 drwxr-xr-x 2 root wheel 512 Mar 30 16:08 stripe.p0.sd
606 /dev/vinum/vol/stripe.plex/stripe.p0.sd:
608 crwxr-xr-- 1 root wheel 91, 0x20000001 Mar 30 16:08 stripe.p0.s0
609 crwxr-xr-- 1 root wheel 91, 0x20100001 Mar 30 16:08 stripe.p0.s1
611 /dev/vinum/vol/tinyvol.plex:
613 crwxr-xr-- 1 root wheel 91, 0x10000000 Mar 30 16:08 tinyvol.p0
614 drwxr-xr-x 2 root wheel 512 Mar 30 16:08 tinyvol.p0.sd
616 /dev/vinum/vol/tinyvol.plex/tinyvol.p0.sd:
618 crwxr-xr-- 1 root wheel 91, 0x20000000 Mar 30 16:08 tinyvol.p0.s0
619 crwxr-xr-- 1 root wheel 91, 0x20100000 Mar 30 16:08 tinyvol.p0.s1
621 /dev/vinum/vol/vol5.plex:
623 crwxr-xr-- 1 root wheel 91, 0x10000004 Mar 30 16:08 vol5.p0
624 drwxr-xr-x 2 root wheel 512 Mar 30 16:08 vol5.p0.sd
625 crwxr-xr-- 1 root wheel 91, 0x10010004 Mar 30 16:08 vol5.p1
626 drwxr-xr-x 2 root wheel 512 Mar 30 16:08 vol5.p1.sd
628 /dev/vinum/vol/vol5.plex/vol5.p0.sd:
630 crwxr-xr-- 1 root wheel 91, 0x20000004 Mar 30 16:08 vol5.p0.s0
631 crwxr-xr-- 1 root wheel 91, 0x20100004 Mar 30 16:08 vol5.p0.s1
633 /dev/vinum/vol/vol5.plex/vol5.p1.sd:
635 crwxr-xr-- 1 root wheel 91, 0x20010004 Mar 30 16:08 vol5.p1.s0
636 crwxr-xr-- 1 root wheel 91, 0x20110004 Mar 30 16:08 vol5.p1.s1
639 In the case of unattached plexes and subdisks, the naming is reversed.
641 are named after the disk on which they are located, and plexes are named after
645 This mapping is still to be determined.
654 uses this state to determine the handling of the object.
656 Volumes may have the following states:
659 The volume is completely inaccessible.
661 The volume is up and at least partially functional.
662 Not all plexes may be
666 Plexes may have the following states:
669 A plex entry which has been referenced as part of a volume, but which is
672 A plex which has gone completely down because of I/O errors.
674 A plex which has been taken down by the administrator.
676 A plex which is being initialized.
679 The remaining states represent plexes which are at least partially up.
682 A plex entry which is at least partially up.
683 Not all subdisks are available,
684 and an inconsistency has occurred.
685 If no other plex is uncorrupted, the volume
686 is no longer consistent.
688 A RAID-5 plex entry which is accessible, but one subdisk is down, requiring
689 recovery for many I/O requests.
691 A plex which is really up, but which has a reborn subdisk which we do not
692 completely trust, and which we do not want to read if we can avoid it.
694 A plex entry which is completely up.
698 Subdisks can have the following states:
701 A subdisk entry which has been created completely.
702 All fields are correct, and
703 the disk has been updated, but the on the disk is not valid.
705 A subdisk entry which has been referenced as part of a plex, but which is
708 A subdisk entry which has been created completely and which is currently being
712 The following states represent invalid data.
715 A subdisk entry which has been created completely.
716 All fields are correct, the
717 config on disk has been updated, and the data was valid, but since then the
718 drive has been taken down, and as a result updates have been missed.
720 A subdisk entry which has been created completely.
721 All fields are correct, the
722 disk has been updated, and the data was valid, but since then the drive has been
723 crashed and updates have been lost.
726 The following states represent valid, inaccessible data.
729 A subdisk entry which has been created completely.
730 All fields are correct, the
731 disk has been updated, and the data was valid, but since then the drive has gone
733 No attempt has been made to write to the subdisk since the crash, so the
736 A subdisk entry which was up, which contained valid data, and which was taken
737 down by the administrator.
740 The subdisk is currently in the process of being revived.
745 The following states represent accessible subdisks with valid data.
748 A subdisk entry which has been created completely.
749 All fields are correct, the
750 disk has been updated, and the data was valid, but since then the drive has gone
752 No updates were lost, but it is possible that the subdisk
754 We won't read from this subdisk if we have a choice.
756 is the only subdisk which covers this address space in the plex, we set its
757 state to up under these circumstances, so this status implies that there is
758 another subdisk to fulfil the request.
760 A subdisk entry which has been created completely.
761 All fields are correct, the
762 disk has been updated, and the data is valid.
765 Drives can have the following states:
768 At least one subdisk refers to the drive, but it is not currently accessible to
770 No device name is known.
772 The drive is not accessible.
774 The drive is up and running.
776 .Sh DEBUGGING PROBLEMS WITH VINUM
777 Solving problems with
779 can be a difficult affair.
780 This section suggests some approaches.
781 .Ss Configuration problems
782 It is relatively easy (too easy) to run into problems with the
785 If you do, the first thing you should do is stop configuration
788 .Dl "vinum setdaemon 4"
790 This will stop updates and any further corruption of the on-disk configuration.
792 Next, look at the on-disk configuration with the
794 command, for example:
798 # \fBvinum dumpconfig\fP
799 Drive 4: Device /dev/da3s0h
800 Created on crash.lemis.com at Sat May 20 16:32:44 2000
801 Config last updated Sat May 20 16:32:56 2000
802 Size: 601052160 bytes (573 MB)
805 volume raid state down
808 plex name obj.p0 state corrupt org concat vol obj
809 plex name obj.p1 state corrupt org striped 128b vol obj
810 plex name src.p0 state corrupt org striped 128b vol src
811 plex name src.p1 state up org concat vol src
812 plex name raid.p0 state faulty org disorg vol raid
813 plex name r.p0 state faulty org disorg vol r
814 plex name foo.p0 state up org concat vol foo
815 plex name foo.p1 state faulty org concat vol foo
816 sd name obj.p0.s0 drive drive2 plex obj.p0 state reborn len 409600b driveoffset 265b plexoffset 0b
817 sd name obj.p0.s1 drive drive4 plex obj.p0 state up len 409600b driveoffset 265b plexoffset 409600b
818 sd name obj.p1.s0 drive drive1 plex obj.p1 state up len 204800b driveoffset 265b plexoffset 0b
819 sd name obj.p1.s1 drive drive2 plex obj.p1 state reborn len 204800b driveoffset 409865b plexoffset 128b
820 sd name obj.p1.s2 drive drive3 plex obj.p1 state up len 204800b driveoffset 265b plexoffset 256b
821 sd name obj.p1.s3 drive drive4 plex obj.p1 state up len 204800b driveoffset 409865b plexoffset 384b
826 The configuration on all disks should be the same.
827 If this is not the case,
828 please save the output to a file and report the problem.
830 little that can be done to recover the on-disk configuration, but if you keep a
831 copy of the files used to create the objects, you should be able to re-create
835 command does not change the subdisk data, so this will not cause data
837 You may need to use the
839 command if you have this kind of trouble.
841 In order to analyse a panic which you suspect comes from
843 you will need to build a debug kernel.
844 See the online handbook at
845 .Pa http://www.dragonflybsd.org/docs/user/list/DebugKernelCrashDumps/
846 for more details of how to do this.
848 Perform the following steps to analyse a
853 Copy the following files to the directory in which you will be
854 performing the analysis, typically
859 .Pa /sys/dev/raid/vinum/.gdbinit.crash ,
861 .Pa /sys/dev/raid/vinum/.gdbinit.kernel ,
863 .Pa /sys/dev/raid/vinum/.gdbinit.serial ,
865 .Pa /sys/dev/raid/vinum/.gdbinit.vinum
868 .Pa /sys/dev/raid/vinum/.gdbinit.vinum.paths
871 Make sure that you build the
873 module with debugging information.
876 builds a module with debugging symbols by default.
881 does not contain symbols, you will not get an error message, but the stack trace
882 will not show the symbols.
883 Check the module before starting
886 $ file /boot/kernel/vinum.ko
887 /boot/kernel/vinum.ko: ELF 32-bit LSB shared object, Intel 80386,
888 version 1 (SYSV), dynamically linked, not stripped
891 If the output shows that
892 .Pa /boot/kernel/vinum.ko
893 is stripped, you will have to find a version which is not.
896 .Pa /usr/obj/usr/src/sys/SYSTEM_NAME/usr/src/sys/dev/raid/vinum/vinum.ko
900 .Dq Li "make world" )
902 .Pa /sys/dev/raid/vinum/vinum.ko
907 .Pa .gdbinit.vinum.paths
910 Either take a dump or use remote serial
912 to analyse the problem.
913 To analyse a dump, say
914 .Pa /var/crash/vmcore.5 ,
916 .Pa /var/crash/.gdbinit.crash
918 .Pa /var/crash/.gdbinit
920 .Bd -literal -offset indent
922 kgdb kernel.debug vmcore.5
925 This example assumes that you have installed the correct debug kernel at
926 .Pa /var/crash/kernel.debug .
927 If not, substitute the correct name of the debug kernel.
929 To perform remote serial debugging,
931 .Pa /var/crash/.gdbinit.serial
933 .Pa /var/crash/.gdbinit
935 .Bd -literal -offset indent
942 file performs the functions necessary to establish connection.
944 machine must already be in debug mode: enter the kernel debugger and select
951 file expects the serial connection to run at 38400 bits per second; if you run
952 at a different speed, edit the file accordingly (look for the
956 The following example shows a remote debugging session using the
963 GDB 4.16 (i386-unknown-dragonfly), Copyright 1996 Free Software Foundation, Inc.
964 Debugger (msg=0xf1093174 "vinum debug") at ../../i386/i386/db_interface.c:318
966 #1 0xf108d9bc in vinumioctl (dev=0x40001900, cmd=0xc008464b, data=0xf6dedee0 "",
967 flag=0x3, p=0xf68b7940) at
968 /usr/src/sys/dev/raid/vinum/vinumioctl.c:102
969 102 Debugger ("vinum debug");
971 #0 Debugger (msg=0xf0f661ac "vinum debug") at ../../i386/i386/db_interface.c:318
972 #1 0xf0f60a7c in vinumioctl (dev=0x40001900, cmd=0xc008464b, data=0xf6923ed0 "",
973 flag=0x3, p=0xf688e6c0) at
974 /usr/src/sys/dev/raid/vinum/vinumioctl.c:109
975 #2 0xf01833b7 in spec_ioctl (ap=0xf6923e0c) at ../../miscfs/specfs/spec_vnops.c:424
976 #3 0xf0182cc9 in spec_vnoperate (ap=0xf6923e0c) at ../../miscfs/specfs/spec_vnops.c:129
977 #4 0xf01eb3c1 in ufs_vnoperatespec (ap=0xf6923e0c) at ../../ufs/ufs/ufs_vnops.c:2312
978 #5 0xf017dbb1 in vn_ioctl (fp=0xf1007ec0, com=0xc008464b, data=0xf6923ed0 "",
979 p=0xf688e6c0) at vnode_if.h:395
980 #6 0xf015dce0 in ioctl (p=0xf688e6c0, uap=0xf6923f84) at ../../kern/sys_generic.c:473
981 #7 0xf0214c0b in syscall (frame={tf_es = 0x27, tf_ds = 0x27, tf_edi = 0xefbfcff8,
982 tf_esi = 0x1, tf_ebp = 0xefbfcf90, tf_isp = 0xf6923fd4, tf_ebx = 0x2,
983 tf_edx = 0x804b614, tf_ecx = 0x8085d10, tf_eax = 0x36, tf_trapno = 0x7,
984 tf_err = 0x2, tf_eip = 0x8060a34, tf_cs = 0x1f, tf_eflags = 0x286,
985 tf_esp = 0xefbfcf78, tf_ss = 0x27}) at ../../i386/i386/trap.c:1100
986 #8 0xf020a1fc in Xint0x80_syscall ()
987 #9 0x804832d in ?? ()
988 #10 0x80482ad in ?? ()
989 #11 0x80480e9 in ?? ()
994 When entering from the debugger, it is important that the source of frame 1
997 file at the top of the example) contains the text
998 .Dq Li "Debugger (\*[q]vinum debug\*[q]);" .
1000 This is an indication that the address specifications are correct.
1002 some other output, your symbols and the kernel module are out of sync, and the
1003 trace will be meaningless.
1006 For an initial investigation, the most important information is the output of
1009 (backtrace) command above.
1010 .Ss Reporting Problems with Vinum
1011 If you find any bugs in
1013 please report them to
1014 .An Greg Lehey Aq Mt grog@lemis.com .
1015 Supply the following
1025 Any messages printed in
1026 .Pa /var/log/messages .
1027 All such messages will be identified by the text
1031 If you have a panic, a stack trace as described above.
1042 The RAID-5 component of
1044 was developed by Cybernet Inc.\&
1045 .Pq Pa http://www.cybernet.com/ ,
1046 for its NetMAX product.
1048 .An Greg Lehey Aq Mt grog@lemis.com .
1052 Bugs can be expected.
1053 The configuration mechanism is not yet
1055 If you have difficulties, please look at the section
1056 .Sx "DEBUGGING PROBLEMS WITH VINUM"
1057 before reporting problems.
1061 pseudo-device appear to work, but are not supported.
1062 If you have trouble with
1063 this configuration, please first replace the kernel with a
1065 kernel and test with the kld module.
1067 Detection of differences between the version of the kernel and the kld is not
1070 The RAID-5 functionality is new in
1072 Some problems have been
1075 in combination with soft updates, but these are not reproducible on all
1077 If you are planning to use
1079 in a production environment, please test carefully.