From: Eugene Prokopiev <prokopiev@stc.donpac.ru>
To: ALT Linux Sisyphus discussion list <sisyphus@lists.altlinux.org>
Subject: Re: [sisyphus] mdadm: No arrays found in config file
Date: Wed, 12 Jul 2006 22:14:00 +0400
Message-ID: <44B53BE8.5030309@stc.donpac.ru> (raw)
In-Reply-To: <20060712141206.GE15699@master.mivlgu.local>
вообще-то, на момент вызова:
>># mdadm --assemble --scan
уже было:
# cat /proc/mdstat
Personalities : [raid0] [raid1]
md1 : active raid1 hdc3[0] hda3[1]
77071744 blocks [2/2] [UU]
md0 : active raid1 hdc1[0] hda1[1]
96256 blocks [2/2] [UU]
unused devices: <none>
Но раньше это не было проблемой.
Я попытался запустить mdadm (и без патчей), собранный с отладочной
информацией, под gdb:
# gdb mdadm
(gdb) break main
Breakpoint 1 at 0x8049a50: file mdadm.c, line 40.
(gdb) run --assemble --scan
Starting program: /home/john/mdadm --assemble --scan
Breakpoint 1, main (argc=3, argv=0xbf853f64) at mdadm.c:40
warning: Source file is more recent than executable.
40 int mode = 0;
(gdb) next
47 int chunk = 0;
(gdb) next
48 long long size = -1;
(gdb) next
49 int level = UnSet;
(gdb) next
50 int layout = UnSet;
(gdb) next
51 int raiddisks = 0;
(gdb) next
52 int max_disks = MD_SB_DISKS; /* just a default */
(gdb) next
53 int sparedisks = 0;
(gdb) next
55 char *configfile = NULL;
(gdb) next
57 char *update = NULL;
(gdb) next
58 int scan = 0;
(gdb) next
59 char devmode = 0;
(gdb) next
60 int runstop = 0;
(gdb) next
61 int readonly = 0;
(gdb) next
62 int write_behind = 0;
(gdb) next
63 int bitmap_fd = -1;
(gdb) next
64 char *bitmap_file = NULL;
(gdb) next
65 char *backup_file = NULL;
(gdb) next
66 int bitmap_chunk = UnSet;
(gdb) next
67 int SparcAdjust = 0;
(gdb) next
68 mddev_dev_t devlist = NULL;
(gdb) next
69 mddev_dev_t *devlistend = & devlist;
(gdb) next
71 int devs_found = 0;
(gdb) next
72 int verbose = 0;
(gdb) next
73 int quiet = 0;
(gdb) next
74 int brief = 0;
(gdb) next
75 int force = 0;
(gdb) next
76 int test = 0;
(gdb) next
77 int assume_clean = 0;
(gdb) next
88 int autof = 0;
(gdb) next
90 char *homehost = NULL;
(gdb) next
92 char *mailaddr = NULL;
(gdb) next
93 char *program = NULL;
(gdb) next
94 int delay = 0;
(gdb) next
95 int daemonise = 0;
(gdb) next
96 char *pidfile = NULL;
(gdb) next
97 int oneshot = 0;
(gdb) next
98 struct supertype *ss = NULL;
(gdb) next
99 int writemostly = 0;
(gdb) next
100 int re_add = 0;
(gdb) next
101 char *shortopt = short_options;
(gdb) next
102 int dosyslog = 0;
(gdb) next
103 int auto_update_home = 0;
(gdb) next
106 int print_help = 0;
(gdb) next
108 int mdfd = -1;
(gdb) next
110 srandom(time(0) ^ getpid());
(gdb) next
112 ident.uuid_set=0;
(gdb) next
113 ident.level = UnSet;
(gdb) next
114 ident.raid_disks = UnSet;
(gdb) next
115 ident.super_minor= UnSet;
(gdb) next
116 ident.devices=0;
(gdb) next
117 ident.spare_group = NULL;
(gdb)
118 ident.autof = 0;
(gdb) next
119 ident.st = NULL;
(gdb) next
120 ident.bitmap_fd = -1;
(gdb) next
121 ident.bitmap_file = NULL;
(gdb) next
122 ident.name[0] = 0;
(gdb)
124 while ((option_index = -1) ,
(gdb) next
128 int newmode = mode;
(gdb) next
130 switch(opt) {
(gdb) next
173 switch(opt) {
(gdb) next
188 case 'A': newmode = ASSEMBLE; shortopt =
short_bitmap_auto_options; break;
(gdb) next
205 if (mode && newmode == mode) {
(gdb) next
207 } else if (mode && newmode != mode) {
(gdb) next
218 } else if (!mode && newmode) {
(gdb) next
219 mode = newmode;
(gdb) next
262 switch(opt) {
(gdb) next
124 while ((option_index = -1) ,
(gdb) next
128 int newmode = mode;
(gdb) next
130 switch(opt) {
(gdb) next
173 switch(opt) {
(gdb) next
205 if (mode && newmode == mode) {
(gdb) next
262 switch(opt) {
(gdb) next
272 if (opt == 1) {
(gdb) next
303 switch (O(mode,opt)) {
(gdb) next
613 scan = 1;
(gdb) next
614 continue;
(gdb) next
124 while ((option_index = -1) ,
(gdb) next
832 if (print_help) {
(gdb) next
850 if (!mode && devs_found) {
(gdb) next
856 if (!mode) {
(gdb) next
870 if (mode==MANAGE || mode == BUILD || mode == CREATE ||
mode == GROW ||
(gdb) next
892 if (raiddisks) {
(gdb) next
905 if (sparedisks) {
(gdb) next
913 if (homehost == NULL)
(gdb) next
914 homehost = conf_get_homehost(configfile);
(gdb) next
915 if (homehost && strcmp(homehost, "<system>")==0) {
(gdb) next
922 rv = 0;
(gdb) next
923 switch(mode) {
(gdb) next
937 if (devs_found == 1 && ident.uuid_set == 0 &&
(gdb) next
957 } else if (!scan)
(gdb) next
961 else if (devs_found>0) {
(gdb) next
990 mddev_ident_t array_list =
conf_get_ident(configfile, NULL);
(gdb) next
991 mddev_dev_t devlist =
conf_get_devs(configfile);
(gdb) next
992 int cnt = 0;
(gdb) next
993 if (devlist == NULL) {
(gdb) next
997 if (update) {
(gdb) next
1001 if (backup_file) {
(gdb) next
1005 for (; array_list; array_list =
array_list->next) {
(gdb) next
1007 mdfd =
open_mddev(array_list->devname,
(gdb) next
1009 if (mdfd < 0) {
(gdb) next
1013 if (ioctl(mdfd, GET_ARRAY_INFO,
&array)>=0)
(gdb) next
1023 close(mdfd);
(gdb) next
1005 for (; array_list; array_list =
array_list->next) {
(gdb) next
1007 mdfd =
open_mddev(array_list->devname,
(gdb) next
1009 if (mdfd < 0) {
(gdb) next
1013 if (ioctl(mdfd, GET_ARRAY_INFO,
&array)>=0)
(gdb) next
1023 close(mdfd);
(gdb) next
1005 for (; array_list; array_list =
array_list->next) {
(gdb) next
1025 if (homehost) {
(gdb) next
1075 } else if (cnt == 0 && rv == 0) {
(gdb) next
1076 fprintf(stderr, Name ": No
arrays found in config file\n");
(gdb) next
mdadm: No arrays found in config file
1077 rv = 1;
(gdb)
Но понять назначение переменных cnt и rv в плохо прокомментрованном коде
я не могу :( Поможете?
--
С уважением, Прокопьев Евгений
next prev parent reply other threads:[~2006-07-12 18:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-12 13:21 Eugene Prokopiev
2006-07-12 13:59 ` Eugene Prokopiev
2006-07-12 14:12 ` Sergey Vlasov
2006-07-12 17:21 ` Eugene Prokopiev
2006-07-12 18:14 ` Eugene Prokopiev [this message]
2006-07-12 18:51 ` Pavel Usischev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44B53BE8.5030309@stc.donpac.ru \
--to=prokopiev@stc.donpac.ru \
--cc=sisyphus@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Sisyphus discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
public-inbox-index sisyphus
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.sisyphus
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git