When you format a RAID, you specify the addressing order of the sectors in the RAID. Formatting is required when a RAID is first installed on a workstation or server and when you want to change the RAID level, the stripe depth, or the number of sectors of each disk drive that are used. You may want to make changes because you are doing performance tuning or because applications with different I/O characteristics are now using the RAID.
![]() | Caution: All data on a RAID is lost when you reformat it. Be sure to make a backup of all files that are located on the RAID before reformatting it with the raid(1M) command. |
Before formatting a RAID, be sure you know the answers to these questions:
Which RAID level: RAID 3 or RAID 5? (See Section 1.4.1, “RAID Level and Stripe Depth.”)
What stripe depth? (See Section 1.4.1.)
How many sectors of the RAID will be used? The default is the entire usable portion of each disk drive. Choose fewer sectors (leaving some portion of each disk drive unusable) when doing demonstrations in order to reduce the formatting time.
Follow these steps to format or reformat a RAID:
Get the controller and unit numbers of the RAID.
If you are reformatting the RAID, save all data on the RAID on tape.
Become superuser.
If you are reformatting the RAID, unmount any filesystems on the RAID.
Run MAKEDEV(1M) to create the RAID device files:
cd /dev ./MAKEDEV rad |
If you want to, you can check the health and connectivity of the RAID with fx(1M):
fx "rad(controller,unit)" |
fx performs a controller test and displays a menu. At the prompt, exit fx:
fx> exit |
Give this raid command to format or reformat the RAID:
raid -level -s depth -S sectors /dev/rdsk/radcontrollerdunitvh |
where:
–s depth and –S sectors are optional. If these options are not specified, the entire RAID is formatted and the stripe depth is 32. Formatting the entire RAID takes 15–20 minutes.
Invoke fx in expert mode and put a volume header on the RAID using these commands (shown with example output for controller = 4 and unit = 8):
fx -x "rad(controller,drive)" fx version 5.0, Apr 19, 1993 ...opening rad(4,8,) ...controller test...OK fx: Warning - invalid label on disk, ignored Can't get drive geometry, assuming 64 sectors/track Can't get drive geometry, assuming 8 heads Unable to get device geometry, assuming default Scsi drive type == ULTRA U144 RAID SGI 1.0 warning: can't read sgilabel on disk creating new sgilabel ...creating default bootinfo Can't get drive geometry, assuming 64 sectors/track Can't get drive geometry, assuming 8 heads Unable to get device geometry, assuming default ...creating default partitions ...creating default volume directory ----- please choose one (? for help, .. to quit this menu)----- [exi]t [d]ebug/ [l]abel/ [a]uto [b]adblock/ [exe]rcise/ [r]epartition/ [f]ormat fx> label/create/all ...creating default bootinfo Can't get drive geometry, assuming 64 sectors/track Can't get drive geometry, assuming 8 heads Unable to get device geometry, assuming default ...creating default partitions ...creating default sgiinfo ...creating default volume directory ----- please choose one (? for help, .. to quit this menu)----- [exi]t [d]ebug/ [l]abel/ [a]uto [b]adblock/ [exe]rcise/ [r]epartition/ [f]ormat fx> exit label info has changed for disk rad(4,8,). write out changes? (yes) yes |
Confirm that the RAID is formatted properly:
raid -p /dev/rdsk/radcontrollerdunitvh |
The output should contain this information in a single line:
/dev/rdsk/radcontrollerdunitvh: RAIDlevel, sectors: sectors, stripe size: depth, OK |
See Section 5.1.1, “Messages from Format Operations,” if the message doesn't end with “OK”.
To put one or more filesystems on the RAID, use mkfs(1M) to construct the filesystem(s), create the mount point(s), edit /etc/fstab, and mount the filesystem as usual. For a complete description of the procedure, see Section 4.2, “Maintaining File Systems,” of the IRIX Advanced Site and Server Administration Guide.
If you reformatted the RAID, restore the data from tape.