Eu tenho 9 partições formatadas como XFS no meu servidor.
Quando tento montar um deles, ele falha. Os outros montam bem.
root@fileserver2 # mount | grep xfs | head -1
/dev/sdb1 on /mnt/hdd1 type xfs (rw,noatime)
root@fileserver2 # mount -t xfs /dev/sdf3 /mnt/hdd3
mount: wrong fs type, bad option, bad superblock on /dev/sdf3,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
root@fileserver2 # dmesg | tail -2
XFS (sdf3): bad magic number
XFS (sdf3): SB validate failed
Então, tentei usar o xfs_repair -n para encontrar o SB secundário, mas ele falhou:
root@fileserver2 # xfs_check /dev/sdf3
xfs_check: /dev/sdf3 is not a valid XFS filesystem (unexpected SB magic number 0x00000000)
xfs_check: WARNING - filesystem uses v1 dirs,limited functionality provided.
xfs_check: read failed: Invalid argument
xfs_check: data size check failed
cache_node_purge: refcount was 1, not zero (node=0x14a7380)
xfs_check: cannot read root inode (22)
bad superblock magic number 0, giving up
root@fileserver2 # xfs_repair -n /dev/sdf3
Phase 1 - find and verify superblock...
bad primary superblock - bad magic number !!!
attempting to find secondary superblock...
............[etc.]
...found candidate secondary superblock... unable to verify superblock, continuing...
[etc.]
...Sorry, could not find valid secondary superblock
Exiting now.
Aqui estão as partições da unidade específica, que incluem a partição raiz (sdf1) e a partição de troca (sdf5).
Eu acho estranho que a partição estendida não inclua minha partição sdf3 (XFS). Isso significaria que minha partição XFS seria uma segunda partição primária, certo?
root@fileserver2 # fdisk -l /dev/sdf
Disk /dev/sdf: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x20a0c72d
Device Boot Start End Blocks Id System
/dev/sdf1 * 1 2612 20980858+ 83 Linux
/dev/sdf2 2613 2855 1951867 5 Extended
/dev/sdf3 2856 243202 1930581796+ 83 Linux
/dev/sdf5 2613 2855 1951866 82 Linux swap / Solaris
Em seguida, tentei usar file -s
para identificar os vários sistemas de arquivos nessa unidade:
root@fileserver2 # file -s /dev/sdf1
/dev/sdf1: Linux rev 1.0 ext4 filesystem data (needs journal recovery) (extents) (large files) (huge files)
root@fileserver2 # file -s /dev/sdf2
/dev/sdf2: x86 boot sector; partition 1: ID=0x82, starthead 254, startsector 2, 3903732 sectors, extended partition table (last)1, code offset 0x1
root@fileserver2 # file -s /dev/sdf3
/dev/sdf3: x86 boot sector; partition 1: ID=0xbf, starthead 254, startsector 63, 3861163530 sectors, extended partition table (last)1, code offset 0x0
root@fileserver2 # file -s /dev/sdf5
/dev/sdf5: Linux/i386 swap file (new style) 1 (4K pages) size 487965 pages
Então, sdf3 parece ser uma segunda partição estendida ..? Estranho.
Eu tentei o mesmo comando em uma partição XFS que eu posso montar:
root@fileserver2 # file -s /dev/sdb1
/dev/sdb1: SGI XFS filesystem data (blksz 4096, inosz 256, v2 dirs)
E também tentou verificar os dados no início da partição sdf3:
root@fileserver2 # dd if=/dev/sdf3 bs=512 count=64 iflag=direct | hexdump -C
00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
000001b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fe |................|
000001c0 ff ff bf fe ff ff 3f 00 00 00 0a ae 24 e6 00 00 |......?.....$...|
000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
00000200 9c 52 1d 9c b7 00 d7 e9 e8 fc 3c 6f 4e dc 31 27 |.R........<oN.1'|
00000210 e9 98 6b b0 2f 74 c1 69 40 12 58 90 4b e3 d0 73 |..k./[email protected]|
[...]
00007e00 58 46 53 42 00 00 10 00 00 00 00 00 1c c4 95 c1 |XFSB............|
00007e10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00007e20 41 4c 30 10 33 23 45 5f 88 6c 25 e1 03 a1 be e3 |AL0.3#E_.l%.....|
00007e30 00 00 00 00 10 00 00 04 00 00 00 00 00 00 00 80 |................|
00007e40 00 00 00 00 00 00 00 81 00 00 00 00 00 00 00 82 |................|
00007e50 00 00 00 01 07 31 25 71 00 00 00 04 00 00 00 00 |.....1%q........|
00007e60 00 03 98 92 b4 a4 02 00 01 00 00 10 68 64 64 33 |............hdd3|
00007e70 00 00 00 00 00 00 00 00 0c 09 08 04 1b 00 00 05 |................|
00007e80 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00 3d |.......@.......=|
00007e90 00 00 00 00 1c c0 fd 1b 00 00 00 00 00 00 00 00 |................|
00007ea0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00007eb0 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 00 |................|
00007ec0 00 00 00 00 00 00 00 01 00 00 00 0a 00 00 00 0a |................|
00007ed0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00008000
(Dump completo do resultado: link )
Portanto, em vez de iniciar a partição no setor 0 (como em outras unidades, como sdb1), ela começa no setor 63 (0x7e00 = 32256/512 bytes / setor = 63).
Qualquer ponteiro sobre como eu poderia resolver esse problema e ser capaz de montar essa partição engraçada?
Obrigado.