
Před nějakou dobou (v roce 2008) jsem stál před problémem, jak dokonfigurovat HW RAID na serveru SunFire T2000 s OS Solaris 10. O tom, jak se mi to povedlo, jsem se rozhodl podělit.
Původní stav byl dva 72GB disky c0t0d0 a c0t1d0 v RAID 1 jako c0t0d0. Mým cílem bylo ze zbývajících dvou disků c0t2d0 a c0t3d0 vytvořit také RAID 1.
Zjištění současného stavu
root@srv-01 # raidctl
Controller: 0
Volume:c0t0d0
Disk: 0.0.0
Disk: 0.1.0
Disk: 0.2.0
Disk: 0.3.0
root@srv-01 # raidctl -S
0 "LSI_1064E"
c0t0d0 2 0.0.0 0.1.0 1 OPTIMAL
0.0.0 GOOD
0.1.0 GOOD
0.2.0 GOOD
0.3.0 GOOD
root@srv-01 # raidctl -l c0t0d0
Volume Size Stripe Status Cache RAID
Sub Size Level
Disk
----------------------------------------------------------------
c0t0d0 68.3G N/A OPTIMAL N/A RAID1
0.0.0 68.3G GOOD
0.1.0 68.3G GOOD
Vytvoření RAID 1 z disků c0t2d0 a c0t3d0
root@srv-01 # raidctl -c c0t2d0 c0t3d0 Creating RAID volume will destroy all data on spare space of member disks, proceed (yes/no)? yes Volume c0t2d0 is created successfully!
Kontrola
root@srv-01 # raidctl -S
0 "LSI_1064E"
c0t0d0 2 0.0.0 0.1.0 1 OPTIMAL
c0t2d0 2 0.2.0 0.3.0 1 SYNC
0.0.0 GOOD
0.1.0 GOOD
0.2.0 GOOD
0.3.0 GOOD
root@srv-01 # raidctl -l c0t2d0
Volume Size Stripe Status Cache RAID
Sub Size Level
Disk
----------------------------------------------------------------
c0t2d0 68.3G N/A SYNC N/A RAID1
0.2.0 68.3G GOOD
0.3.0 68.3G GOOD
Přetypovani labelu
root@srv-01 # format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0t0d0 <LSILOGIC-LogicalVolume-3000 cyl 65533 alt 2 hd 16 sec 136>
/pci@780/pci@0/pci@9/scsi@0/sd@0,0
1. c0t2d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
/pci@780/pci@0/pci@9/scsi@0/sd@2,0
Specify disk (enter its number): 1
selecting c0t2d0
[disk formatted]
FORMAT MENU:
disk - select a disk
type - select (define) a disk type
partition - select (define) a partition table
current - describe the current disk
format - format and analyze the disk
repair - repair a defective sector
label - write label to the disk
analyze - surface analysis
defect - defect list management
backup - search for backup labels
verify - read and display labels
save - save new disk/partition definitions
inquiry - show vendor, product and revision
volname - set 8-character volume name
!<cmd> - execute <cmd>, then return
quit
format> t
AVAILABLE DRIVE TYPES:
0. Auto configure
1. Quantum ProDrive 80S
2. Quantum ProDrive 105S
3. CDC Wren IV 94171-344
4. SUN0104
5. SUN0207
6. SUN0327
7. SUN0340
8. SUN0424
9. SUN0535
10. SUN0669
11. SUN1.0G
12. SUN1.05
13. SUN1.3G
14. SUN2.1G
15. SUN2.9G
16. Zip 100
17. Zip 250
18. Peerless 10GB
19. LSILOGIC-LogicalVolume-3000
20. SUN72G
21. other
Specify disk type (enter its number)[20]: 0
c0t2d0: configured with capacity of 68.00GB
<LSILOGIC-LogicalVolume-3000 cyl 65533 alt 2 hd 16 sec 136>
selecting c0t2d0
[disk formatted]
format> l
Ready to label disk, continue? y
format> q
Kontrola změny labelu
root@srv-01 # format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0t0d0 <LSILOGIC-LogicalVolume-3000 cyl 65533 alt 2 hd 16 sec 136>
/pci@780/pci@0/pci@9/scsi@0/sd@0,0
1. c0t2d0 <LSILOGIC-LogicalVolume-3000 cyl 65533 alt 2 hd 16 sec 136>
/pci@780/pci@0/pci@9/scsi@0/sd@2,0
Specify disk (enter its number): ^C
Výpis /var/adm/messages (dmesg)
Feb 7 11:14:59 srv-01 scsi: [ID 193665 kern.info] sd3 at mpt0: target 2 lun 0 Feb 7 11:14:59 srv-01 genunix: [ID 936769 kern.info] sd3 is /pci@780/pci@0/pci@9/scsi@0/sd@2,0 Feb 7 11:14:59 srv-01 scsi: [ID 193665 kern.info] sd4 at mpt0: target 3 lun 0 Feb 7 11:14:59 srv-01 genunix: [ID 936769 kern.info] sd4 is /pci@780/pci@0/pci@9/scsi@0/sd@3,0 Feb 7 11:18:07 srv-01 scsi: [ID 107833 kern.notice] /pci@780/pci@0/pci@9/scsi@0 (mpt0): Feb 7 11:18:07 srv-01 Physical disk 2 created. Feb 7 11:18:08 srv-01 scsi: [ID 107833 kern.notice] /pci@780/pci@0/pci@9/scsi@0 (mpt0): Feb 7 11:18:08 srv-01 Physical disk 3 created. Feb 7 11:18:08 srv-01 scsi: [ID 107833 kern.notice] /pci@780/pci@0/pci@9/scsi@0 (mpt0): Feb 7 11:18:08 srv-01 Volume 2 created. Feb 7 11:18:08 srv-01 scsi: [ID 365881 kern.info] /pci@780/pci@0/pci@9/scsi@0 (mpt0): Feb 7 11:18:08 srv-01 Volume 0 is optimal Feb 7 11:18:08 srv-01 scsi: [ID 107833 kern.warning] WARNING: /pci@780/pci@0/pci@9/scsi@0 (mpt0): Feb 7 11:18:08 srv-01 Volume 2 is degraded Feb 7 11:18:09 srv-01 scsi: [ID 107833 kern.notice] /pci@780/pci@0/pci@9/scsi@0 (mpt0): Feb 7 11:18:09 srv-01 Volume 2 is |enabled||optimal| Feb 7 11:18:09 srv-01 scsi: [ID 107833 kern.notice] /pci@780/pci@0/pci@9/scsi@0 (mpt0): Feb 7 11:18:09 srv-01 Volume 2 is |enabled||optimal| Feb 7 11:18:09 srv-01 scsi: [ID 107833 kern.notice] /pci@780/pci@0/pci@9/scsi@0 (mpt0): Feb 7 11:18:09 srv-01 Physical disk (target 3) is |out of sync||online| Feb 7 11:18:09 srv-01 scsi: [ID 107833 kern.notice] /pci@780/pci@0/pci@9/scsi@0 (mpt0): Feb 7 11:18:09 srv-01 Volume 2 is |enabled||degraded| Feb 7 11:18:09 srv-01 scsi: [ID 107833 kern.notice] /pci@780/pci@0/pci@9/scsi@0 (mpt0): Feb 7 11:18:09 srv-01 Volume 2 is |enabled||resyncing||degraded| Feb 7 11:18:09 srv-01 genunix: [ID 408114 kern.info] /pci@780/pci@0/pci@9/scsi@0/sd@3,0 (sd4) offline Feb 7 11:47:41 srv-01 scsi: [ID 107833 kern.notice] /pci@780/pci@0/pci@9/scsi@0 (mpt0): Feb 7 11:47:41 srv-01 Physical disk (target 3) is |online| Feb 7 11:47:41 srv-01 scsi: [ID 107833 kern.notice] /pci@780/pci@0/pci@9/scsi@0 (mpt0): Feb 7 11:47:41 srv-01 Volume 2 is |enabled||resyncing||optimal| Feb 7 11:47:41 srv-01 scsi: [ID 107833 kern.notice] /pci@780/pci@0/pci@9/scsi@0 (mpt0): Feb 7 11:47:41 srv-01 Volume 2 is |enabled||optimal|
