1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320
|
SFORMAT draft(1L) Schily's USER COMMANDS SFORMAT draft(1L)
NNNNAAAAMMMMEEEE
sformat - SCSI disk formatting/partitioning/analysis/repair
utility
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
ssssffffoooorrrrmmmmaaaatttt [[[[ooooppppttttiiiioooonnnnssss]]]] ttttaaaarrrrggggeeeetttt lllluuuunnnn [[[[ssssccccssssiiiibbbbuuuussss]]]]
ssssffffoooorrrrmmmmaaaatttt [[[[ooooppppttttiiiioooonnnnssss]]]]
The first form will select the named disk directly. Have a
look at the chapter about FFFFoooolllllllloooowwwwiiiinnnngggg TTTThhhheeee MMMMaaaaiiiinnnn TTTThhhhrrrreeeeaaaadddd for more
details.
The second form will scan all SCSI busses and enter a selec-
tion menu. Have a look at the chapter about TTTThhhheeee SSSSCCCCSSSSIIII SSSSeeeelllleeeecccc----
ttttiiiioooonnnn MMMMeeeennnnuuuu for more details.
SSSSffffoooorrrrmmmmaaaatttt will never destroy or modify any data unless expli-
citly confirmed just before the (possibly) destructive
action. Have a look at the chapter about HHHHoooowwww TTTToooo AAAAnnnnsssswwwweeeerrrr
QQQQuuuueeeessssttttiiiioooonnnnssss first.
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
SSSSffffoooorrrrmmmmaaaatttt is the first SCSI disk formatting utility that runs
under _S_u_n_O_S. Long before Sun decided that formatting and
partitioning a disk from a stand alone program is less con-
venient than doing this job from a running UNIX, ssssffffoooorrrrmmmmaaaatttt has
been available.
SSSSffffoooorrrrmmmmaaaatttt leads the beginner through a thread menu and allows
the experienced user to do more things than he could do with
other disk maintenance programs. All partitioning jobs can
be done without the need for a desc calculator.
If you want to do more than simple things, you should care-
fully read the whole manual. It contains many tips and
tricks that will help you to recover disks that would have
to be sent back to the manufacturer for repair otherwise.
SSSSffffoooorrrrmmmmaaaatttt includes the competence of more than ten years in
disk handling and will be able to repair more disks than
other disk maintenance programs. SSSSffffoooorrrrmmmmaaaatttt offers special
maintenance tests to find the reason for complex disk
failures.
DDDDiiiisssskkkk DDDDaaaattttaaaabbbbaaaasssseeee EEEEnnnnttttrrrriiiieeeessss
Be nice to other users of ssssffffoooorrrrmmmmaaaatttt. Create database
(sformat.dat) entries for disks that are not in the data
base using the ----PPPPrrrroooottttoooo flag and mail them to the author.
This helps other users and you too. See section on CCCCrrrreeeeaaaattttiiiinnnngggg
DDDDiiiisssskkkk DDDDaaaattttaaaabbbbaaaasssseeee EEEEnnnnttttrrrriiiieeeessss below.
Joerg Schilling Last change: 2. January 1997 1
SFORMAT draft(1L) Schily's USER COMMANDS SFORMAT draft(1L)
OOOOPPPPTTTTIIIIOOOONNNNSSSS
-help, -h Print a summary of the most important
options for ssssffffoooorrrrmmmmaaaatttt.
-xhelp Print a summary of less frequently used
options for ssssffffoooorrrrmmmmaaaatttt.
-ask Ask again at certain critical sections.
This will currently prompt before modify-
ing the disk when in repair mode.
-auto, -a autoformat mode (for production sys-
tems). When this option is in effect,
ssssffffoooorrrrmmmmaaaatttt will not ask whether to modify the
format and partition parameters and will
only format disks that are known in the
data base. There will be only one ques-
tion to answer. This will immediately
start the formatting process. The ----aaaauuuuttttoooo
option enables certain additional verifi-
cations that will guarantee that the disks
have a known firmware release and will
inform the user that the disk is bad if
certain quality tests failed. The disk
will not be formatted if the signature
code in the data base is bad. This option
has not been verified during the last
three years. If you need this mode ask
the author for additional verification of
the code.
Cveri=#,C=# Number of blocks/verify. SSSSffffoooorrrrmmmmaaaatttt normally
will try to verify 1000 sectors with one
SCSI command. Some old disk firmware may
not able to deal with a number that will
imply to read a number of sectors that
will not fit in the local memory of the
disk.
CWveri=#,CW=# Number of blocks/write-verify. The limi-
tation noted with the CCCCvvvveeeerrrriiii option applies
here again and even on newer disks.
data=name Name of disk database file (default:
'sformat.dat'). Use this option to force
ssssffffoooorrrrmmmmaaaatttt to use a different disk database
than the default. In any case, ssssffffoooorrrrmmmmaaaatttt
will search in the current directory
first. If no file of the appropriate name
was found in the current directory, ssssffffoooorrrr----
mmmmaaaatttt looks in the following path:
/_o_p_t _s_c_h_i_l_y/_e_t_c, /_e_t_c, /_u_s_r/_e_t_c.
Joerg Schilling Last change: 2. January 1997 2
SFORMAT draft(1L) Schily's USER COMMANDS SFORMAT draft(1L)
debug=#,-d Set the misc debug value to # (with
debug=#) or increment the misc debug level
by one (with -d). If you specify -_d_d, this
equals to ddddeeeebbbbuuuugggg====2222....
kdebug=#,kd=# Tell the ssssccccgggg-driver to modify the kernel
debug value while SCSI commands are run-
ning.
xdebug=#,xd=# Set the debug level for the parser of the
external disk database.
-defmodes Get default mode parameters from disk.
Normally ssssffffoooorrrrmmmmaaaatttt retrieves the default
modes parameters from the disk by default
when the disk is unformatted or has no sun
label and the current mode parameter if
the disk has a valid sun label. This
option tells ssssffffoooorrrrmmmmaaaatttt retrieve the default
mode parameters in any case.
-dmdl Do not use manufacturer defect list when
formatting a disk. This implies that a
disk that is formatted with this option
will have bad blocks. However some disks
that may not be formatted because the
manufacturer defect list is broken may
become usable again when this option is in
effect.
ESDI=# Pass ESDI command # to the drive and print
the result. This will only work if an
EMULEX MD21 SCSI/ESDI bridge controller is
present.
-force Force to continue at certain errors. This
will currently prompt after the format
command fails.
-greassign Reassign blocks. This is the guru mode,
don't use this. Read the description for
the -_r_e_a_s_s_i_g_n option for more details.
This option will simply prompt for block
numbers and then reassign them regardless
of if they need to be reassigned or not.
On some disks the block may seem to be
defective even after reassigning it
because the old data is copied to the new
location without recomputing the CRC. On
other disk the old data will be lost.
These problems will not arise if you use
the -_r_e_a_s_s_i_g_n option instead.
Joerg Schilling Last change: 2. January 1997 3
SFORMAT draft(1L) Schily's USER COMMANDS SFORMAT draft(1L)
-ign_not_found Ignore record not found errors while ver-
ifying the disk. This option is useful
when trying to repair disks with many
defects (see _m_a_x_b_a_d option). Some disk
errors may cause the whole track to appear
bad. If the reported error in these cases
is rrrreeeeccccoooorrrrdddd nnnnooootttt ffffoooouuuunnnndddd, You should first try
to repair as many blocks as possible with
this option in effect and then repair the
remaining blocks without this option.
-inq Retrieve and print SCSI inquiry data for
any type of device. This is useful even on
tape drives and scanners.
maxbad=# When ssssffffoooorrrrmmmmaaaatttt is doing a surface analysis
after formatting the disk, it collects a
number of bad blocks (usually up to 1023),
then reassigns them and then reformats the
disk to guarantee that the disk speed will
not be reduced by mapped bad blocks. Some
disks with many defective blocks will seem
to have more defective blocks than they
really have, but these false defective
blocks need not to be reassigned. This
case may be triggered if a defective block
directly follows the index. In this case
the whole track seems to be bad. If you
tell sformat to reformat the disk after
repairing one bad block (maxbad=1), this
problem will go away.
- modes Intercative modesense/modeselect. Each
mode page exists in 4 versions:
default (PROM), current (RAM), saved
(DISK) and changeable (BITMASK).
You may currently view any page if you
specify the page number. TTTThhhhiiiissss iiiissss
ccccuuuurrrrrrrreeeennnnttttllllyyyy uuuunnnnddddeeeerrrr ccccoooonnnnssssttttrrrruuuuccccttttiiiioooonnnn....
-noformat Force not to format disk even when for-
matting of the disk has been confirmed.
This option may be used to modify mode
parameters without formatting the disk.
-nomap Do not map SCSI address to logical disk
name. WARNING: If you use this option,
ssssffffoooorrrrmmmmaaaatttt is not able to check whether the
disk has mounted partitions. This may dam-
age mounted file systems.
-noparity Try to disable parity checking on all
Joerg Schilling Last change: 2. January 1997 4
SFORMAT draft(1L) Schily's USER COMMANDS SFORMAT draft(1L)
SCSI commands that are sent by ssssffffoooorrrrmmmmaaaatttt....
This may not be possible in all implemen-
tations of the _s_c_g-driver.
-nowait Do not wait after formatting the disk.
Normally, ssssffffoooorrrrmmmmaaaatttt will prompt for a modif-
ication of the disk label and partition
table before starting to verify the disk.
If this option is in effect, ssssffffoooorrrrmmmmaaaatttt will
immediately start to verify the disk after
formatting.
-no_defaults Do not set heuristic defaults. If this
option is in effect, all disk parameters
must be either retrievable from disk or,
if not available, provided by the user.
-prdefect Get and print defect data. This may be
used to print the manufacturer and grown
defect list that is stored on the disk.
-prgeom Get and print geometry data. This is an
old option but it is useful to get all
mode pages that are supported by this
disk.
-prcurgeom Get and print geometry data. This is
basically the same as -_p_r_g_e_o_m except that
- prgeom will obtain the default mode
pages, -prcurgeom will report the current
values.
-Proto This option will cause ssssffffoooorrrrmmmmaaaatttt to gen-
erate a data base entry for the current
disk. Make sure that this data base entry
will be generated with the correct format
time. SSSSffffoooorrrrmmmmaaaatttt is able to compute a format
time from the disk geometry, but newer
disks seem to need more time than com-
puted. If the format time is too short,
the formatting may be aborted and the disk
will not be accessible until formatted
again completely.
-r reformat only mode (gives less messages
on label menu)
-randrw The random read/write test is a method to
find problems that may be a result of
first seeking to a new place on disk and
then writing data to it as it is fre-
quently done by the unix file system.
Joerg Schilling Last change: 2. January 1997 5
SFORMAT draft(1L) Schily's USER COMMANDS SFORMAT draft(1L)
This is usually caused by an inode or
super block update. The above problems
may be a result of bad bearings in the
disk. If the disk does not produce errors
while this test is running, there will no
harm to the data on disk. However, if you
assume that the disk is bad, the data on
disk may get corrupted. To minimize the
risk of data loss, the first block con-
taining the disk label (partition) and the
last block containing the sinfo data (a
ssssffffoooorrrrmmmmaaaatttt specific area) will never be writ-
ten to.
-reassign Reassign a list of blocks ssssffffoooorrrrmmmmaaaatttt will
prompt for. This is the preferred command
when trying to repair a block or a list of
blocks with already known block addresses.
If you don't know the address of a defec-
tive block, use the -_r_e_p_a_i_r option. SSSSffffoooorrrr----
mmmmaaaatttt will first try to read the old content
of the defective block and then try to
refresh the data by writing the old data
to the block. If it fails to write to the
block, ssssffffoooorrrrmmmmaaaatttt will reassign the defective
block. If the block does not cause errors
after rewriting the data in it, ssssffffoooorrrrmmmmaaaatttt
will ask if the block should be reassigned
anyway. NOTE: there are many cases in
which a block seems to be defective but
actually is not. If for any reason, the
disk will be powered off during writing or
if there is electro magnetic noise the CRC
for a block may get corrupted without any
physical harm to the magnetic media. These
cases can be repaired by writing again to
the block.
-refresh_only SSSSffffoooorrrrmmmmaaaatttt will not try to reassign a block
that still fails after rewriting (refresh-
ing) the data in it. This option is use-
ful in conjunction with the -_r_e_a_s_s_i_g_n and
the -_r_e_p_a_i_r option.
-repair This is a combination of the -_v_e_r_i_f_y and
-_r_e_a_s_s_i_g_n option. SSSSffffoooorrrrmmmmaaaatttt will first ver-
ify the disk and then use the list of bad
sectors found to repair the disk.
RW=# Number of random R/W loops that is used
with the -_r_a_n_d_r_w option. The default is
the number of physical sectors / 100.
Joerg Schilling Last change: 2. January 1997 6
SFORMAT draft(1L) Schily's USER COMMANDS SFORMAT draft(1L)
This will not last too long and is enough
to cover every cylinder of the disk.
-scsi_compliant Be as SCSI-compliant as possible. This
will some old disk cause to fail in
reporting mode pages correctly and may be
used to see if a disk has these problems.
-seek Do _r_a_n_d_o_m or _f_u_l_l _s_t_r_o_k_e seek tests on
the disk. This is done by reading data;
trying to do _f_u_l_l _s_t_r_o_k_e seek tests my be
impossible because of the cache of the
disk.
-setmodes Do a SCSI modeselect with all parameters,
that would have been necessary for a for-
mat, but do not format the disk. This
allows to modify the mode pages of a disk
without reformatting it. If the ---- ssssmmmmpppp
option is used in conjunction with ----sssseeeetttt----
mmmmooooddddeeeessss the mode parameters will not be
saved. In this case, the mode parameters
of the disk will return to their old
values if a reset or a power cycle occurs.
-silent, -s Do not print out the status of failed
commands.
-smp Do not try to save mode parameters when
setting them. This option is useful if a
nearly totally damaged disk must be refor-
matted. Some disk controllers, in this
case will reject to format the disk if the
area on disk where this data will be
stored is not accessible before formatting
the disk.
-start Send a SCSI START UNIT command to the
device. This will normally spin up the
spindle motor of a disk.
-stop Send a SCSI STOP UNIT command to the dev-
ice. This will normally spin down the
spindle motor of a disk.
timeout=# This option will set the default kernel
timeout for all SCSI commands that are
send by sformat to # seconds. The default
value is 20 seconds. This option does not
affect the timeout for the format command.
-tr, -t This is an option that is only useful
Joerg Schilling Last change: 2. January 1997 7
SFORMAT draft(1L) Schily's USER COMMANDS SFORMAT draft(1L)
with old AAAAddddaaaapppptttteeeecccc SCSI bridge controllers.
These controllers are not able to deal
with logical sector numbers in some cases.
Therefore these numbers have to be
translated to the _c_y_l_i_n_d_e_r/_h_e_a_d/_b_f_i form
before. This is done by seeking to the
named block and reading the sector header.
It may fail if the block has a bad sector
header.
V=# Set the number of verify passes that are
done after formatting a disk to #. The
default value is 5. In write verify mode,
this number is doubled because ssssffffoooorrrrmmmmaaaatttt
will alternate write verify and read ver-
ify passes in this case.
-verbose, -v be verbose. This options tells ssssffffoooorrrrmmmmaaaatttt
to dump all SCSI command descriptor blocks
and all data that is transferred to/from
the target in hexadecimal form.
-verify This options starts ssssffffoooorrrrmmmmaaaatttt in verify
disk (surface analysis) mode. Verifying a
disk is a method that allows to scan for
defects without modifying data on the
disk. In this mode, the controller will
read the disks without transferring data
to the computer while all error recovery
is disabled.
Vstart=# Set the first block for the - _v_e_r_i_f_y, -
_r_e_p_a_i_r, -_r_a_n_d_r_w or the -_s_e_e_k option to #.
This is recommended when doing a surface
analysis on large disks where is is known
that the bad sector is near the end of the
disk.
Vend=# Set the last block for the - _v_e_r_i_f_y, -
_r_e_p_a_i_r, -_r_a_n_d_r_w or the -_s_e_e_k option to #.
This is recommended when doing a surface
analysis on large disks where is is known
that the bad sectors are not at the end of
the disk.
-wrveri If this option is used in while format-
ting a disk, it tells ssssffffoooorrrrmmmmaaaatttt to write
verify the disk instead of only read veri-
fying it after formatting. If it is used
in combination with the - _v_e_r_i_f_y option,
ssssffffoooorrrrmmmmaaaatttt will write verify the disk without
prior formatting. In both cases, the old
Joerg Schilling Last change: 2. January 1997 8
SFORMAT draft(1L) Schily's USER COMMANDS SFORMAT draft(1L)
data on disk will be damaged. Write veri-
fying a disk is recommended if the disk is
older than two years or has unusual
defects. Usual defects in this context are
recovered read errors and defects that
disappear when simply writing to the
defect sector.
HHHHoooowwww TTTToooo AAAAnnnnsssswwwweeeerrrr QQQQuuuueeeessssttttiiiioooonnnnssss
There are four types of questions.
+o Questions that can be answered with _y_e_s or _n_o. Yes may
be abbreviated with 'y' or 'Y'. These questions are
always assumed to be answered with _n_o if you simply
enter _c_a_r_r_i_a_g_e _r_e_t_u_r_n. NOTE: the latter is always a
_s_a_f_e answer. All questions that request confirmation
for actions that may damage or modify data on disk are
formed in such a way that answering them with _n_o or
_c_a_r_r_i_a_g_e _r_e_t_u_r_n will not harm any data. All answers to
this type of questions except [_y]_e_s or [_Y]_E_S are inter-
preted as if _n_o has been entered.
+o Questions that need a string as input. If you simply
enter _c_a_r_r_i_a_g_e _r_e_t_u_r_n to this type of question, no
modification of the default string will be done.
+o Questions that need a word selected from a list of
valid words as input. If you enter '?', you will get a
list of possible input to that question. Each word is
on a separate line an (in some cases) is followed by a
explanation how to use it.
+o Questions that need a number within a certain range.
For this type of questions, ssssffffoooorrrrmmmmaaaatttt displays the
current value and the valid range in parenthesis. The
default radix for numbers is ten. If you need to enter
a hexadecimal number precede it with _0_x if you need to
enter an octal number, precede it with _0.
^ Entering an accent circumflex '^' will set the
value to the smallest possible
$ Entering an dollar sign '$' will set the value to
the greatest possible
+ Entering a _p_l_u_s _s_i_g_n will increment the current
value by one.
- Entering a _m_i_n_u_s _s_i_g_n will decrement the current
value by one.
Joerg Schilling Last change: 2. January 1997 9
SFORMAT draft(1L) Schily's USER COMMANDS SFORMAT draft(1L)
<CR> Entering a _c_a_r_r_i_a_g_e _r_e_t_u_r_n will not modify the
current value. If the default value is -1, you
need to supply a valid value to be allowed to
leave the question menu.
All questions that do not request a simple string (second
type of question) will accept a question mark '?' to display
online help.
TTTThhhheeee SSSSCCCCSSSSIIII SSSSeeeelllleeeeccccttttiiiioooonnnn MMMMeeeennnnuuuu
When SSSSffffoooorrrrmmmmaaaatttt is started without or with insufficient parame-
ters, the SCSI menu mode is entered. A typical output in
this case looks like:
sparky joerg > sformat
sformat SCSI format/analysis/repair utilities
Release 3.1, Copyright J. Schilling
scg0 at esp0 initiator id 7
scg1 at esp1 initiator id 7
scsibus0:
c0t0d0 0) 'Quantum ' 'XP34300 ' 'F76D' Disk
c0t1d0 1) 'SEAGATE ' 'ST11200N ' '8334' Disk
2) *
c0t3d0 3) 'TOSHIBA ' 'MK537FB/ ' '6258' Disk
4) 'WANGTEK ' '5150ES SCSI-36 ' 'ESB6' Removable Tape
5) 'EXABYTE ' 'EXB-8500-85QUE ' '0428' Removable Tape
6) 'TOSHIBA ' 'XM-3401TASUNSLCD' '3593' Removable CD-ROM
7) HOST ADAPTOR
scsibus1:
c1t0d0,c1t0d1 10) 'EMULEX ' 'MD21/S2 ESDI' 'D00 ' Disk
11) *
c1t2d0 12) 'Maxoptix' 'T3-1304 ' '1.1c' Removable Disk
13) *
14) *
15) *
16) *
17) HOST ADAPTOR
Select target -1 (0 - 12)/<cr>:
The line:
c0t0d0 0) 'Quantum ' 'XP34300 ' 'F76D' Disk
shows the canonical logical disk name (in this case cccc0000tttt0000dddd0000),
the menu number, the SCSI inquiry string and a description
of the device type that was found on this SCSI target. The
menu number is directly related to the SCSI target id of the
device and the SCSI bus number. Number 3 is SCSI target # 3
on SCSI bus # 0. Number 12 is SCSI target # 2 on SCSI bus #
1. SSSSffffoooorrrrmmmmaaaatttt is currently not able to deal with more than 8
Joerg Schilling Last change: 2. January 1997 10
SFORMAT draft(1L) Schily's USER COMMANDS SFORMAT draft(1L)
targets on a bus.
When selecting a target (.e.g. # 0), a logical unit selec-
tion menu will be displayed.
Select target -1 (0 - 6)/<cr>:0
scsibus0 target 0:
c0t0d0 0) 'Quantum ' 'XP34300 ' 'F76D' Disk
1) 'Quantum ' 'XP34300 ' 'F76D' unsupported
2) 'Quantum ' 'XP34300 ' 'F76D' unsupported
3) 'Quantum ' 'XP34300 ' 'F76D' unsupported
4) 'Quantum ' 'XP34300 ' 'F76D' unsupported
5) 'Quantum ' 'XP34300 ' 'F76D' unsupported
6) 'Quantum ' 'XP34300 ' 'F76D' unsupported
7) 'Quantum ' 'XP34300 ' 'F76D' unsupported
Select lun -1 (0 - 7)/<cr>:
The logical unit menu has the same structure as the SCSI
target menu. If the device description contains the word
_u_n_s_u_p_p_o_r_t_e_d, the controller is not able to support a logical
unit of this number. If the device description contains the
word _u_n_i_t _n_o_t _p_r_e_s_e_n_t, the controller is able to support a
logical unit of this number but there is actually no device
connected.
When selecting a specific logical unit, the main thread is
entered as if a complete SCSI target specification has been
entered from the command line.
FFFFoooolllllllloooowwwwiiiinnnngggg TTTThhhheeee MMMMaaaaiiiinnnn TTTThhhhrrrreeeeaaaadddd
If the main formatting thread is entered, the following
stages are encountered:
Mapping and checking
The first thing ssssffffoooorrrrmmmmaaaatttt does, is to map
the SCSI target/lun/busid triplet into a
logical disk name and to check if some
part of the disk is currently mounted.
This mapping will be skipped if the -
_n_o_m_a_p options is specified. If the disk
is mounted, the user will be asked if it
is ok to continue.
Note: this is currently the one and only
question.
Inquiry The second action is getting the inquiry
data from the device. The device type
is determined from this data.
Test if device is ready
The next action is to test whether the
Joerg Schilling Last change: 2. January 1997 11
SFORMAT draft(1L) Schily's USER COMMANDS SFORMAT draft(1L)
device is ready and to wait for the dev-
ice to become ready. When the device is
ready, it is recalibrated.
Exit for wrong device type
When the device is not a disk, a worm
media or optical memory, ssssffffoooorrrrmmmmaaaatttt ter-
minates.
Read sinfo data When the device is a disk, ssssffffoooorrrrmmmmaaaatttt tries
to read the ssssiiiinnnnffffoooo data from the disk.
This allows the user to see if the dev-
ice has been formatted with ssssffffoooorrrrmmmmaaaatttt
before. If so, ssssffffoooorrrrmmmmaaaatttt will print out
the number of reformats and the date of
the first and last format. SSSSiiiinnnnffffoooo is .B
sformat specific data that is hold on
the last block of the disk.
Process special commands
If options tell ssssffffoooorrrrmmmmaaaatttt to take special
actions (like -_s_t_a_r_t or -_p_r_d_e_f_e_c_t), they
are done here. SSSSffffoooorrrrmmmmaaaatttt terminates after
processing them.
The formatting procedure starts
The next actions are in preparation for
formatting the disk. Several other
things can be done from this thread.
Modifying the disk label will be one
example. You need not to be in fear
that following this thread will modify
or harm data on the disk. There will be
extra questions that secure this case.
Test whether the disk is formatted
Several procedures differ if the disk is
already formatted and has a valid label.
The next parts of the main thread will give you some ques-
tions to answer. You may skip most of the questions if you
do not want to modify anything.
If some data that is definitely needed by ssssffffoooorrrrmmmmaaaatttt can not be
determined from the disk or the data base, ssssffffoooorrrrmmmmaaaatttt will
force you to answer all questions of a group. SSSSffffoooorrrrmmmmaaaatttt will
only ask question for parameters that are definitely needed
or may be changed on the current disk. The content of the
menus differ from disk to disk.
Read mode data
Several mode pages of the disk are read. This data and
Joerg Schilling Last change: 2. January 1997 12
SFORMAT draft(1L) Schily's USER COMMANDS SFORMAT draft(1L)
the inquiry data is used to search in the disk data
base.
SSSSffffoooorrrrmmmmaaaatttt asks:
_I_g_n_o_r_e _d_a_t_a_b_a_s_e _d_i_s_k _p_a_r_a_m_e_t_e_r_s _f_r_o_m '_s_f_o_r_m_a_t._d_a_t'?
If you don't want the data from the data base to be
used, negotiate the appropriate question. Some disks
cannot be determined from the fetchable data. This are
mainly disks that are connected to a bridge controller
e.g. a controller from ESDI to SCSI. SSSSffffoooorrrrmmmmaaaatttt is able
to detect the right data in the data base for disks
with changeable media e.g. optical disks that support
different media with different capacity and geometry.
If there is more than one possible entry for this disk
in the data base,
ssssffffoooorrrrmmmmaaaatttt asks:
_S_e_l_e_c_t _a_l_t_e_r_n_a_t_e _d_i_s_k _t_y_p_e?
If the disk type menu is entered, all possible data
base entries are displayed. The current entry is
marked with '*', the default entry is marked with '+'
and the entry most similar to the current disk is
marked with '~'. A matching factor is displayed in
parenthesis. Higher values are indicating a better
match.
Read in label data
If the disk is already formatted, ssssffffoooorrrrmmmmaaaatttt reads in the
label and ask whether to remember this data.
SSSSffffoooorrrrmmmmaaaatttt asks:
_I_g_n_o_r_e _o_l_d _d_i_s_k _L_a_b_e_l?
I you confirm this question and reformat the disk, the
old partitioning information will be lost.
Disk Parameters Menu
If you want to modify some disk parameters answer the
next question with 'y'.
SSSSffffoooorrrrmmmmaaaatttt asks:
_M_o_d_i_f_y _D_i_s_k _G_e_o_m_e_t_r_y _P_a_r_a_m_e_t_e_r_s?
This enables to modify basic data on geometry, the
interleaving factor and the defect management system.
If you want to do spindle synchronization, activate it
here.
Error Recovery
Error recovery parameters include read/write retry
count and similar.
SSSSffffoooorrrrmmmmaaaatttt asks:
_M_o_d_i_f_y _E_r_r_o_r _r_e_c_o_v_e_r_y _P_a_r_a_m_e_t_e_r_s?
Disconnect Parameter
Disconnect parameters are buffer full/empty ratio and
bus inactivity limit.
SSSSffffoooorrrrmmmmaaaatttt asks:
Joerg Schilling Last change: 2. January 1997 13
SFORMAT draft(1L) Schily's USER COMMANDS SFORMAT draft(1L)
_M_o_d_i_f_y _D_i_s_c_o_n_n_e_c_t _P_a_r_a_m_e_t_e_r_s
Alternate Label
If you want to use an alternate label that may be in
the data base go into the next menu.
SSSSffffoooorrrrmmmmaaaatttt asks:
_S_e_l_e_c_t _a_l_t_e_r_n_a_t_e _L_a_b_e_l?
The current entry is marked with '*', the default entry
is marked with '+'.
Logical Label Geometry
SSSSffffoooorrrrmmmmaaaatttt uses an abstract geometry in the label. This
allows to have one label for a group of disks. The
label geometry menu allows to modify this abstract
geometry.
SSSSffffoooorrrrmmmmaaaatttt asks:
_M_o_d_i_f_y _L_a_b_e_l _G_e_o_m_e_t_r_y _P_a_r_a_m_e_t_e_r_s?
SCSI Parameters
This menu contains questions about command queuing,
defect list format and similar. Some disks do not sup-
port the default block defect list format. Specify
another format in this case here. If the disk does not
support the SCSI write-verify command, ssssffffoooorrrrmmmmaaaatttt allows
to split this into a SCSI write and a SCSI verify com-
mand. The data cannot be compared in this case. If
the disk type is generally flaky a data base entry can
be set up to do write verify as default after format-
ting. If the disk will not handle 1000 blocks per ver-
ify command because of a firmware bug, a smaller value
may be specified here.
SSSSffffoooorrrrmmmmaaaatttt asks:
_M_o_d_i_f_y _S_C_S_I _P_a_r_a_m_e_t_e_r_s?
Grown Defect List
If a disk has not been formatted before or has been
refurbished, you should clear the old grown defect list
to get a clean start. If the disk has bad blocks, ssssffffoooorrrr----
mmmmaaaatttt will find them after formatting while doing the
surface analysis. If the disk has known defects you
should negotiate the next question to keep the defect
list.
SSSSffffoooorrrrmmmmaaaatttt asks:
_C_l_e_a_r _o_l_d _g_r_o_w_n _d_e_f_e_c_t _l_i_s_t?
Mode pages
If you want to format the disk, you need to set the
mode pages before.
SSSSffffoooorrrrmmmmaaaatttt asks:
_S_e_t _m_o_d_e _p_a_g_e_s (_n_e_e_d_e_d _f_o_r _f_o_r_m_a_t)?
However, if you do not want to format the disk, you may
negotiate this question and will be lead to the label
Joerg Schilling Last change: 2. January 1997 14
SFORMAT draft(1L) Schily's USER COMMANDS SFORMAT draft(1L)
modification menu.
Formatting the disk
The next question is the last one you will be asked
before starting to format the disk. If formatting has
started, you will see the progress of this process
indicated in the used up percentage of the estimated
time.
SSSSffffoooorrrrmmmmaaaatttt asks:
_F_o_r_m_a_t _D_i_s_k _d_e_s_t_r_o_y_s _a_l_l _D_a_t_a. _R_e_a_l_l_y?
If you only want to set the mode pages, you may this
question with 'n'.
Creating and modifying the disk label
After the disk has been formatted or if the formatting
has been denied, the label menu is entered.
SSSSffffoooorrrrmmmmaaaatttt asks:
_P_r_i_n_t _d_i_s_k _l_a_b_e_l?
If you want to see the current layout of the disk
label, enter 'y'.
SSSSffffoooorrrrmmmmaaaatttt asks:
_M_o_d_i_f_y _d_i_s_k _l_a_b_e_l?
If you want to modify the disk label enter 'y'.
Inside the label modification menu
SSSSffffoooorrrrmmmmaaaatttt asks:
_L_a_b_e_l: <_Q_u_a_n_t_u_m _X_P_3_4_3_0_0> _c_h_a_n_g_e ?
If you want to retain the old label name, enter <CR>,
else enter 'y'. SSSSffffoooorrrrmmmmaaaatttt will ask for the new Label
name.
SSSSffffoooorrrrmmmmaaaatttt asks:
_E_n_t_e_r _d_i_s_k _l_a_b_e_l: _Q_u_a_n_t_u_m _X_P_3_4_3_0_0
You are left in the tty line edit mode and may modify
the input line (see termio(7) manual page).
SSSSffffoooorrrrmmmmaaaatttt asks:
_V_o_l_u_m_e _N_a_m_e: <> _c_h_a_n_g_e ?
If you want to retain the old label name, enter <CR>,
else enter 'y'. SSSSffffoooorrrrmmmmaaaatttt will ask for the new Volume
name.
SSSSffffoooorrrrmmmmaaaatttt asks:
_C_h_a_n_g_e _p_a_r_t_i_t_i_o_n _t_a_b_l_e?
If you want to change the partition table enter 'y'.
SSSSffffoooorrrrmmmmaaaatttt asks:
_P_a_r_t _T_a_g _F_l_a_g _C_y_l_i_n_d_e_r_s _S_t_a_r_t_s_e_c # _o_f _S_e_c
_S_i_z_e _B_l_o_c_k_s
_0 _r_o_o_t _w_m _0 - _3_0 _0 _6_7_5_8_0
_3_2._9_9_M_B (_3_1/_0/_0)
_C_h_a_n_g_e ?
If you want to modify this partition enter 'y', other-
wise enter <CR> until ssssffffoooorrrrmmmmaaaatttt asks for the partition
you want to change.
SSSSffffoooorrrrmmmmaaaatttt asks:
Joerg Schilling Last change: 2. January 1997 15
SFORMAT draft(1L) Schily's USER COMMANDS SFORMAT draft(1L)
_E_n_t_e_r _p_a_r_t_i_t_i_o_n _i_d _T_a_g [_r_o_o_t]:
Enter <CR> if the partition tag is ok for this parti-
tion, otherwise enter '?' to get a list of valid parti-
tion tags or enter the new partition tag.
SSSSffffoooorrrrmmmmaaaatttt asks:
_E_n_t_e_r _p_a_r_t_i_t_i_o_n _p_e_r_m_i_s_s_i_o_n _F_l_a_g_s [_w_m]:
Enter <CR> if the partition flag is ok for this parti-
tion, otherwise enter '?' to get a list of valid parti-
tion flags or enter the new partition flag.
SSSSffffoooorrrrmmmmaaaatttt asks:
_E_n_t_e_r _s_t_a_r_t_i_n_g _c_y_l_i_n_d_e_r _0 (_0 - _3_8_5_1)/<_c_r>:
Enter <CR> if the starting cylinder is ok for this par-
tition, otherwise enter '?' to get a list of possible
input. XXX
SSSSffffoooorrrrmmmmaaaatttt asks:
_E_n_t_e_r _n_u_m_b_e_r _o_f _b_l_o_c_k_s _6_7_5_8_0, _3_1/_0/_0 (_0 -
_8_3_9_5_1_8_0)/<_c_r>:
Enter <CR> if the size is ok for this partition, other-
wise enter '?' to get a list of possible input. XXX
SSSSffffoooorrrrmmmmaaaatttt asks:
_P_a_r_t _T_a_g _F_l_a_g _C_y_l_i_n_d_e_r_s _S_t_a_r_t_s_e_c # _o_f _S_e_c
_S_i_z_e _B_l_o_c_k_s
_0 _r_o_o_t _w_m _0 - _3_0 _0 _6_7_5_8_0
_3_2._9_9_M_B (_3_1/_0/_0)
_O_k ?
Enter <CR> if you still want to modify the partition
record. You then will be asked again for all parame-
ters of this partition. Enter 'y' if this partition is
now ok.
If all partitions are cycled through, ssssffffoooorrrrmmmmaaaatttt will
display the current label.
SSSSffffoooorrrrmmmmaaaatttt asks:
_U_s_e _t_h_i_s _l_a_b_e_l?
If you enter 'y', ssssffffoooorrrrmmmmaaaatttt will update the label on disk
and go into the verify mode. Anything else will put
you into the label modification mode again.
Disk Verification
In disk verification mode, ssssffffoooorrrrmmmmaaaatttt will do a surface
analysis. If a bad block is encountered, ssssffffoooorrrrmmmmaaaatttt will
reassign this bad block. XXX
HHHHoooowwww TTTToooo FFFFoooorrrrmmmmaaaatttt AAAA DDDDiiiisssskkkk
The number of defects that SCSI disks can handle depends on
the defect mapping system they use. There are several possi-
ble systems:
The mapping system depends on the # of tracks per zone in
the SCSI disk parameters. Mapping area in this table means
spare location.
Joerg Schilling Last change: 2. January 1997 16
SFORMAT draft(1L) Schily's USER COMMANDS SFORMAT draft(1L)
1) One mapping area at the end of the disk. (tpz == 0)
2) One mapping area per track. (tpz == 1)
3) One mapping area per cylinder. (tpz == nhead)
4) Some mapping areas on on the disk (tpz > nhead)
If all the space in the defect spare locations above is used
up, there still may be an additional mapping area at the end
of the disk. This is controlled by the alternate tracks per
volume parameter.
If your disk says _n_o _d_e_f_e_c_t _s_p_a_r_e _l_o_c_a_t_i_o_n, you may be able
to get extra space by going into the disk parameter menu of
sformat and change a value. Note: some disks tell you that
some of the values are changeable (there is a range in
parenthesis) but actually ignore the new value. You will
have to read the values after formatting to see if the new
parameters are in effect.
HHHHoooowwww TTTToooo MMMMooooddddiiiiffffyyyy AAAA LLLLaaaabbbbeeeellll
Remember, don't panic. You need no desc calculator to create
or modify a partition table.
The alternate cylinders are historic relics. In good old
days (1982) when SMD disks that were not able to do defect
mapping have been used, these alternates were added to do
the defect mapping in the driver. In these days the space
occupied by these spare cylinders really has been used as
alternate (spare) space.
Currently they are only used for some copies of the primary
disk label and an outdated copy of the defect list is only
able to hold 127 defects :-(.
The label geometry cannot be changed in the partition menu.
It must be set before from the LLLLaaaabbbbeeeellll PPPPaaaarrrraaaammmmeeeetttteeeerrrrssss menu.
Print disk label? If this question is answered
with 'y', the label and parti-
tioning info will be
displayed.
Modify disk label? If this question is answered
with 'y', the label modifica-
tion menu will be entered.
Label: <Toshiba 1015MB> change ?
If this question is answered
Joerg Schilling Last change: 2. January 1997 17
SFORMAT draft(1L) Schily's USER COMMANDS SFORMAT draft(1L)
with 'y', the name of the
label nay be modified.
Volume Name: <5.3> change ? If this question is answered
with 'y', the system V volume
name may be altered.
Change partition table? If this question is answered
with 'y', a partition menu
will be displayed.
Use this label?
GGGGrrrraaaapppphhhhiiiiccccaaaallll LLLLaaaabbbbeeeellll DDDDiiiissssppppllllaaaayyyy
When printing the label or partition data, ssssffffoooorrrrmmmmaaaatttt uses a
simple ASCII graphical display to visualize the layout of
the partitions. The symbols used in this graphic display
are described below.
Example:
a I--/
b /-----------/
c I----------------------------------------------------------------------I
d partition not defined
e <--/
f /--------/
g <-------------------------------I
h /----------------------------------------------I
WARNING:
part 'e' has unaligned start.
part 'g' has unaligned start.
Used symbols:
I Used to mark the start end the end of the disk (no
error).
X Partition starts before zero or exceeds end of
disk.
/ Partition has an adjacent start or end with
another partition (no error).
+ Two or mode partitions have the start or the end
at the same position on the disk but no other par-
tition connects to this point. This is an error
that indicates that there may be unused space on
the disk.
< This partition does not connect to another parti-
tion on it's beginning. This is an error that
Joerg Schilling Last change: 2. January 1997 18
SFORMAT draft(1L) Schily's USER COMMANDS SFORMAT draft(1L)
indicates that there may be unused space on the
disk.
> This partition does not connect to another parti-
tion on it's end. This is an error that indicates
that there may be unused space on the disk.
* Internal error in the check routines (should never
happen).
Errors:
ends behind lncyl Partition is bigger than possible.
One or more parts are not within range of part 'c'!
Partition 'c' (2) should be the whole
disk. This warning indicates a disk
that deviates from this rule.
Warnings:
unaligned start The partition starts not in conjunction
to another partition.
unaligned end The partition ends not in conjunction to
another partition.
space before start There is no partition that uses the
space between the beginning of the disk
and the beginning of this partition.
space after end There is no partition that uses the
space between the end of this partition
and the end of the disk.
CCCCrrrreeeeaaaattttiiiinnnngggg DDDDiiiisssskkkk DDDDaaaattttaaaabbbbaaaasssseeee EEEEnnnnttttrrrriiiieeeessss
EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
FFFFIIIILLLLEEEESSSS
SSSSEEEEEEEE AAAALLLLSSSSOOOO
DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
NNNNOOOOTTTTEEEESSSS
BBBBUUUUGGGGSSSS
This is a draft of the manual changes may be daily.
Joerg Schilling Last change: 2. January 1997 19
SFORMAT draft(1L) Schily's USER COMMANDS SFORMAT draft(1L)
AAAAUUUUTTTTHHHHOOOORRRR
Joerg Schilling
Seestr. 110
D-13353 Berlin
Germany
Mail bugs and suggestions to:
jjjjooooeeeerrrrgggg@@@@sssscccchhhhiiiillllyyyy....iiiissssddddnnnn....ccccssss....ttttuuuu----bbbbeeeerrrrlllliiiinnnn....ddddeeee or jjjjssss@@@@ccccssss....ttttuuuu----bbbbeeeerrrrlllliiiinnnn....ddddeeee
Joerg Schilling Last change: 2. January 1997 20
|