Useful Linux Commands


General Commands


Change the Color displayed by the shell


alias ls='ls --color'


Dump to a tape drive


tar cvf /dev/st0 {FILES}


List contents on the tar file


tar tvf file_name

tar tvf /dev/st0


copy data from one location to another


tar cf - * | (cd /new_location ; tar xf - )


NOTE - Must be at the dir where you want to start from.


Partition Recovery Stuff


NOTE - This will not backup or restore partition information for logical partitions


Dump the partition table


fdisk /dev/device -l > filename

fdisk /dev/device | lpr (will printout the output)


Your output will look like this:


root@thor ddimick]# /sbin/fdisk /dev/hda -l

Disk /dev/hda: 255 heads, 63 sectors, 3328 cylinders Units = cylinders of 16065 * 512 bytes

Device Boot Start End Blocks Id System

/dev/hda1 * 1 750 6024343+ 83 Linux

/dev/hda2 751 1500 6024375 83 Linux

/dev/hda3 1501 3300 14458500 83 Linux

/dev/hda4 3301 3328 224910 82 Linux swap







parted will output this type of table:


[root@thor ddimick]# /usr/sbin/parted /dev/hda print

Disk geometry: 1-3328, 8032k cylinders

Minor Start End Type Filesystem Flags

1 1 750 primary ext2 boot

2 751 1500 primary ext2

3 1501 3300 primary ext2

4 3301 3328 primary linux-swap



Dump the MBR and partition table to a file


dd if=/dev/device of=file_name bs=512 count=1


Restore the MBR and partition table from a file to the device


dd if=mbrhdx of=/dev/hdx bs=1 count=64


Write LILO out to a dive.


/sbin/lilo -r /mnt/linux/etc (where your old lilo.conf is)


Make a floppy bootdisk.


Mkbootdisk 2.2.14-15mdk


this will write the stock Mandrake 7.0 kernel out to floppy


Dump the contents of one partition to another.


dd conv=noerror if=/dev/device of=/dev/device


dd conv=noerror if=/dev/hda1 of=/dev/hdb1


will copy all data from hda1 to hdb1 and skip any errors


Working with CD-Rom's


Make an ISO image


mkisofs -r -o cd_image private_collection/

| |

write output to take directory as input


To mount the file cd_image created above on the directory /cdrom, give the command


mount -t iso9660 -o ro,loop=/dev/loop0 cd_image /cdrom


To find where the CD-Writer is:


cdrecord -scanbus


Your output will look like this:


Cdrecord release 1.8a29 Copyright (C) 1995-1999 Jörg Schilling

Using libscg version 'schily-0.1'

scsibus0:

0,0,0 0) 'IBM-PCCO' 'ST118202LW !#' 'B203' Disk

0,1,0 1) *

0,2,0 2) *

0,3,0 3) *

0,4,0 4) *The name of your CD Writer somewhere

0,5,0 5) *

0,6,0 6) *

0,7,0 7) *


Command to write to a CD-W


cdrecord -v speed=2 dev=0,6,0 -data cd_image


RAID ARRAY Stuff


RAID 0 - Disk Stripping. Offers very good read/write performance but does not include redundancy. If one disk fails, data on the entire RAID volume is lost. RAID 0 is best suited for virtual memory (RAM) drives.


RAID 1 - 100% redundancy by keeping identical disk images on separate hard drives. RAID 1 is a costly option on large disk subsystems since twice the disk capacity is needed - It requires exactly 2 drives. RAID 1 can be used for a smaller server or a system disk on a larger server.


RAID 5 - Distributes data across all the hard drives in the RAID volume. When one hard drive fails, the RAID controller is able to rebuild the disk image without data loss once the damage disk has been replaced. RAID 5 is best suited in a server environment where performance and availability are critical.


RAID 10 - Combines RAID 1 and RAID 0 to offer scalable disk mirroring. Two or more RAID 1 arrays form one RAID 0. RAID 10 is used to store large files requiring redundancy.





RAID Commands NOTE- I took this info off of

http://www.dandelion.com/Linux/README.DAC960


This is the site Leonard N. Zubkoff put up to document the Linux Driver for Mylex DAC960/AcceleRAID/eXtremeRAID PCI RAID Controllers


This the only one I have worked with so far..

............................................................................................................

Starting with the 2.2.3/2.0.3 versions of the driver, the status information

available in /proc/rd/cN/initial_status and /proc/rd/cN/current_status has been

augmented to include the vendor, model, revision, and serial number (if

available) for each physical device found connected to the controller:


***** DAC960 RAID Driver Version 2.2.3 of 19 August 1999 *****

Copyright 1998-1999 by Leonard N. Zubkoff <lnz@dandelion.com>

Configuring Mylex DAC960PRL PCI RAID Controller

Firmware Version: 4.07-0-07, Channels: 1, Memory Size: 16MB

PCI Bus: 1, Device: 4, Function: 1, I/O Address: Unassigned

PCI Address: 0xFE300000 mapped at 0xA0800000, IRQ Channel: 21

Controller Queue Depth: 128, Maximum Blocks per Command: 128

Driver Queue Depth: 127, Maximum Scatter/Gather Segments: 33

Stripe Size: 64KB, Segment Size: 8KB, BIOS Geometry: 255/63

SAF-TE Enclosure Management Enabled

Physical Devices:

0:0 Vendor: IBM Model: DRVS09D Revision: 0270

Serial Number: 68016775HA

Disk Status: Online, 17928192 blocks

0:1 Vendor: IBM Model: DRVS09D Revision: 0270

Serial Number: 68004E53HA

Disk Status: Online, 17928192 blocks

0:2 Vendor: IBM Model: DRVS09D Revision: 0270

Serial Number: 13013935HA

Disk Status: Online, 17928192 blocks

0:3 Vendor: IBM Model: DRVS09D Revision: 0270

Serial Number: 13016897HA

Disk Status: Online, 17928192 blocks

0:4 Vendor: IBM Model: DRVS09D Revision: 0270

Serial Number: 68019905HA

Disk Status: Online, 17928192 blocks

0:5 Vendor: IBM Model: DRVS09D Revision: 0270

Serial Number: 68012753HA

Disk Status: Online, 17928192 blocks

0:6 Vendor: ESG-SHV Model: SCA HSBP M6 Revision: 0.61

Logical Drives:

/dev/rd/c0d0: RAID-5, Online, 89640960 blocks, Write Thru

No Rebuild or Consistency Check in Progress



To simplify the monitoring process for custom software, the special file

/proc/rd/status returns "OK" when all DAC960 controllers in the system are

operating normally and no failures have occurred, or "ALERT" if any logical

drives are offline or critical or any non-standby physical drives are dead.


Configuration commands for controller N are available via the special file

/proc/rd/cN/user_command. A human readable command can be written to this

special file to initiate a configuration operation, and the results of the

operation can then be read back from the special file in addition to being

logged to the system console. The shell command sequence


echo "<configuration-command>" > /proc/rd/c0/user_command

cat /proc/rd/c0/user_command


is typically used to execute configuration commands. The configuration

commands are:


flush-cache


The "flush-cache" command flushes the controller's cache. The system

automatically flushes the cache at shutdown or if the driver module is

unloaded, so this command is only needed to be certain a write back cache

is flushed to disk before the system is powered off by a command to a UPS.

Note that the flush-cache command also stops an asynchronous rebuild or

consistency check, so it should not be used except when the system is being

halted.


kill <channel>:<target-id>


The "kill" command marks the physical drive <channel>:<target-id> as DEAD.

This command is provided primarily for testing, and should not be used

during normal system operation.


make-online <channel>:<target-id>


The "make-online" command changes the physical drive <channel>:<target-id>

from status DEAD to status ONLINE. In cases where multiple physical drives

have been killed simultaneously, this command may be used to bring them

back online, after which a consistency check is advisable.


Warning: make-online should only be used on a dead physical drive that is

an active part of a drive group, never on a standby drive.


make-standby <channel>:<target-id>


The "make-standby" command changes physical drive <channel>:<target-id>

from status DEAD to status STANDBY. It should only be used in cases where

a dead drive was replaced after an automatic rebuild was performed onto a

standby drive. It cannot be used to add a standby drive to the controller

configuration if one was not created initially; the BIOS Configuration

Utility must be used for that currently.


rebuild <channel>:<target-id>


The "rebuild" command initiates an asynchronous rebuild onto physical drive

<channel>:<target-id>. It should only be used when a dead drive has been

replaced.


check-consistency <logical-drive-number>


The "check-consistency" command initiates an asynchronous consistency check

of <logical-drive-number> with automatic restoration. It can be used

whenever it is desired to verify the consistency of the redundancy

information.


cancel-rebuild

cancel-consistency-check


The "cancel-rebuild" and "cancel-consistency-check" commands cancel any

rebuild or consistency check operations previously initiated.



EXAMPLE I - DRIVE FAILURE WITHOUT A STANDBY DRIVE


The following annotated logs demonstrate the controller configuration and and

online status monitoring capabilities of the Linux DAC960 Driver. The test

configuration comprises 6 1GB Quantum Atlas I disk drives on two channels of a

DAC960PJ controller. The physical drives are configured into a single drive

group without a standby drive, and the drive group has been configured into two

logical drives, one RAID-5 and one RAID-6. Note that these logs are from an

earlier version of the driver and the messages have changed somewhat with newer

releases, but the functionality remains similar. First, here is the current

status of the RAID configuration:


gwynedd:/u/lnz# cat /proc/rd/c0/current_status

***** DAC960 RAID Driver Version 2.0.0 of 23 March 1999 *****

Copyright 1998-1999 by Leonard N. Zubkoff <lnz@dandelion.com>

Configuring Mylex DAC960PJ PCI RAID Controller

Firmware Version: 4.06-0-08, Channels: 3, Memory Size: 8MB

PCI Bus: 0, Device: 19, Function: 1, I/O Address: Unassigned

PCI Address: 0xFD4FC000 mapped at 0x8807000, IRQ Channel: 9

Controller Queue Depth: 128, Maximum Blocks per Command: 128

Driver Queue Depth: 127, Maximum Scatter/Gather Segments: 33

Stripe Size: 64KB, Segment Size: 8KB, BIOS Geometry: 255/63

Physical Devices:

0:1 - Disk: Online, 2201600 blocks

0:2 - Disk: Online, 2201600 blocks

0:3 - Disk: Online, 2201600 blocks

1:1 - Disk: Online, 2201600 blocks

1:2 - Disk: Online, 2201600 blocks

1:3 - Disk: Online, 2201600 blocks

Logical Drives:

/dev/rd/c0d0: RAID-5, Online, 5498880 blocks, Write Thru

/dev/rd/c0d1: RAID-6, Online, 3305472 blocks, Write Thru

No Rebuild or Consistency Check in Progress


gwynedd:/u/lnz# cat /proc/rd/status

OK


The above messages indicate that everything is healthy, and /proc/rd/status

returns "OK" indicating that there are no problems with any DAC960 controller

in the system. For demonstration purposes, while I/O is active Physical Drive

1:1 is now disconnected, simulating a drive failure. The failure is noted by

the driver within 10 seconds of the controller's having detected it, and the

driver logs the following console status messages indicating that Logical

Drives 0 and 1 are now CRITICAL as a result of Physical Drive 1:1 being DEAD:


DAC960#0: Physical Drive 1:2 Error Log: Sense Key = 6, ASC = 29, ASCQ = 02

DAC960#0: Physical Drive 1:3 Error Log: Sense Key = 6, ASC = 29, ASCQ = 02

DAC960#0: Physical Drive 1:1 killed because of timeout on SCSI command

DAC960#0: Physical Drive 1:1 is now DEAD

DAC960#0: Logical Drive 0 (/dev/rd/c0d0) is now CRITICAL

DAC960#0: Logical Drive 1 (/dev/rd/c0d1) is now CRITICAL


The Sense Keys logged here are just Check Condition / Unit Attention conditions

arising from a SCSI bus reset that is forced by the controller during its error

recovery procedures. Concurrently with the above, the driver status available

from /proc/rd also reflects the drive failure. The status message in

/proc/rd/status has changed from "OK" to "ALERT":


gwynedd:/u/lnz# cat /proc/rd/status

ALERT


and /proc/rd/c0/current_status has been updated:


gwynedd:/u/lnz# cat /proc/rd/c0/current_status

...

Physical Devices:

0:1 - Disk: Online, 2201600 blocks

0:2 - Disk: Online, 2201600 blocks

0:3 - Disk: Online, 2201600 blocks

1:1 - Disk: Dead, 2201600 blocks

1:2 - Disk: Online, 2201600 blocks

1:3 - Disk: Online, 2201600 blocks

Logical Drives:

/dev/rd/c0d0: RAID-5, Critical, 5498880 blocks, Write Thru

/dev/rd/c0d1: RAID-6, Critical, 3305472 blocks, Write Thru

No Rebuild or Consistency Check in Progress


Since there are no standby drives configured, the system can continue to access

the logical drives in a performance degraded mode until the failed drive is

replaced and a rebuild operation completed to restore the redundancy of the

logical drives. Once Physical Drive 1:1 is replaced with a properly

functioning drive, or if the physical drive was killed without having failed

(e.g., due to electrical problems on the SCSI bus), the user can instruct the

controller to initiate a rebuild operation onto the newly replaced drive:


gwynedd:/u/lnz# echo "rebuild 1:1" > /proc/rd/c0/user_command

gwynedd:/u/lnz# cat /proc/rd/c0/user_command

Rebuild of Physical Drive 1:1 Initiated


The echo command instructs the controller to initiate an asynchronous rebuild

operation onto Physical Drive 1:1, and the status message that results from the

operation is then available for reading from /proc/rd/c0/user_command, as well

as being logged to the console by the driver.


Within 10 seconds of this command the driver logs the initiation of the

asynchronous rebuild operation:


DAC960#0: Rebuild of Physical Drive 1:1 Initiated

DAC960#0: Physical Drive 1:1 Error Log: Sense Key = 6, ASC = 29, ASCQ = 01

DAC960#0: Physical Drive 1:1 is now WRITE-ONLY

DAC960#0: Rebuild in Progress: Logical Drive 0 (/dev/rd/c0d0) 1% completed


and /proc/rd/c0/current_status is updated:


gwynedd:/u/lnz# cat /proc/rd/c0/current_status

...

Physical Devices:

0:1 - Disk: Online, 2201600 blocks

0:2 - Disk: Online, 2201600 blocks

0:3 - Disk: Online, 2201600 blocks

1:1 - Disk: Write-Only, 2201600 blocks

1:2 - Disk: Online, 2201600 blocks

1:3 - Disk: Online, 2201600 blocks

Logical Drives:

/dev/rd/c0d0: RAID-5, Critical, 5498880 blocks, Write Thru

/dev/rd/c0d1: RAID-6, Critical, 3305472 blocks, Write Thru

Rebuild in Progress: Logical Drive 0 (/dev/rd/c0d0) 6% completed


As the rebuild progresses, the current status in /proc/rd/c0/current_status is

updated every 10 seconds:


gwynedd:/u/lnz# cat /proc/rd/c0/current_status

...

Physical Devices:

0:1 - Disk: Online, 2201600 blocks

0:2 - Disk: Online, 2201600 blocks

0:3 - Disk: Online, 2201600 blocks

1:1 - Disk: Write-Only, 2201600 blocks

1:2 - Disk: Online, 2201600 blocks

1:3 - Disk: Online, 2201600 blocks

Logical Drives:

/dev/rd/c0d0: RAID-5, Critical, 5498880 blocks, Write Thru

/dev/rd/c0d1: RAID-6, Critical, 3305472 blocks, Write Thru

Rebuild in Progress: Logical Drive 0 (/dev/rd/c0d0) 15% completed


and every minute a progress message is logged to the console by the driver:


DAC960#0: Rebuild in Progress: Logical Drive 0 (/dev/rd/c0d0) 32% completed

DAC960#0: Rebuild in Progress: Logical Drive 0 (/dev/rd/c0d0) 63% completed

DAC960#0: Rebuild in Progress: Logical Drive 0 (/dev/rd/c0d0) 94% completed

DAC960#0: Rebuild in Progress: Logical Drive 1 (/dev/rd/c0d1) 94% completed


Finally, the rebuild completes successfully. The driver logs the status of the

logical and physical drives and the rebuild completion:


DAC960#0: Rebuild Completed Successfully

DAC960#0: Physical Drive 1:1 is now ONLINE

DAC960#0: Logical Drive 0 (/dev/rd/c0d0) is now ONLINE

DAC960#0: Logical Drive 1 (/dev/rd/c0d1) is now ONLINE


/proc/rd/c0/current_status is updated:


gwynedd:/u/lnz# cat /proc/rd/c0/current_status

...

Physical Devices:

0:1 - Disk: Online, 2201600 blocks

0:2 - Disk: Online, 2201600 blocks

0:3 - Disk: Online, 2201600 blocks

1:1 - Disk: Online, 2201600 blocks

1:2 - Disk: Online, 2201600 blocks

1:3 - Disk: Online, 2201600 blocks

Logical Drives:

/dev/rd/c0d0: RAID-5, Online, 5498880 blocks, Write Thru

/dev/rd/c0d1: RAID-6, Online, 3305472 blocks, Write Thru

Rebuild Completed Successfully


and /proc/rd/status indicates that everything is healthy once again:


gwynedd:/u/lnz# cat /proc/rd/status

OK



EXAMPLE II - DRIVE FAILURE WITH A STANDBY DRIVE


The following annotated logs demonstrate the controller configuration and and

online status monitoring capabilities of the Linux DAC960 Driver. The test

configuration comprises 6 1GB Quantum Atlas I disk drives on two channels of a

DAC960PJ controller. The physical drives are configured into a single drive

group with a standby drive, and the drive group has been configured into two

logical drives, one RAID-5 and one RAID-6. Note that these logs are from an

earlier version of the driver and the messages have changed somewhat with newer

releases, but the functionality remains similar. First, here is the current

status of the RAID configuration:


gwynedd:/u/lnz# cat /proc/rd/c0/current_status

***** DAC960 RAID Driver Version 2.0.0 of 23 March 1999 *****

Copyright 1998-1999 by Leonard N. Zubkoff <lnz@dandelion.com>

Configuring Mylex DAC960PJ PCI RAID Controller

Firmware Version: 4.06-0-08, Channels: 3, Memory Size: 8MB

PCI Bus: 0, Device: 19, Function: 1, I/O Address: Unassigned

PCI Address: 0xFD4FC000 mapped at 0x8807000, IRQ Channel: 9

Controller Queue Depth: 128, Maximum Blocks per Command: 128

Driver Queue Depth: 127, Maximum Scatter/Gather Segments: 33

Stripe Size: 64KB, Segment Size: 8KB, BIOS Geometry: 255/63

Physical Devices:

0:1 - Disk: Online, 2201600 blocks

0:2 - Disk: Online, 2201600 blocks

0:3 - Disk: Online, 2201600 blocks

1:1 - Disk: Online, 2201600 blocks

1:2 - Disk: Online, 2201600 blocks

1:3 - Disk: Standby, 2201600 blocks

Logical Drives:

/dev/rd/c0d0: RAID-5, Online, 4399104 blocks, Write Thru

/dev/rd/c0d1: RAID-6, Online, 2754560 blocks, Write Thru

No Rebuild or Consistency Check in Progress


gwynedd:/u/lnz# cat /proc/rd/status

OK


The above messages indicate that everything is healthy, and /proc/rd/status

returns "OK" indicating that there are no problems with any DAC960 controller

in the system. For demonstration purposes, while I/O is active Physical Drive

1:2 is now disconnected, simulating a drive failure. The failure is noted by

the driver within 10 seconds of the controller's having detected it, and the

driver logs the following console status messages:


DAC960#0: Physical Drive 1:1 Error Log: Sense Key = 6, ASC = 29, ASCQ = 02

DAC960#0: Physical Drive 1:3 Error Log: Sense Key = 6, ASC = 29, ASCQ = 02

DAC960#0: Physical Drive 1:2 killed because of timeout on SCSI command

DAC960#0: Physical Drive 1:2 is now DEAD

DAC960#0: Physical Drive 1:2 killed because it was removed

DAC960#0: Logical Drive 0 (/dev/rd/c0d0) is now CRITICAL

DAC960#0: Logical Drive 1 (/dev/rd/c0d1) is now CRITICAL


Since a standby drive is configured, the controller automatically begins

rebuilding onto the standby drive:


DAC960#0: Physical Drive 1:3 is now WRITE-ONLY

DAC960#0: Rebuild in Progress: Logical Drive 0 (/dev/rd/c0d0) 4% completed


Concurrently with the above, the driver status available from /proc/rd also

reflects the drive failure and automatic rebuild. The status message in

/proc/rd/status has changed from "OK" to "ALERT":


gwynedd:/u/lnz# cat /proc/rd/status

ALERT


and /proc/rd/c0/current_status has been updated:


gwynedd:/u/lnz# cat /proc/rd/c0/current_status

...

Physical Devices:

0:1 - Disk: Online, 2201600 blocks

0:2 - Disk: Online, 2201600 blocks

0:3 - Disk: Online, 2201600 blocks

1:1 - Disk: Online, 2201600 blocks

1:2 - Disk: Dead, 2201600 blocks

1:3 - Disk: Write-Only, 2201600 blocks

Logical Drives:

/dev/rd/c0d0: RAID-5, Critical, 4399104 blocks, Write Thru

/dev/rd/c0d1: RAID-6, Critical, 2754560 blocks, Write Thru

Rebuild in Progress: Logical Drive 0 (/dev/rd/c0d0) 4% completed


As the rebuild progresses, the current status in /proc/rd/c0/current_status is

updated every 10 seconds:


gwynedd:/u/lnz# cat /proc/rd/c0/current_status

...

Physical Devices:

0:1 - Disk: Online, 2201600 blocks

0:2 - Disk: Online, 2201600 blocks

0:3 - Disk: Online, 2201600 blocks

1:1 - Disk: Online, 2201600 blocks

1:2 - Disk: Dead, 2201600 blocks

1:3 - Disk: Write-Only, 2201600 blocks

Logical Drives:

/dev/rd/c0d0: RAID-5, Critical, 4399104 blocks, Write Thru

/dev/rd/c0d1: RAID-6, Critical, 2754560 blocks, Write Thru

Rebuild in Progress: Logical Drive 0 (/dev/rd/c0d0) 40% completed


and every minute a progress message is logged on the console by the driver:


DAC960#0: Rebuild in Progress: Logical Drive 0 (/dev/rd/c0d0) 40% completed

DAC960#0: Rebuild in Progress: Logical Drive 0 (/dev/rd/c0d0) 76% completed

DAC960#0: Rebuild in Progress: Logical Drive 1 (/dev/rd/c0d1) 66% completed

DAC960#0: Rebuild in Progress: Logical Drive 1 (/dev/rd/c0d1) 84% completed


Finally, the rebuild completes successfully. The driver logs the status of the

logical and physical drives and the rebuild completion:


DAC960#0: Rebuild Completed Successfully

DAC960#0: Physical Drive 1:3 is now ONLINE

DAC960#0: Logical Drive 0 (/dev/rd/c0d0) is now ONLINE

DAC960#0: Logical Drive 1 (/dev/rd/c0d1) is now ONLINE


/proc/rd/c0/current_status is updated:


***** DAC960 RAID Driver Version 2.0.0 of 23 March 1999 *****

Copyright 1998-1999 by Leonard N. Zubkoff <lnz@dandelion.com>

Configuring Mylex DAC960PJ PCI RAID Controller

Firmware Version: 4.06-0-08, Channels: 3, Memory Size: 8MB

PCI Bus: 0, Device: 19, Function: 1, I/O Address: Unassigned

PCI Address: 0xFD4FC000 mapped at 0x8807000, IRQ Channel: 9

Controller Queue Depth: 128, Maximum Blocks per Command: 128

Driver Queue Depth: 127, Maximum Scatter/Gather Segments: 33

Stripe Size: 64KB, Segment Size: 8KB, BIOS Geometry: 255/63

Physical Devices:

0:1 - Disk: Online, 2201600 blocks

0:2 - Disk: Online, 2201600 blocks

0:3 - Disk: Online, 2201600 blocks

1:1 - Disk: Online, 2201600 blocks

1:2 - Disk: Dead, 2201600 blocks

1:3 - Disk: Online, 2201600 blocks

Logical Drives:

/dev/rd/c0d0: RAID-5, Online, 4399104 blocks, Write Thru

/dev/rd/c0d1: RAID-6, Online, 2754560 blocks, Write Thru

Rebuild Completed Successfully


and /proc/rd/status indicates that everything is healthy once again:


gwynedd:/u/lnz# cat /proc/rd/status

OK


Note that the absence of a viable standby drive does not create an "ALERT"

status. Once dead Physical Drive 1:2 has been replaced, the controller must be

told that this has occurred and that the newly replaced drive should become the

new standby drive:


gwynedd:/u/lnz# echo "make-standby 1:2" > /proc/rd/c0/user_command

gwynedd:/u/lnz# cat /proc/rd/c0/user_command

Make Standby of Physical Drive 1:2 Succeeded


The echo command instructs the controller to make Physical Drive 1:2 into a

standby drive, and the status message that results from the operation is then

available for reading from /proc/rd/c0/user_command, as well as being logged to

the console by the driver. Within 60 seconds of this command the driver logs:


DAC960#0: Physical Drive 1:2 Error Log: Sense Key = 6, ASC = 29, ASCQ = 01

DAC960#0: Physical Drive 1:2 is now STANDBY

DAC960#0: Make Standby of Physical Drive 1:2 Succeeded


and /proc/rd/c0/current_status is updated:


gwynedd:/u/lnz# cat /proc/rd/c0/current_status

...

Physical Devices:

0:1 - Disk: Online, 2201600 blocks

0:2 - Disk: Online, 2201600 blocks

0:3 - Disk: Online, 2201600 blocks

1:1 - Disk: Online, 2201600 blocks

1:2 - Disk: Standby, 2201600 blocks

1:3 - Disk: Online, 2201600 blocks

Logical Drives:

/dev/rd/c0d0: RAID-5, Online, 4399104 blocks, Write Thru

/dev/rd/c0d1: RAID-6, Online, 2754560 blocks, Write Thru

Rebuild Completed Successfully