Kilka pytan odnosnie softraida

Roman Kolasiewicz rkolasiewicz w excellent.com.pl
Śro, 13 Lis 2002, 20:11:05 CET


-----BEGIN PGP SIGNED MESSAGE-----
Hash: MD5

Witam,

Wednesday, November 13, 2002, 7:30:53 PM, Krzysztof Drewicz wrote:

> /boot na raid1 + lilo działa.
To juz wiem.

> Może dodatkowo odżałować po 50MB na każdym dysku i umieścić tam
> zawartość rescue cd tak żeby jako awaryjny boot mogło służyć gdy płytkę
> coś wessie (np kolega z pracy).
hmm, wcale niezly pomysl, ale troche trzeba poudawac ze sie czlowiek
meczy :)

>> przeladowac modul obslugujacy kontroler SCSI zeby modul przeskanowal
>> magistrale w poszukiwaniu dyskow. Jest jakis inny sposob? Bo skoro mam

> # echo "scsi remove-single-device 1 2 3 4" >/proc/scsi/scsi
> # echo "scsi add-single-device 1 2 3 4" >/proc/scsi/scsi
no to jade:
1. serwer wstal na dwoch dyskach
2. wyciagam drugi dysk z kieszeni
3. na wszelki wypadek "zduram" po partycjach raidowych zeby sie kernel
   dowiedzial, ze jeden z dyskow zniknal:

[rkolasie w xeon rkolasie]$ cat /proc/mdstat
Personalities : [raid1]
read_ahead 1024 sectors
md1 : active raid1 scsi/host0/bus0/target1/lun0/part2[1]
             scsi/host0/bus0/target0/lun0/part2[0]
      7936 blocks [2/2] [UU]

md0 : active raid1 scsi/host0/bus0/target1/lun0/part3[1](F)
             scsi/host0/bus0/target0/lun0/part3[0]
      34780608 blocks [2/1] [U_]

unused devices: <none>
[rkolasie w xeon rkolasie]$ ls -l /boot/
razem 1358
- -rw-r--r--    1 root     root          512 11-08 20:48 boot.0800
- -rw-r--r--    1 root     root          512 11-13 15:50 boot.0901
lrwxrwxrwx    1 root     root           21 11-12 16:26 initrd -> initrd-2.4.18-2smp.gz
- -rw-r--r--    1 root     root       183760 11-08 21:37 initrd-2.4.18-2smp.gz
- -rw-r-----    1 root     root        18056 11-05 19:15 lilo-pldblack.bmp
drwxr-xr-x    2 root     root        12288 11-08 20:24 lost+found
- -rw-------    1 root     root        22016 11-13 15:50 map
lrwxrwxrwx    1 root     root           22 11-12 16:26 System.map -> System.map-2.4.18-2smp
- -rw-r--r--    1 root     root       435648 2002-04-15  System.map-2.4.18-2smp
lrwxrwxrwx    1 root     root           19 11-12 16:26 vmlinuz -> vmlinuz-2.4.18-2smp
- -rw-r--r--    1 root     root       704092 2002-04-15  vmlinuz-2.4.18-2smp
[rkolasie w xeon rkolasie]$ cat /proc/mdstat
Personalities : [raid1]
read_ahead 1024 sectors
md1 : active raid1 scsi/host0/bus0/target1/lun0/part2[1](F)
             scsi/host0/bus0/target0/lun0/part2[0]
      7936 blocks [2/1] [U_]

md0 : active raid1 scsi/host0/bus0/target1/lun0/part3[1](F)
             scsi/host0/bus0/target0/lun0/part3[0]
      34780608 blocks [2/1] [U_]

unused devices: <none>

4. odpowiednim softem usuwam dyski z macierzy raidowej

[root w xeon /root]# raidhotremove /dev/md0 /dev/sdb3
[root w xeon /root]# raidhotremove /dev/md1 /dev/sdb2
[root w xeon /root]# cat /proc/mdstat
Personalities : [raid1]
read_ahead 1024 sectors
md1 : active raid1 scsi/host0/bus0/target0/lun0/part2[0]
      7936 blocks [2/1] [U_]

md0 : active raid1 scsi/host0/bus0/target0/lun0/part3[0]
      34780608 blocks [2/1] [U_]

unused devices: <none>
[root w xeon /root]# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
  Vendor: IBM      Model: IC35L036UCD210-0 Rev: S5BS
  Type:   Direct-Access                    ANSI SCSI revision: 03
Host: scsi0 Channel: 00 Id: 01 Lun: 00
  Vendor: IBM      Model: IC35L036UCD210-0 Rev: S5BS
  Type:   Direct-Access                    ANSI SCSI revision: 03
Host: scsi0 Channel: 00 Id: 06 Lun: 00
  Vendor: ESG-SHV  Model: SCA HSBP M15     Rev: 0.10
  Type:   Processor                        ANSI SCSI revision: 02

5. wg. waszych zalecen:
[root w xeon /root]# echo "scsi remove-single-device 0 0 1 0" >/proc/scsi/scsi
[root w xeon /root]# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
  Vendor: IBM      Model: IC35L036UCD210-0 Rev: S5BS
  Type:   Direct-Access                    ANSI SCSI revision: 03
Host: scsi0 Channel: 00 Id: 01 Lun: 00
  Vendor: IBM      Model: IC35L036UCD210-0 Rev: S5BS
  Type:   Direct-Access                    ANSI SCSI revision: 03
Host: scsi0 Channel: 00 Id: 06 Lun: 00
  Vendor: ESG-SHV  Model: SCA HSBP M15     Rev: 0.10
  Type:   Processor                        ANSI SCSI revision: 02

[root w xeon /root]# echo "scsi add-single-device 0 0 1 0" >/proc/scsi/scsi
[root w xeon /root]# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
  Vendor: IBM      Model: IC35L036UCD210-0 Rev: S5BS
  Type:   Direct-Access                    ANSI SCSI revision: 03
Host: scsi0 Channel: 00 Id: 01 Lun: 00
  Vendor: IBM      Model: IC35L036UCD210-0 Rev: S5BS
  Type:   Direct-Access                    ANSI SCSI revision: 03
Host: scsi0 Channel: 00 Id: 06 Lun: 00
  Vendor: ESG-SHV  Model: SCA HSBP M15     Rev: 0.10
  Type:   Processor                        ANSI SCSI revision: 02
I jak widac dysk jak byl w systemie, tak jest w nim dalej (a ja go
wlasnie trzymam w rekach)

[root w xeon /root]# fdisk -l /dev/sdb
[root w xeon /root]#

^^^^ wyswietlenie partycji zajmuje fdiskowi jakies 5 sekund i program
konczy dzialanie bez zadnego komunikatu

6. drapie sie po glowie ide do serwerowni i wpycham dysk na swoje miejsce...
[root w xeon /root]# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
  Vendor: IBM      Model: IC35L036UCD210-0 Rev: S5BS
  Type:   Direct-Access                    ANSI SCSI revision: 03
Host: scsi0 Channel: 00 Id: 01 Lun: 00
  Vendor: IBM      Model: IC35L036UCD210-0 Rev: S5BS
  Type:   Direct-Access                    ANSI SCSI revision: 03
Host: scsi0 Channel: 00 Id: 06 Lun: 00
  Vendor: ESG-SHV  Model: SCA HSBP M15     Rev: 0.10
  Type:   Processor                        ANSI SCSI revision: 02
[root w xeon /root]# echo "scsi remove-single-device 0 0 1 0" >/proc/scsi/scsi
[root w xeon /root]# echo "scsi add-single-device 0 0 1 0" >/proc/scsi/scsi
[root w xeon /root]# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
  Vendor: IBM      Model: IC35L036UCD210-0 Rev: S5BS
  Type:   Direct-Access                    ANSI SCSI revision: 03
Host: scsi0 Channel: 00 Id: 01 Lun: 00
  Vendor: IBM      Model: IC35L036UCD210-0 Rev: S5BS
  Type:   Direct-Access                    ANSI SCSI revision: 03
Host: scsi0 Channel: 00 Id: 06 Lun: 00
  Vendor: ESG-SHV  Model: SCA HSBP M15     Rev: 0.10
  Type:   Processor                        ANSI SCSI revision: 02
[root w xeon /root]# fdisk -l /dev/sdb
[root w xeon /root]#
^^^^ fdisk dziala jak blyskawica - od razu konczy dzialanie,
oczywiscie nic nie wypisujac.

7. znowu zasuwam do serwerowni i przekladam dysk do innej kieszeni w
macierzy: (cholera zniknelo mi z bufora na
ekranie, ale to co zwrocil rescan wygladalo mniej wiecej tak)

[root w xeon /root]# rescan-scsi-bus
Host adapter 0 (aic7xxx) found.
Host adapter 1 (aic7xxx) found.
Scanning for device 0 0 0 0 ...
OLD: Host: scsi0 Channel: 00 Id: 00 Lun: 00
      Vendor: IBM      Model: IC35L036UCD210-0 Rev: S5BS
      Type:   Direct-Access                    ANSI SCSI revision: 03
Scanning for device 0 0 1 0 ...
OLD: Host: scsi0 Channel: 00 Id: 01 Lun: 00
      Vendor: IBM      Model: IC35L036UCD210-0 Rev: S5BS
      Type:   Direct-Access                    ANSI SCSI revision: 03
Scanning for device 0 0 2 0 ...
NEW: Host: scsi0 Channel: 00 Id: 02 Lun: 00
      Vendor: IBM      Model: IC35L036UCD210-0 Rev: S5BS
      Type:   Direct-Access                    ANSI SCSI revision: 03
Scanning for device 0 0 6 0 ...
OLD: Host: scsi0 Channel: 00 Id: 06 Lun: 00
      Vendor: ESG-SHV  Model: SCA HSBP M15     Rev: 0.10
      Type:   Processor                        ANSI SCSI revision: 02
1 new device(s) found.0 7 0 ...
0 device(s) removed.
[root w xeon /root]# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
  Vendor: IBM      Model: IC35L036UCD210-0 Rev: S5BS
  Type:   Direct-Access                    ANSI SCSI revision: 03
Host: scsi0 Channel: 00 Id: 01 Lun: 00
  Vendor: IBM      Model: IC35L036UCD210-0 Rev: S5BS
  Type:   Direct-Access                    ANSI SCSI revision: 03
Host: scsi0 Channel: 00 Id: 06 Lun: 00
  Vendor: ESG-SHV  Model: SCA HSBP M15     Rev: 0.10
  Type:   Processor                        ANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 02 Lun: 00
  Vendor: IBM      Model: IC35L036UCD210-0 Rev: S5BS
  Type:   Direct-Access                    ANSI SCSI revision: 03

No prosze - i mam niezawodny sposob na klonowanie dyskow SCSI :)
Ale dla pewnosci:

[root w xeon /root]# echo "scsi remove-single-device 0 0 1 0" >/proc/scsi/scsi
[root w xeon /root]# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
  Vendor: IBM      Model: IC35L036UCD210-0 Rev: S5BS
  Type:   Direct-Access                    ANSI SCSI revision: 03
Host: scsi0 Channel: 00 Id: 01 Lun: 00
  Vendor: IBM      Model: IC35L036UCD210-0 Rev: S5BS
  Type:   Direct-Access                    ANSI SCSI revision: 03
Host: scsi0 Channel: 00 Id: 06 Lun: 00
  Vendor: ESG-SHV  Model: SCA HSBP M15     Rev: 0.10
  Type:   Processor                        ANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 02 Lun: 00
  Vendor: IBM      Model: IC35L036UCD210-0 Rev: S5BS
  Type:   Direct-Access                    ANSI SCSI revision: 03


Czyli wyglada na to, ze
echo "scsi remove-single-device 0 0 1 0" >/proc/scsi/scsi nie daje
zadnych wynikow, natomiast
echo "scsi add-single-device 0 0 2 0" >/proc/scsi/scsi jak najbardziej
dodaje mi nowy dysk. Tak jak zreszta przewidzialem w jednym ze swoich
listow w watku "Moje boje z softraid.".

Jutro sproboje zrobic upgrade do kernela 2.4.19 i porobie kilka
testow, zobaczymy co z tego wyniknie :)

Best regards,
 Roman

-----BEGIN PGP SIGNATURE-----
Version: 2.6

iQEVAwUAPdKjza8UxZNaC9cNAQFT0wgAlBwlDISBOpbluLM5CGtVQtCC64/3p2/D
7nSBMdQtQkqZrXdMO3tXWK2IyrCJmzTaPSRmhqYnYXuYGUN4XStEIEfrh66F3xwb
6n0DHMemfC9d8Mv3FW4dGiv+nc1XTEEHtHsFTmTCSILC4OPCATEsSHsyq7vtwYXu
DZh71Hfahu9aCCizVxnZMUkysJAVtu389c2WfkhuG7fXkyl7gjKg//rOZjwpq+Uj
xAqMadqM/CZ0GMAdiLNRx3xun8BVF5KjWnoqgFsxK15m5v2FYseBi4cR00FfQhkN
c8O4CjDYk2c0a7v5HLdiqJxfABmwgFZuSeOrMu852yMagYlWUbXh1w==
=oBMc
-----END PGP SIGNATURE-----



Więcej informacji o liście dyskusyjnej pld-users-pl