Discovering the stripe size

LVM1 VGDA

A useful data structure to help you deduce the stripe size is LVM1's VGDA's PE allocation table. This contains information about the PE → LE mapping. The position in the PE allocation table gives the PE number. Each entry is 4 bytes long: the first two bytes are the LV number, the second two bytes are LE number. As the least significant byte of the LE number sweeps through 65 to 90 and 97 to 122, the alphabet is printed. This will happen several times, making this structure is easy to pick out from an ASCII dump of the disk. If you created your LVs in one go, all the LV and LE numbers be monotonically increasing. The LE number will reset to 0 whenever the LV number increments. Here is a typical PE allocation table, printed with "hexdump -C".

00000000  01 00 00 00 01 00 01 00  01 00 02 00 01 00 03 00  |................|
00000010  01 00 04 00 01 00 05 00  01 00 06 00 01 00 07 00  |................|
00000020  01 00 08 00 01 00 09 00  01 00 0a 00 01 00 0b 00  |................|
00000030  01 00 0c 00 01 00 0d 00  01 00 0e 00 01 00 0f 00  |................|
00000040  01 00 10 00 01 00 11 00  01 00 12 00 01 00 13 00  |................|
00000050  01 00 14 00 01 00 15 00  01 00 16 00 01 00 17 00  |................|
00000060  01 00 18 00 01 00 19 00  01 00 1a 00 01 00 1b 00  |................|
00000070  01 00 1c 00 01 00 1d 00  01 00 1e 00 01 00 1f 00  |................|
00000080  01 00 20 00 01 00 21 00  01 00 22 00 01 00 23 00  |.. ...!..."...#.|
00000090  01 00 24 00 01 00 25 00  01 00 26 00 01 00 27 00  |..$...%...&...'.|
000000a0  01 00 28 00 01 00 29 00  01 00 2a 00 01 00 2b 00  |..(...)...*...+.|
000000b0  01 00 2c 00 01 00 2d 00  01 00 2e 00 01 00 2f 00  |..,...-......./.|
000000c0  01 00 30 00 01 00 31 00  01 00 32 00 01 00 33 00  |..0...1...2...3.|
000000d0  01 00 34 00 01 00 35 00  01 00 36 00 01 00 37 00  |..4...5...6...7.|
000000e0  01 00 38 00 01 00 39 00  01 00 3a 00 01 00 3b 00  |..8...9...:...;.|
000000f0  01 00 3c 00 01 00 3d 00  01 00 3e 00 01 00 3f 00  |..<...=...>...?.|
00000100  01 00 40 00 01 00 41 00  01 00 42 00 01 00 43 00  |..@...A...B...C.|
00000110  01 00 44 00 01 00 45 00  01 00 46 00 01 00 47 00  |..D...E...F...G.|
00000120  01 00 48 00 01 00 49 00  01 00 4a 00 01 00 4b 00  |..H...I...J...K.|
00000130  01 00 4c 00 01 00 4d 00  01 00 4e 00 01 00 4f 00  |..L...M...N...O.|
00000140  01 00 50 00 01 00 51 00  01 00 52 00 01 00 53 00  |..P...Q...R...S.|
00000150  01 00 54 00 01 00 55 00  01 00 56 00 01 00 57 00  |..T...U...V...W.|
00000160  01 00 58 00 01 00 59 00  01 00 5a 00 01 00 5b 00  |..X...Y...Z...[.|
00000170  01 00 5c 00 01 00 5d 00  01 00 5e 00 01 00 5f 00  |..\...]...^..._.|
00000180  01 00 60 00 01 00 61 00  01 00 62 00 01 00 63 00  |..`...a...b...c.|
00000190  01 00 64 00 01 00 65 00  01 00 66 00 01 00 67 00  |..d...e...f...g.|
000001a0  01 00 68 00 01 00 69 00  01 00 6a 00 01 00 6b 00  |..h...i...j...k.|
000001b0  01 00 6c 00 01 00 6d 00  01 00 6e 00 01 00 6f 00  |..l...m...n...o.|
000001c0  01 00 70 00 01 00 71 00  01 00 72 00 01 00 73 00  |..p...q...r...s.|
000001d0  01 00 74 00 01 00 75 00  01 00 76 00 01 00 77 00  |..t...u...v...w.|
000001e0  01 00 78 00 01 00 79 00  01 00 7a 00 01 00 7b 00  |..x...y...z...{.|
000001f0  01 00 7c 00 01 00 7d 00  01 00 7e 00 01 00 7f 00  |..|...}...~.....|
00000200  01 00 80 00 01 00 81 00  01 00 82 00 01 00 83 00  |................|
00000210  01 00 84 00 01 00 85 00  01 00 86 00 01 00 87 00  |................|
...etc...
000013e0  01 00 f8 04 01 00 f9 04  01 00 fa 04 01 00 fb 04  |................|
000013f0  01 00 fc 04 01 00 fd 04  01 00 fe 04 01 00 ff 04  |................|
00001400  02 00 00 00 02 00 01 00  02 00 02 00 02 00 03 00  |................| <- LV 2 starts here
00001410  02 00 04 00 02 00 05 00  02 00 06 00 02 00 07 00  |................|
00001420  02 00 08 00 02 00 09 00  02 00 0a 00 02 00 0b 00  |................|
00001430  02 00 0c 00 02 00 0d 00  02 00 0e 00 02 00 0f 00  |................|
00001440  02 00 10 00 02 00 11 00  02 00 12 00 02 00 13 00  |................|
00001450  02 00 14 00 02 00 15 00  02 00 16 00 02 00 17 00  |................|
00001460  02 00 18 00 02 00 19 00  02 00 1a 00 02 00 1b 00  |................|
00001470  02 00 1c 00 02 00 1d 00  02 00 1e 00 02 00 1f 00  |................|
00001480  02 00 20 00 02 00 21 00  02 00 22 00 02 00 23 00  |.. ...!..."...#.|
00001490  02 00 24 00 02 00 25 00  02 00 26 00 02 00 27 00  |..$...%...&...'.|
000014a0  02 00 28 00 02 00 29 00  02 00 2a 00 02 00 2b 00  |..(...)...*...+.|
000014b0  02 00 2c 00 02 00 2d 00  02 00 2e 00 02 00 2f 00  |..,...-......./.|
000014c0  02 00 30 00 02 00 31 00  02 00 32 00 02 00 33 00  |..0...1...2...3.|
000014d0  02 00 34 00 02 00 35 00  02 00 36 00 02 00 37 00  |..4...5...6...7.|
000014e0  02 00 38 00 02 00 39 00  02 00 3a 00 02 00 3b 00  |..8...9...:...;.|
...etc...
0013bbb0  0a 00 ec f9 0a 00 ed f9  0a 00 ee f9 0a 00 ef f9  |................|
0013bbc0  0a 00 f0 f9 0a 00 f1 f9  0a 00 f2 f9 0a 00 f3 f9  |................|
0013bbd0  0a 00 f4 f9 0a 00 f5 f9  0a 00 f6 f9 0a 00 f7 f9  |................|
0013bbe0  0a 00 f8 f9 0a 00 f9 f9  0a 00 fa f9 0a 00 fb f9  |................|
0013bbf0  0a 00 fc f9 0a 00 fd f9  0a 00 fe f9 0a 00 ff f9  |................|
0013bc00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*

For a 64K stripe size, this table would span 19 stripes - easily enough to confirm that the stripe size is correct, and to deduce which stripes are used for parity.

Finding ext2 and ext3 filesystems

Here's the start of an ext3 filesystem with the volume label, "Archive2". The superblock begins at offset 0x400. You can find ext2/3 filesystems by looking for the magic number, 0xEF53, at offset 0x38 from the start of the superblock.

00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000400  00 00 f4 01 00 00 e8 03  00 00 32 00 a8 01 46 00  |..........2...F.|
00000410  83 2f f3 01 00 00 00 00  02 00 00 00 02 00 00 00  |./..............|
00000420  00 80 00 00 00 80 00 00  00 40 00 00 63 2f ec 41  |.........@..c/.A|
00000430  69 2f ec 41 03 00 21 00  53 ef 01 00 01 00 00 00  |i/.A..!.S.......|
00000440  f9 a7 eb 41 00 4e ed 00  00 00 00 00 01 00 00 00  |...A.N..........|
00000450  00 00 00 00 0b 00 00 00  80 00 00 00 04 00 00 00  |................|
00000460  02 00 00 00 01 00 00 00  a5 80 bf 3f 73 07 43 8f  |...........?s.C.|
00000470  82 3b c9 1a f4 79 83 de  41 72 63 68 69 76 65 32  |.;...y..Archive2|
00000480  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000004e0  08 00 00 00 00 00 00 00  00 00 00 00 dc 39 6f b4  |.............9o.|
000004f0  7a f7 44 a5 a1 2f 9c d1  b1 7e 06 91 02 00 00 00  |z.D../...~......|
00000500  00 00 00 00 00 00 00 00  71 a1 85 40 00 00 00 00  |........q..@....|
00000510  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00001000

Other important features in the superblock are:

** denotes "raised to the power of"


Valid HTML 4.01! Valid CSS!

Peter Benie <peterb@chiark.greenend.org.uk>
Linux RAID