Knowledge

Logical block addressing

Source 📝

261: 110:, as an abstraction. While the drive controller still addresses data blocks by their CHS address, this information is generally not used by the SCSI device driver, the OS, filesystem code, or any applications (such as databases) that access the "raw" disk. System calls requiring block-level I/O pass LBA definitions to the storage device driver; for simple cases (where one volume maps to one physical drive), this LBA is then passed directly to the drive controller. 819: 663:, LBA numbering starts with the first cylinder, first head, and track's first sector. Once the track is exhausted, numbering continues to the second head, while staying inside the first cylinder. Once all heads inside the first cylinder are exhausted, numbering continues from the second cylinder, etc. Thus, the lower the LBA value is, the closer the physical sector is to the hard drive's first (that is, outermost) cylinder. 188:
In order for the BIOS to overcome this limit and successfully work with larger hard drives, a CHS translation scheme had to be implemented in the BIOS disk I/O routines which would convert between 24-bit CHS used by INT 13h and 28-bit CHS numbering used by ATA. The translation scheme was called
301:
When the BIOS is configured to use a disk in LBA-assisted translation mode, the BIOS accesses the hardware using LBA mode, but also presents a translated CHS geometry via the INT 13h interface. The number of cylinders, heads, and sectors in the translated geometry depends on the total size of
53:
standard included 22-bit LBA as an option, which was further extended to 28-bit with the release of ATA-1 (1994) and to 48-bit with the release of ATA-6 (2003), whereas the size of entries in on-disk and in-memory data structures holding the address is typically 32 or 64 bits. Most hard disk drives
143:
allowed for 28 bit addresses in both LBA and CHS modes. The CHS scheme used 16 bits for cylinder, 4 bits for head and 8 bits for sector, counting sectors from 1 to 255. This means the reported number of heads never exceeds 16 (0–15), the number of sectors can be 255 (1–255; though 63 is often the
284:
method also introduced portability problems, as different BIOSes often used different and incompatible translation methods, and hard drives partitioned on a computer with a BIOS from a particular vendor often could not be read on a computer with a different make of BIOS. The solution was to use
159:
disk access routines used quite a different 24-bit scheme for CHS addressing, with 10 bits for cylinder, 8 bits for head, and 6 bits for sector, or 1024 cylinders, 256 heads, and 63 sectors. This INT 13h implementation had pre-dated the ATA standard, as it was introduced when the
440:. Current PC-compatible computers support INT 13h Extensions, which use 64-bit structures for LBA addressing and should encompass any future extension of LBA addressing, though modern operating systems implement direct disk access and do not use the 197:. This method would remap 16:4:8 bit ATA cylinders and heads to 10:8:6 bit scheme used by INT 13h, generating much more "virtual" drive heads than the physical disk reported. This increased the practical limit to 1024×256×63 sectors, or 8.4 800:
According to the ATA specifications, "If the content of words (61:60) is greater than or equal to 16,514,064, then the content of word 1 shall be equal to 16,383." Therefore, for LBA 16450559, an ATA drive may actually respond with the CHS
99:, where the number of sectors per track depends on the track number. Even though the disk drive will report some CHS values as sectors per track (SPT) and heads per cylinder (HPC), they have little to do with the disk drive's true geometry. 144:
largest used) and the number of cylinders can be as large as 65,536 (0–65535), limiting disk size to 128 GiB (≈137.4 GB), assuming 512 byte sectors. These values can be accessed by issuing the ATA command "Identify Device" (
176:
issues. Overlapping ATA CHS mapping with BIOS CHS mapping produced the lowest common denominator of 10:4:6 bits, or 1024 cylinders, 16 heads, and 63 sectors, which gave the practical limit of 1024×16×63 sectors and
125:, LUNs) are composed via LUN virtualization and aggregation, LBA addressing of individual disk should be translated by a software layer to provide uniform LBA addressing for the entire storage device. 293:
and replaced INT 13h routines at boot time with custom code. This software could also enable LBA and INT 13h Extensions support for older computers with non LBA-compliant BIOSes.
1147: 1061: 1029:
by viewing its cylinders, heads and sectors as having different numerical bases; e.g., cylinders counting from 0 to 1023, heads from 0 to 254 and sectors from 1 to 63.
71:
The LBA scheme replaces earlier schemes which exposed the physical details of the storage device to the software of the operating system. Chief among these was the
1053: 1286: 1301: 83:. CHS did not map well to devices other than hard disks (such as tapes and networked storage), and was generally not used for them. CHS was used in early 1139: 840: 272:
Until the release of ATA-2 standard in 1996, there were a handful of large hard drives which did not support LBA addressing, so only
1259: 260: 1113: 68:
In logical block addressing, only one number is used to address data, and each linear base address describes a single block.
1192:
Track numbers start at 0, and track 0 is the outermost track of the disk. The highest numbered track is next to the spindle.
114: 1295: 103: 218:, which removed practical limits on disk size for operating systems which are aware of this new interface, such as the 1316: 866: 214: 848: 805:(16319, 15, 63), and the number of cylinders in this scheme must be much larger than 1024 allowed by INT 13h. 1152: 1283: 1066: 946:
Some operating systems do not require any translation because they do not use geometry reported by BIOS in their
844: 92: 46:
scheme; blocks are located by an integer index, with the first block being LBA 0, the second LBA 1, and so on.
84: 880: 240:
method, which uses native 28-bit LBA for addressing ATA disks and performs CHS conversion as needed.
91:
drives, and both it and its successor, extended cylinder-head-sector (ECHS), were used in the first
829: 63: 1229: 833: 720:
is the maximum number of heads per cylinder (reported by disk drive, typically 16 for 28-bit LBA)
464:
TiB in size. For larger partitions this needs to be replaced by another scheme, for instance the
251:
method reverts to the earlier 10:4:6 bit CHS mode which does not support addressing more than 528
726:
is the maximum number of sectors per track (reported by disk drive, typically 63 for 28-bit LBA)
1326: 924: 173: 1117: 984: 979: 940: 908: 656: 655:
In the LBA addressing scheme, sectors are numbered as integer indexes; when mapped to CHS (
465: 118: 72: 27: 8: 1273: 916: 904: 122: 928: 453: 290: 209: 96: 88: 995: 43: 35: 1256: 1204: 739: 731: 730:
LBA addresses can be mapped to CHS tuples with the following formula ("mod" is the
31: 139:
The earlier IDE standard from Western Digital introduced 22-bit LBA; in 1994, the
1290: 1263: 990: 39: 1140:"Information Technology - AT Attachment with Packet Interface - 6 (ATA/ATAPI-6)" 1091: 1054:"Information Technology - AT Attachment with Packet Interface - 5 (ATA/ATAPI-5)" 1177: 469: 457: 879:
Operating systems that are sensitive to BIOS-reported drive geometry include
468:(GPT) which has the same 64-bit limit as the current INT 13h Extensions. 1331: 1321: 1310: 912: 140: 1278: 1000: 896: 286: 79:
which defined the cylinder, head, and sector at which they appeared on the
50: 1026: 947: 445: 165: 900: 892: 223: 1092:"KB224526: Windows NT 4.0 supports maximum of 7.8-GB system partition" 1268: 920: 735: 172:, INT 13h interface could not be practically redesigned due to 169: 80: 1025:, it may also be considered an example of the general scheme called 818: 666:
CHS tuples can be mapped to LBA address with the following formula:
289:, Micro House EZ-Drive/EZ-BIOS, etc., which installed to the disk's 743: 437: 430: 202: 152: 1019:
Though CHS addressing definitely uses the mathematical concept of
967: 936: 156: 134: 932: 708:
are the cylinder number, the head number, and the sector number
161: 16:
Way to specify the location of data on computer storage devices
1048: 1046: 418:
The current 48-bit LBA scheme was introduced in 2002 with the
1021: 959: 955: 888: 660: 419: 76: 1043: 963: 441: 107: 168:
storage, and when hard disk drives were introduced on the
951: 884: 746:
of the division where any fractional part is discarded):
449: 182: 26:) is a common scheme used for specifying the location of 75:(CHS) scheme, where blocks were addressed by means of a 54:
released after 1996 implement logical block addressing.
472:
is known to support LBA48 (and enabled by default).
481:LBA and CHS equivalence with 16 heads per cylinder 1302:AT Attachment 8 - ATA/ATAPI Command Set (ATA8-ACS) 939:versions of Windows can partition the drive with 264:Installation of Western Digital's OEM-version of 1308: 1279:Microsoft article on 7.8 GB limit on NT 4.0 808: 847:. Unsourced material may be challenged and 422:standard, raising the addressing limit to 2 302:the disk, as shown in the following table. 296: 1205:"Large Disk HOWTO, Section 3. Disk Access" 280:methods could be used. However, using the 95:drives. However, current disk drives use 867:Learn how and when to remove this message 1284:Hard Drive Size Limitations and Barriers 259: 1111: 230:subsystem supports LBA addressing with 1309: 1230:"The CHS to LBA Conversion Formulas" 950:. Among these operating systems are 931:which addresses the disk using CHS; 845:adding citations to reliable sources 812: 456:(MBR) partition table only supports 115:redundant array of independent disks 102:LBA was first introduced in 1981 by 1114:"The BIOS IDE Harddisk Limitations" 1094:. Support.microsoft.com. 2007-02-23 13: 1298:, by Scott Mueller. Pages 524–531. 1151:. 26 February 2002. Archived from 1065:. 29 February 2000. Archived from 14: 1343: 1250: 475: 426:× 512 bytes, which is exactly 128 215:BIOS Enhanced Disk Drive Services 121:(SANs) and where logical drives ( 817: 208:To further overcome this limit, 128: 42:. LBA is a particularly simple 1274:CHS to LBA Translation Tutorial 1269:LBA and CHS format, LBA mapping 236: 1222: 1197: 1170: 1132: 1105: 1084: 1013: 887:and Windows NT family, where 185:), assuming 512 byte sectors. 155:implementation defined in the 1: 1036: 809:Operating system dependencies 1296:Upgrading and Repairing PC's 714:is the logical block address 395:4032 MiB < X ≤ 8032.5 MiB 285:conversion software such as 268:, on a 3.5-inch floppy disk. 7: 973: 943:which uses LBA addressing. 57: 10: 1348: 448:time. However, the common 377:2016 MiB < X ≤ 4032 MiB 359:1008 MiB < X ≤ 2016 MiB 132: 61: 341:504 MiB < X ≤ 1008 MiB 212:were introduced with the 1317:Computer storage devices 1234:pcrepairclass.tripod.com 1178:"Hard Disk Drive Basics" 1006: 413: 297:LBA-assisted translation 64:Fixed-block architecture 20:Logical block addressing 210:INT 13h Extensions 444:subsystems, except at 269: 174:backward compatibility 263: 195:bit shift translation 119:storage area networks 985:Cylinder-head-sector 980:Block (data storage) 941:GUID Partition Table 841:improve this section 657:cylinder-head-sector 466:GUID Partition Table 433:or approximately 144 406:X ÷ (63 × 255 × 512) 388:X ÷ (63 × 128 × 512) 287:OnTrack Disk Manager 123:logical unit numbers 73:cylinder-head-sector 1182:active-undelete.com 482: 370:X ÷ (63 × 64 × 512) 352:X ÷ (63 × 32 × 512) 334:X ÷ (63 × 16 × 512) 117:(RAID) devices and 106:, the precursor of 34:devices, generally 1289:2021-02-25 at the 1262:2021-02-25 at the 1112:Steunebrink, Jan. 929:Master boot record 480: 454:Master Boot Record 323:1 < X ≤ 504 MiB 270: 97:zone bit recording 1120:on 6 October 2013 996:Disk partitioning 877: 876: 869: 653: 652: 411: 410: 148:h) to the drive. 44:linear addressing 36:secondary storage 1339: 1244: 1243: 1241: 1240: 1226: 1220: 1219: 1217: 1216: 1201: 1195: 1194: 1189: 1188: 1174: 1168: 1167: 1165: 1163: 1158:on 6 August 2020 1157: 1144: 1136: 1130: 1129: 1127: 1125: 1116:. Archived from 1109: 1103: 1102: 1100: 1099: 1088: 1082: 1081: 1079: 1077: 1072:on 6 August 2020 1071: 1058: 1050: 1030: 1017: 872: 865: 861: 858: 852: 821: 813: 740:integer division 732:modulo operation 483: 479: 463: 436: 429: 425: 407: 396: 389: 378: 371: 360: 353: 342: 335: 324: 305: 304: 254: 200: 180: 147: 40:hard disk drives 38:systems such as 32:computer storage 1347: 1346: 1342: 1341: 1340: 1338: 1337: 1336: 1307: 1306: 1291:Wayback Machine 1264:Wayback Machine 1253: 1248: 1247: 1238: 1236: 1228: 1227: 1223: 1214: 1212: 1203: 1202: 1198: 1186: 1184: 1176: 1175: 1171: 1161: 1159: 1155: 1142: 1138: 1137: 1133: 1123: 1121: 1110: 1106: 1097: 1095: 1090: 1089: 1085: 1075: 1073: 1069: 1056: 1052: 1051: 1044: 1039: 1034: 1033: 1018: 1014: 1009: 991:Disk formatting 976: 873: 862: 856: 853: 838: 822: 811: 478: 461: 458:disk partitions 434: 427: 423: 416: 405: 394: 387: 376: 369: 358: 351: 340: 333: 322: 299: 252: 198: 178: 145: 137: 131: 66: 60: 17: 12: 11: 5: 1345: 1335: 1334: 1329: 1324: 1319: 1305: 1304: 1299: 1293: 1281: 1276: 1271: 1266: 1257:LBAs explained 1252: 1251:External links 1249: 1246: 1245: 1221: 1196: 1169: 1131: 1104: 1083: 1041: 1040: 1038: 1035: 1032: 1031: 1011: 1010: 1008: 1005: 1004: 1003: 998: 993: 988: 982: 975: 972: 925:Server 2008 R2 875: 874: 825: 823: 816: 810: 807: 798: 797: 783: 766: 728: 727: 721: 715: 709: 691: 690: 651: 650: 649:16382, 15, 63 647: 643: 642: 641:16319, 15, 63 639: 635: 634: 631: 627: 626: 623: 619: 618: 615: 611: 610: 607: 603: 602: 599: 595: 594: 591: 587: 586: 583: 579: 578: 575: 571: 570: 567: 563: 562: 559: 555: 554: 551: 547: 546: 543: 539: 538: 535: 531: 530: 527: 523: 522: 519: 515: 514: 511: 507: 506: 503: 499: 498: 495: 491: 490: 487: 477: 476:CHS conversion 474: 470:Windows XP SP2 415: 412: 409: 408: 403: 400: 397: 391: 390: 385: 382: 379: 373: 372: 367: 364: 361: 355: 354: 349: 346: 343: 337: 336: 331: 328: 325: 319: 318: 315: 312: 309: 298: 295: 141:ATA-1 standard 130: 127: 59: 56: 28:blocks of data 15: 9: 6: 4: 3: 2: 1344: 1333: 1330: 1328: 1327:AT Attachment 1325: 1323: 1320: 1318: 1315: 1314: 1312: 1303: 1300: 1297: 1294: 1292: 1288: 1285: 1282: 1280: 1277: 1275: 1272: 1270: 1267: 1265: 1261: 1258: 1255: 1254: 1235: 1231: 1225: 1210: 1206: 1200: 1193: 1183: 1179: 1173: 1154: 1150: 1149: 1141: 1135: 1119: 1115: 1108: 1093: 1087: 1068: 1064: 1063: 1055: 1049: 1047: 1042: 1028: 1024: 1023: 1016: 1012: 1002: 999: 997: 994: 992: 989: 986: 983: 981: 978: 977: 971: 969: 965: 961: 957: 953: 949: 944: 942: 938: 934: 930: 926: 922: 918: 914: 910: 906: 902: 898: 894: 890: 886: 882: 871: 868: 860: 850: 846: 842: 836: 835: 831: 826:This section 824: 820: 815: 814: 806: 804: 795: 791: 787: 784: 782: 778: 774: 770: 767: 764: 760: 756: 752: 749: 748: 747: 745: 741: 738:, and "÷" is 737: 733: 725: 722: 719: 716: 713: 710: 707: 703: 699: 696: 695: 694: 688: 684: 680: 676: 672: 669: 668: 667: 664: 662: 658: 648: 645: 644: 640: 637: 636: 632: 629: 628: 624: 621: 620: 616: 613: 612: 608: 605: 604: 600: 597: 596: 592: 589: 588: 584: 581: 580: 576: 573: 572: 568: 565: 564: 560: 557: 556: 552: 549: 548: 544: 541: 540: 536: 533: 532: 528: 525: 524: 520: 517: 516: 512: 509: 508: 504: 501: 500: 496: 493: 492: 488: 485: 484: 473: 471: 467: 459: 455: 451: 447: 443: 439: 432: 421: 404: 401: 398: 393: 392: 386: 383: 380: 375: 374: 368: 365: 362: 357: 356: 350: 347: 344: 339: 338: 332: 329: 326: 321: 320: 316: 313: 311:Sectors/track 310: 307: 306: 303: 294: 292: 288: 283: 279: 275: 267: 262: 258: 256: 250: 246: 241: 239: 238: 233: 229: 228:enhanced BIOS 225: 222:component in 221: 217: 216: 211: 206: 204: 201:GB (7.8  196: 192: 186: 184: 181:MB (504  175: 171: 167: 163: 158: 154: 151:However, the 149: 142: 136: 129:Enhanced BIOS 126: 124: 120: 116: 111: 109: 105: 100: 98: 94: 90: 86: 82: 78: 74: 69: 65: 55: 52: 47: 45: 41: 37: 33: 29: 25: 21: 1237:. Retrieved 1233: 1224: 1213:. Retrieved 1211:. 2004-11-08 1208: 1199: 1191: 1185:. Retrieved 1181: 1172: 1160:. Retrieved 1153:the original 1146: 1134: 1122:. Retrieved 1118:the original 1107: 1096:. Retrieved 1086: 1074:. Retrieved 1067:the original 1060: 1020: 1015: 1001:Disk storage 948:boot loaders 945: 878: 863: 854: 839:Please help 827: 802: 799: 793: 789: 785: 780: 776: 772: 768: 762: 758: 754: 750: 729: 723: 717: 711: 705: 701: 697: 692: 686: 682: 678: 674: 670: 665: 654: 417: 300: 281: 277: 273: 271: 265: 257: 248: 244: 242: 237:LBA-assisted 235: 231: 227: 220:DOS 7.0 219: 213: 207: 194: 190: 187: 157:INT 13h 150: 138: 135:INT 13h 112: 101: 70: 67: 48: 23: 19: 18: 1162:15 December 1148:www.t13.org 1076:15 December 1062:www.t13.org 1027:mixed radix 917:Server 2008 905:Server 2003 742:, i.e. the 734:, i.e. the 646:16,514,063 638:16,450,559 625:31, 15, 63 609:15, 15, 63 166:floppy disk 1311:Categories 1239:2014-08-26 1215:2015-02-10 1187:2015-02-10 1098:2013-07-30 1037:References 593:1, 15, 63 545:0, 15, 63 489:CHS tuple 317:Cylinders 224:Windows 95 133:See also: 62:See also: 30:stored on 1124:6 October 921:Windows 7 857:June 2024 828:does not 736:remainder 689:+ (S − 1) 633:32, 0, 1 617:16, 0, 1 577:1, 1, 63 561:1, 0, 63 537:0, 15, 1 521:0, 0, 63 486:LBA value 446:boot load 308:Disk size 291:OS loader 170:IBM PC/XT 164:had only 81:hard disk 1287:Archived 1260:Archived 1209:tldp.org 974:See also 744:quotient 601:2, 0, 1 585:1, 2, 1 569:1, 1, 1 553:1, 0, 1 529:0, 1, 1 513:0, 0, 3 505:0, 0, 2 497:0, 0, 1 266:EZ Drive 153:IBM BIOS 58:Overview 968:ReactOS 937:Itanium 909:BOOTMGR 881:Solaris 849:removed 834:sources 630:32,256 622:32,255 614:16,128 606:16,127 460:up to 2 226:. This 933:x86-64 927:) use 779:) mod 693:where 661:tuples 462:  452:style 435:  428:  424:  278:normal 253:  245:normal 199:  179:  162:IBM PC 1156:(PDF) 1143:(PDF) 1070:(PDF) 1057:(PDF) 1022:tuple 1007:Notes 987:(CHS) 960:macOS 956:Linux 913:Vista 907:) or 889:NTLDR 803:tuple 796:) + 1 598:2016 590:2015 582:1134 574:1133 566:1071 558:1070 550:1008 542:1007 420:ATA-6 414:LBA48 314:Heads 282:large 274:large 191:large 77:tuple 1332:BIOS 1322:SCSI 1164:2020 1126:2013 1078:2020 966:and 964:OS/2 935:and 923:and 897:2000 832:any 830:cite 792:mod 704:and 685:) × 534:945 442:BIOS 255:MB. 249:none 243:The 108:SCSI 104:SASI 87:and 49:The 952:BSD 885:DOS 843:by 794:SPT 790:LBA 788:= ( 781:HPC 777:SPT 773:LBA 771:= ( 763:SPT 759:HPC 757:÷ ( 755:LBA 724:SPT 718:HPC 712:LBA 687:SPT 679:HPC 673:= ( 671:LBA 526:63 518:62 450:DOS 431:PiB 402:255 384:128 276:or 247:or 234:or 232:LBA 205:). 203:GiB 193:or 183:MiB 177:528 113:In 93:ATA 89:RLL 85:MFM 51:IDE 24:LBA 1313:: 1232:. 1207:. 1190:. 1180:. 1145:. 1059:. 1045:^ 970:. 962:, 958:, 954:, 919:, 915:, 903:, 901:XP 899:, 895:, 893:NT 883:, 775:÷ 761:× 753:= 700:, 681:+ 677:× 659:) 510:2 502:1 494:0 438:PB 399:63 381:63 366:64 363:63 348:32 345:63 330:16 327:63 146:EC 1242:. 1218:. 1166:. 1128:. 1101:. 1080:. 911:( 891:( 870:) 864:( 859:) 855:( 851:. 837:. 786:S 769:H 765:) 751:C 706:S 702:H 698:C 683:H 675:C 22:(

Index

blocks of data
computer storage
secondary storage
hard disk drives
linear addressing
IDE
Fixed-block architecture
cylinder-head-sector
tuple
hard disk
MFM
RLL
ATA
zone bit recording
SASI
SCSI
redundant array of independent disks
storage area networks
logical unit numbers
INT 13h
ATA-1 standard
IBM BIOS
INT 13h
IBM PC
floppy disk
IBM PC/XT
backward compatibility
MiB
GiB
INT 13h Extensions

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.