Batch Mode Page Import/Export

Top  Previous  Next

This feature will save all of the mode pages for a selected device into a file which you can export to one or more devices with a single command.

 

Reading Mode Pages and Saving to File

Syntax:        smartmon-ux -mpexport FILENAME device

Example:        smartmon-ux -mpexport SEAGATEMASTER.TXT /dev/rdsk/c0d0s0

The above will read all mode pages from the selected disk and save it to a file. Note that this is one of the few commands that will not allow you to enter a list of devices. If you attempt to enter a wild-card for the device that would match more than one, the program will still create the exported file, but the program will abort once the wildcard matches the second device.

 

Below is the output from a Seagate ST39175LC disk drive.

#

# *** WARNING *** Do NOT change any lines starting with a ";"

; File generated with SANtools' SMARTMon-UX revision 1.28

; http://www.santools.com  sales@santools.com

#

; Mode page dump generated at Tue Mar 22 23:43:56 2005

; Device is "" ""

#

# Note: You are free to add, delete, edit mode pages and values as required

#       only the mode pages in this file will be saved back into the device when

#       you issue the -mpimport command.  All other pages will not be affected.

#

#       Obviously very bad things can happen to a device if you make a mistake and

#       load incorrect values, or load correct values onto the wrong peripheral.

#

#       CURRENT Pages -> These are volatile and reset to SAVED pages with power cycle (changeable)

#       FACTORY Pages -> These are factory settings burned into the firmware (not changeable)

#       SAVED Pages   -> Power-on default pages (changeable)

#       CHANGEABLE    -> The non-changeable pages are bitmasks where a 1 indicates a bit is changeable

#

#       So ... The safest thing to do is just make changes to the CURRENT page to see

#       if it behaves as you desired. If so, then burn the SAVED pages.

#       Do this by just commenting out the text with leading #

#

#       Record layout information:

#       Each record contains the 12 byte header which corresponds to the standard 4-byte header which

#       is then followed by the 8 byte block descriptor. Do NOT change any of these values.

#       Next, you have the mode page itself.  The 13th byte corresponds to the first byte of the mode

#       page. You will note the high order bit is set for the mode page number. This is due to the

#       ANSI specification, and is something that is done for this byte only. So, if you want mode

#       page number 3, you will see this reported as 83h.

#

#

#   The 14th byte corresponds to second mode page byte, which is always the page length.

#

#   Example:  You want to enable the write cache for a disk.  The ANSI spec states this is bit #2, byte #2

#             on mode page 8. (So the 88 corresponds to Mode page byte #0)

#             Sample Original Value (Write cache disabled):

#                ; ModePage 08 SAVED:

#                000000 1F 00 10 08 04 45 DC CC 00 00 02 00 88 12 10 00

#                000010 FF FF 00 00 FF FF FF FF 00 20 00 00 00 00 00 00

#

#             Change to:

#                ; ModePage 08 SAVED:

#                000000 1F 00 10 08 04 45 DC CC 00 00 02 00 88 12 14 00

#                000010 FF FF 00 00 FF FF FF FF 00 20 00 00 00 00 00 00

#

; ModePage 00 CURRENT

000000 0F 00 10 08 01 0F 33 D4 00 00 02 00 80 02 07 00

; ModePage 00 CHANGEABLE [read only]:

000000 0F 00 10 08 01 0F 33 D4 00 00 02 00 80 02 77 40

; ModePage 00 FACTORY [read only]:

000000 0F 00 10 08 01 0F 33 D4 00 00 02 00 80 02 00 00

; ModePage 00 SAVED:

000000 0F 00 10 08 01 0F 33 D4 00 00 02 00 80 02 07 00

; ModePage 00 END

; ModePage 01 CURRENT

000000 17 00 10 08 01 0F 33 D4 00 00 02 00 81 0A C4 0B

000010 E8 00 00 00 0F 00 FF FF

; ModePage 01 CHANGEABLE [read only]:

000000 17 00 10 08 01 0F 33 D4 00 00 02 00 81 0A FF FF

000010 00 00 00 00 FF 00 FF FF

; ModePage 01 FACTORY [read only]:

000000 17 00 10 08 01 0F 33 D4 00 00 02 00 81 0A C0 0B

000010 E8 00 00 00 0F 00 FF FF

; ModePage 01 SAVED:

000000 17 00 10 08 01 0F 33 D4 00 00 02 00 81 0A C4 0B

000010 E8 00 00 00 0F 00 FF FF

; ModePage 01 END

; ModePage 02 CURRENT

000000 1B 00 10 08 01 0F 33 D4 00 00 02 00 82 0E 80 80

000010 00 0A 00 00 00 00 00 00 00 00 00 00

; ModePage 02 CHANGEABLE [read only]:

000000 1B 00 10 08 01 0F 33 D4 00 00 02 00 82 0E FF FF

000010 00 00 00 00 00 00 00 00 87 00 00 00

; ModePage 02 FACTORY [read only]:

000000 1B 00 10 08 01 0F 33 D4 00 00 02 00 82 0E 80 80

000010 00 0A 00 00 00 00 00 00 00 00 00 00

; ModePage 02 SAVED:

000000 1B 00 10 08 01 0F 33 D4 00 00 02 00 82 0E 80 80

000010 00 0A 00 00 00 00 00 00 00 00 00 00

; ModePage 02 END

; ModePage 03 CURRENT

000000 23 00 10 08 01 0F 33 D4 00 00 02 00 83 16 0A BE

000010 00 00 00 10 00 00 01 30 02 00 00 01 00 30 00 34

000020 40 00 00 00

; ModePage 03 CHANGEABLE [read only]:

000000 23 00 10 08 01 0F 33 D4 00 00 02 00 83 16 00 00

000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

000020 00 00 00 00

; ModePage 03 FACTORY [read only]:

000000 23 00 10 08 01 0F 33 D4 00 00 02 00 83 16 0A BE

000010 00 00 00 10 00 00 01 30 02 00 00 01 00 30 00 34

000020 40 00 00 00

; ModePage 03 SAVED:

000000 23 00 10 08 01 0F 33 D4 00 00 02 00 83 16 0A BE

000010 00 00 00 10 00 00 01 30 02 00 00 01 00 30 00 34

000020 40 00 00 00

; ModePage 03 END

; ModePage 04 CURRENT

000000 23 00 10 08 01 0F 33 D4 00 00 02 00 84 16 00 2D

000010 C9 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00

000020 1C 27 00 00

; ModePage 04 CHANGEABLE [read only]:

000000 23 00 10 08 01 0F 33 D4 00 00 02 00 84 16 00 00

000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

000020 00 00 00 00

; ModePage 04 FACTORY [read only]:

000000 23 00 10 08 01 0F 33 D4 00 00 02 00 84 16 00 2D

000010 C9 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00

000020 1C 27 00 00

; ModePage 04 SAVED:

000000 23 00 10 08 01 0F 33 D4 00 00 02 00 84 16 00 2D

000010 C9 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00

000020 1C 27 00 00

; ModePage 04 END

; ModePage 07 CURRENT

 

 

 

 

000000 17 00 10 08 01 0F 33 D4 00 00 02 00 87 0A 00 0B

000010 E8 00 00 00 00 00 FF FF

; ModePage 07 CHANGEABLE [read only]:

000000 17 00 10 08 01 0F 33 D4 00 00 02 00 87 0A 0F FF

000010 00 00 00 00 00 00 FF FF

; ModePage 07 FACTORY [read only]:

000000 17 00 10 08 01 0F 33 D4 00 00 02 00 87 0A 00 0B

000010 E8 00 00 00 00 00 FF FF

; ModePage 07 SAVED:

000000 17 00 10 08 01 0F 33 D4 00 00 02 00 87 0A 00 0B

000010 E8 00 00 00 00 00 FF FF

; ModePage 07 END

; ModePage 08 CURRENT

000000 17 00 10 08 01 0F 33 D4 00 00 02 00 88 0A 10 00

000010 FF FF 00 00 FF FF FF FF

; ModePage 08 CHANGEABLE [read only]:

#

; ModePage 1A SAVED:

000000 17 00 10 08 01 0F 33 D4 00 00 02 00 9A 0A 00 03

000010 00 00 00 01 00 00 00 04

; ModePage 1A END

; ModePage 1C CURRENT

000000 17 00 10 08 01 0F 33 D4 00 00 02 00 9C 0A 00 04

000010 00 00 17 70 00 00 00 00

; ModePage 1C CHANGEABLE [read only]:

000000 17 00 10 08 01 0F 33 D4 00 00 02 00 9C 0A 8D 0F

000010 FF FF FF FF FF FF FF FF

; ModePage 1C FACTORY [read only]:

000000 17 00 10 08 01 0F 33 D4 00 00 02 00 9C 0A 00 00

000010 00 00 00 00 00 00 00 01

; ModePage 1C SAVED:

000000 17 00 10 08 01 0F 33 D4 00 00 02 00 9C 0A 08 00

000010 00 00 00 00 00 00 00 01

; ModePage 1C END

#

# End-of-file

 

Writing (Exporting) Mode Pages and Saving to File

Syntax:                smartmon-ux-mpimport-ux  FILENDevice_listAME

Example:        smartmon-ux -mpimport SEAGATEMASTER.TXT /dev/rdsk/c0d0s0

 

The above will read and save all information from the file and save it to the device. You can also clone mode pages to more than one device at a time by entering multiple devices or using wild cards.

(Such as smartmon-ux -mpexport SEAGATEMASTER.TXT /dev/rdsk/c0d1s0 /dev/rdsk/c0d2s0)

 

Application Notes & Comments

The file used with these commands is in ASCII format so you can modify it with a standard text editor.

 

To leave individual byte settings unchanged, replace those bytes with the XX characters, as in:

000000 17 00 10 08 01 0F 33 D4 00 00 02 00 9C XX 00 XX

 

If you wanted to leave a particular mode page unchanged, delete it from the file. If you wanted to leave the SAVED settings alone for the drive above, delete the three lines marked in blue from the file, then run the -mpexport command as before.

 

The FACTORY and CHANGEABLE pages are not programmable. We chose to copy them into the file because it is convenient for  the user to know this information. The program does not view or interpret this information in any way.

 

Other features of mpexport:

All lines beginning with the # character are ignored. Feel free to append the file with additional comments.
Currently, the program ignores the ";" lines that report the timestamp and the make/model of device. This may change in the future, so do not modify them.
Do not modify any lines that begin with the ";"
10-byte mode pages are not supported in the initial release. If your device uses the 10-byte version of MODE SENSE or MODE SELECT, those pages will be skipped.

 

Warning:

Changing mode pages can be dangerous if you do not know what you are doing. We advise you to always take the conservative approach and just change the CURRENT page to make sure the settings have the desired affect (use the # character to comment out the SAVED pages in the file).

 

If things do not go well, you can just recycle power and the device.  The CURRENT page will revert to the SAVED page.