* [sisyphus] raidstop
@ 2006-08-21 10:21 Alexey Borovskoy
2006-08-21 10:45 ` Slava Semushin
0 siblings, 1 reply; 5+ messages in thread
From: Alexey Borovskoy @ 2006-08-21 10:21 UTC (permalink / raw)
To: ALT Linux Sisyphus discussion list
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Добрый вечер.
Вот чего-то не пойму, какие именно MDшки будут останавливаться?
for mddev in $(sed -ne 's/^\(md[^[:space:]]*\).*/\1/p' /proc/mdstat); do
action "Turning off RAID for $mddev:" $raidstop "/dev/$mddev"
done
С sed я не очень дружу.
- --
Алексей.
GPG key fingerprint
949B BC0E 2C44 7528 4F63 2753 E37A 9E3F 11F3 BDE1
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFE6YgS43qePxHzveERAuJDAJ9O6LL0+1sqh0hCwaoCoEsHtAuoRgCguKCY
SyyZPqIP7tKmCwyPKrKL1Vg=
=b0dl
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [sisyphus] raidstop
2006-08-21 10:21 [sisyphus] raidstop Alexey Borovskoy
@ 2006-08-21 10:45 ` Slava Semushin
2006-08-21 10:54 ` Alexey Borovskoy
0 siblings, 1 reply; 5+ messages in thread
From: Slava Semushin @ 2006-08-21 10:45 UTC (permalink / raw)
To: ALT Linux Sisyphus discussion list
--- Alexey Borovskoy 2006-08-21 23:21:28 +1300
+++ Slava Semushin 2006-08-21 17:42:32 +0700
AB> for mddev in $(sed -ne 's/^\(md[^[:space:]]*\).*/\1/p' /proc/mdstat); do
AB> action "Turning off RAID for $mddev:" $raidstop "/dev/$mddev"
AB> done
md* т.е. все. В это регулярном выражении говорится, что после md могут
идти любые символы, кроме пробельных. Как только встретится пробел, то
выражение выполнится. Кстати, из-за того что используется звяздока, а
не плюс просто строка "md" тоже подойдет.
AB> С sed я не очень дружу.
Я тоже :]
--
+ Slava Semushin | php-coder @ ngs.ru
+ ALT Linux Team | php-coder @ altlinux.ru
+ Expand QA Team | vsemushin @ swsoft.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [sisyphus] raidstop
2006-08-21 10:45 ` Slava Semushin
@ 2006-08-21 10:54 ` Alexey Borovskoy
2006-08-21 11:14 ` Slava Semushin
0 siblings, 1 reply; 5+ messages in thread
From: Alexey Borovskoy @ 2006-08-21 10:54 UTC (permalink / raw)
To: ALT Linux Sisyphus discussion list
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Slava Semushin пишет:
> --- Alexey Borovskoy 2006-08-21 23:21:28 +1300
> +++ Slava Semushin 2006-08-21 17:42:32 +0700
>
> AB> for mddev in $(sed -ne 's/^\(md[^[:space:]]*\).*/\1/p' /proc/mdstat); do
> AB> action "Turning off RAID for $mddev:" $raidstop "/dev/$mddev"
> AB> done
>
> md* т.е. все. В это регулярном выражении говорится, что после md могут
> идти любые символы, кроме пробельных. Как только встретится пробел, то
> выражение выполнится. Кстати, из-за того что используется звяздока, а
> не плюс просто строка "md" тоже подойдет.
А если у меня к примеру на md0 корень лежит, то такая MD не остановится.
Или в 2.6 останавливается?
> AB> С sed я не очень дружу.
>
> Я тоже :]
>
>
- --
Алексей.
GPG key fingerprint
949B BC0E 2C44 7528 4F63 2753 E37A 9E3F 11F3 BDE1
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFE6ZDo43qePxHzveERAsSyAJwJ1LjV+Ys8sHR4OQORjJig4L459gCeOa2H
3nTUJDGy7vzUWp9o9yWY7Qc=
=l30i
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [sisyphus] raidstop
2006-08-21 10:54 ` Alexey Borovskoy
@ 2006-08-21 11:14 ` Slava Semushin
2006-08-28 16:48 ` Aleksey Avdeev
0 siblings, 1 reply; 5+ messages in thread
From: Slava Semushin @ 2006-08-21 11:14 UTC (permalink / raw)
To: ALT Linux Sisyphus discussion list
--- Alexey Borovskoy 2006-08-21 23:54:32 +1300
+++ Slava Semushin 2006-08-21 18:11:04 +0700
AB> > AB> for mddev in $(sed -ne 's/^\(md[^[:space:]]*\).*/\1/p' /proc/mdstat); do
AB> > AB> action "Turning off RAID for $mddev:" $raidstop "/dev/$mddev"
AB> > AB> done
[...]
AB> А если у меня к примеру на md0 корень лежит, то такая MD не остановится.
Остановится. Главное, чтобы в файле /proc/mdstat была строка, которая
бы начиналась с "md0 "
--
+ Slava Semushin | php-coder @ ngs.ru
+ ALT Linux Team | php-coder @ altlinux.ru
+ Expand QA Team | vsemushin @ swsoft.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [sisyphus] raidstop
2006-08-21 11:14 ` Slava Semushin
@ 2006-08-28 16:48 ` Aleksey Avdeev
0 siblings, 0 replies; 5+ messages in thread
From: Aleksey Avdeev @ 2006-08-28 16:48 UTC (permalink / raw)
To: ALT Linux Sisyphus discussion list
[-- Attachment #1: Type: text/plain, Size: 620 bytes --]
Slava Semushin пишет:
> --- Alexey Borovskoy 2006-08-21 23:54:32 +1300
> +++ Slava Semushin 2006-08-21 18:11:04 +0700
>
> AB> > AB> for mddev in $(sed -ne 's/^\(md[^[:space:]]*\).*/\1/p' /proc/mdstat); do
> AB> > AB> action "Turning off RAID for $mddev:" $raidstop "/dev/$mddev"
> AB> > AB> done
> [...]
> AB> А если у меня к примеру на md0 корень лежит, то такая MD не остановится.
>
> Остановится. Главное, чтобы в файле /proc/mdstat была строка, которая
> бы начиналась с "md0 "
>
Нет, т. к. будет используемой _в_момент_ выполнения скрипта.
--
С уважением. Алексей.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 550 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-08-28 16:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-21 10:21 [sisyphus] raidstop Alexey Borovskoy
2006-08-21 10:45 ` Slava Semushin
2006-08-21 10:54 ` Alexey Borovskoy
2006-08-21 11:14 ` Slava Semushin
2006-08-28 16:48 ` Aleksey Avdeev
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