XFS

TODO

hch notes that various arm nas devices mount with -o nonarrier
hch: and went into 2.6.27
hch: commit ae23a5e87dbbf4657a82e1ff8ebc52ab50361c14

LOG

hch: oh, that was for the old arm ABI
hch: and went into 2.6.27
hch: commit ae23a5e87dbbf4657a82e1ff8ebc52ab50361c14
hch: it's all dir code though, what you seem to be hitting

# Get:1 http://ftp.fr.debian.org lenny/main xfsprogs 2.9.8-1lenny1 [1524kB]

LS-WTGL490:~# xfs_check /dev/sda6

cache_node_purge: refcount was 1, not zero (node=0xa3688)
xfs_check: cannot read root inode (22)
cache_node_purge: refcount was 1, not zero (node=0xa5ea8)
xfs_check: cannot read realtime bitmap inode (22)
/usr/sbin/xfs_check: line 28: 30457 Segmentation fault      xfs_db$DBOPTS -i -p xfs_check -c "check$OPTS" $1



sudo mdadm --examine --brief --scan --verbose
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=033cc573:5641c370:b3a75a35:acb61a68
   devices=/dev/sdb1,/dev/sda1
ARRAY /dev/md1 level=raid1 num-devices=2 UUID=ad5cf22b:216c00db:c4034e8b:f7349a77
   devices=/dev/sdb2,/dev/sda2
ARRAY /dev/md10 level=raid1 num-devices=2 UUID=9a09aaa6:aa7b4009:b597d2f0:16e1d4df
   devices=/dev/sdb5,/dev/sda5


xfs_check /dev/sda6
xfs_check: cannot read root inode (22)
bad agf magic # 0 in ag 0
bad agf version # 0 in ag 0
block 0/0 expected type unknown got sb
bad agi magic # 0 in ag 0
bad agi version # 0 in ag 0
bad magic # 0x58465342 in btbno block 0/0
bad magic # 0x58465342 in btcnt block 0/0
bad magic # 0x58465342 in inobt block 0/0
agi unlinked bucket 0 is 0 in ag 0 (inode=0)
agi unlinked bucket 1 is 0 in ag 0 (inode=0)


dmesg 
http://madduck.net/blog/2006.08.30:lvm-for-filesystem-recovery/

scsi1 : Marvell SCSI to SATA adapter
** BUFFALO Disable Command Queuing Function [0 0] **
** BUFFALO Disable Command Queuing Function [0 1] **
  Vendor: SAMSUNG   Model: HD103UJ           Rev: 1AA0
  Type:   Direct-Access                      ANSI SCSI revision: 03
  Vendor: SAMSUNG   Model: HD103UJ           Rev: 1AA0
  Type:   Direct-Access                      ANSI SCSI revision: 03
Linux IAL (ERROR) : retry command host=0, bus=0 SCpnt = c1447ba0
SCSI device sda: 1953525168 512-byte hdwr sectors (1000205 MB)
sda: Write Protect is off
sda: Mode Sense: 23 00 00 00
SCSI device sda: drive cache: write back
SCSI device sda: 1953525168 512-byte hdwr sectors (1000205 MB)
sda: Write Protect is off
sda: Mode Sense: 23 00 00 00
SCSI device sda: drive cache: write back
 sda: sda1 sda2 sda4 < sda5 sda6 >
sd 0:0:0:0: Attached scsi disk sda
Linux IAL (ERROR) : retry command host=1, bus=1 SCpnt = c1447ba0
SCSI device sdb: 1953525168 512-byte hdwr sectors (1000205 MB)
sdb: Write Protect is off
sdb: Mode Sense: 23 00 00 00
SCSI device sdb: drive cache: write back
SCSI device sdb: 1953525168 512-byte hdwr sectors (1000205 MB)
sdb: Write Protect is off
sdb: Mode Sense: 23 00 00 00
SCSI device sdb: drive cache: write back
 sdb: sdb1 sdb2 sdb4 < sdb5 sdb6 >
sd 1:0:0:0: Attached scsi disk sdb
sd 0:0:0:0: Attached scsi generic sg0 type 0
sd 1:0:0:0: Attached scsi generic sg1 type 0
physmap flash device: 40000 at ff800000
CFI: Found no phys_mapped_flash device at location zero
>jedec_probe
Found: SST 39LF020
phys_mapped_flash: Found 1 x8 devices at 0x0 in 8-bit bank
number of JEDEC chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
cmdlinepart partition parsing not available
RedBoot partition parsing not available
mice: PS/2 mouse device common for all mice
md: raid0 personality registered for level 0
md: raid1 personality registered for level 1
md: md driver 0.90.3 MAX_MD_DEVS=256, MD_SB_DISKS=27
md: bitmap version 4.39
Kernel event proc (C) BUFFALO INC. V.1.00 installed.
MICON ctrl (C) BUFFALO INC. V.1.00 installed.
mvGppValueSet: Err. An attempt to set output value to GPP 8 in input mode.
Buffalo CPU Inerupts Driver (C) BUFFALO INC. Ver.0.01 alpha1 installed.
mvGppValueSet: Err. An attempt to set output value to GPP 2 in input mode.
Buffalo Gpio Control Driver (C) BUFFALO INC. Ver.0.02 installed.
NET: Registered protocol family 2
IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
TCP established hash table entries: 8192 (order: 3, 32768 bytes)
TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP reno registered
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
RAMDISK: Compressed image found at block 0
VFS: Mounted root (ext2 filesystem).
md: md10 stopped.
md: md1 stopped.
md: md0 stopped.
md: bind<sda1>
md: bind<sdb1>
md: kicking non-fresh sda1 from array!
md: unbind<sda1>
md: export_rdev(sda1)
raid1: raid set md0 active with 1 out of 2 mirrors
kjournald starting.  Commit interval 5 seconds
EXT3 FS on md0, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
md: md10 stopped.
md: bind<sda5>
md: bind<sdb5>
md: kicking non-fresh sda5 from array!
md: unbind<sda5>
md: export_rdev(sda5)
raid1: raid set md10 active with 1 out of 2 mirrors
md: md1 stopped.
md: bind<sda2>
md: bind<sdb2>
md: kicking non-fresh sda2 from array!
md: unbind<sda2>
md: export_rdev(sda2)
raid1: raid set md1 active with 1 out of 2 mirrors
XFS mounting filesystem md1
Starting XFS recovery on filesystem: md1 (logdev: internal)
Ending XFS recovery on filesystem: md1 (logdev: internal)
XFS mounting filesystem md1
Ending clean XFS mount for filesystem: md1
VFS: Mounted root (xfs filesystem).
Trying to move old root to /initrd ... okay
Freeing init memory: 116K
Adding 1003896k swap on /dev/md10.  Priority:-1 extents:1 across:1003896k
kjournald starting.  Commit interval 5 seconds
EXT3 FS on md0, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
usbcore: registered new driver usbfs
usbcore: registered new driver hub
ehci_platform ehci_platform.4523: EHCI Platform Host Controller
ehci_platform ehci_platform.4523: new USB bus registered, assigned bus number 1
ehci_platform ehci_platform.4523: irq 17, io mem 0x00000000
ehci_platform ehci_platform.4523: USB 0.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
ehci_platform ehci_platform.16781: EHCI Platform Host Controller
ehci_platform ehci_platform.16781: new USB bus registered, assigned bus number 2
ehci_platform ehci_platform.16781: irq 12, io mem 0x00000000
ehci_platform ehci_platform.16781: USB 0.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
Initializing USB Mass Storage driver...
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
usbcore: registered new driver usblp
drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
eth0: link down
eth0: link up<5>, full duplex<5>, speed 100 Mbps<5>
md: bind<sda1>
RAID1 conf printout:
 --- wd:1 rd:2
 disk 0, wo:1, o:1, dev:sda1
 disk 1, wo:0, o:1, dev:sdb1
md: syncing RAID array md0
md: minimum _guaranteed_ reconstruction speed: 1000 KB/sec/disc.
md: using maximum available idle IO bandwidth (but not more than 50000 KB/sec) for reconstruction.
md: using 128k window, over a total of 1003904 blocks.
md: bind<sda2>
RAID1 conf printout:
 --- wd:1 rd:2
 disk 0, wo:1, o:1, dev:sda2
 disk 1, wo:0, o:1, dev:sdb2
md: delaying resync of md1 until md0 has finished resync (they share one or more physical units)
md: bind<sda5>
RAID1 conf printout:
 --- wd:1 rd:2
 disk 0, wo:1, o:1, dev:sda5
 disk 1, wo:0, o:1, dev:sdb5
md: delaying resync of md10 until md1 has finished resync (they share one or more physical units)
XFS mounting filesystem sda6
Starting XFS recovery on filesystem: sda6 (logdev: internal)
XFS: failed to read root inode
XFS mounting filesystem sdb6
Starting XFS recovery on filesystem: sdb6 (logdev: internal)
Ending XFS recovery on filesystem: sdb6 (logdev: internal)
md: md0: sync done.
md: delaying resync of md10 until md1 has finished resync (they share one or more physical units)
md: delaying resync of md1 until md10 has finished resync (they share one or more physical units)
RAID1 conf printout:
 --- wd:2 rd:2
 disk 0, wo:0, o:1, dev:sda1
 disk 1, wo:0, o:1, dev:sdb1
md: syncing RAID array md10
md: minimum _guaranteed_ reconstruction speed: 1000 KB/sec/disc.
md: using maximum available idle IO bandwidth (but not more than 50000 KB/sec) for reconstruction.
md: using 128k window, over a total of 1003904 blocks.
md: md10: sync done.
md: syncing RAID array md1
md: minimum _guaranteed_ reconstruction speed: 1000 KB/sec/disc.
md: using maximum available idle IO bandwidth (but not more than 50000 KB/sec) for reconstruction.
md: using 128k window, over a total of 5004160 blocks.
RAID1 conf printout:
 --- wd:2 rd:2
 disk 0, wo:0, o:1, dev:sda5
 disk 1, wo:0, o:1, dev:sdb5
NET: Registered protocol family 5
BuffaloSwPollingCheck> SW_POWER_ON
XFS mounting filesystem sda6
Starting XFS recovery on filesystem: sda6 (logdev: internal)
XFS: failed to read root inode
md: md1: sync done.
RAID1 conf printout:
 --- wd:2 rd:2
 disk 0, wo:0, o:1, dev:sda2
 disk 1, wo:0, o:1, dev:sdb2
XFS mounting filesystem sda6
Starting XFS recovery on filesystem: sda6 (logdev: internal)
XFS: failed to read root inode

mount: Unknown error 990

http://oss.sgi.com/archives/xfs/2003-12/msg01066.html

http://xfs.org/docs/xfsdocs-xml-dev/XFS_User_Guide/tmp/en-US/html/ch11s14.html

LS-WTGL490:/# dmesg 
Linux version 2.6.16.16-arm1 (root@I.You) (gcc version 3.4.4 (release) (CodeSourcery ARM 2005q3-2)) #1 Wed Jan 21 10:23:54 JST 2009
CPU: ARM926EJ-Sid(wb) [41069260] revision 0 (ARMv5TEJ)
Machine: MV-88fxx81
Using UBoot passing parameters structure
Sys Clk = 250000000, Tclk = 166664740


- Warning - This LSP release was tested only with U-Boot release 1.7.3 

Memory policy: ECC disabled, Data cache writeback
On node 0 totalpages: 32768
  DMA zone: 32768 pages, LIFO batch:7
  DMA32 zone: 0 pages, LIFO batch:0
  Normal zone: 0 pages, LIFO batch:0
  HighMem zone: 0 pages, LIFO batch:0
CPU0: D VIVT write-back cache
CPU0: I cache: 32768 bytes, associativity 1, 32 byte lines, 1024 sets
CPU0: D cache: 32768 bytes, associativity 1, 32 byte lines, 1024 sets
Built 1 zonelists
Kernel command line: console=ttyS0,115200 root=/dev/sda2 rw initrd=0x00800040,15M panic=5 func=0 BOOTVER=1.13
PID hash table entries: 1024 (order: 10, 16384 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 128MB 0MB 0MB 0MB = 128MB total
Memory: 110592KB available (2996K code, 554K data, 116K init)
Calibrating delay loop... 266.24 BogoMIPS (lpj=1331200)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
checking if image is initramfs...it isn't (no cpio magic); looks like an initrd
Freeing initrd memory: 15360K
NET: Registered protocol family 16
FLASH boardId = 1b
Flash bankwidth 1, base ff800000, size 40000
BUFFALO LS_WTGL_R1_V3 FLASH size 256[KB]

  Marvell Development Board (LSP Version 1.7.8_NAS)-- BUFFALO_BOARD_LS_WTGL_R1_V3 

 Detected Tclk 166664740 and SysClk 250000000 
Marvell USB EHCI Host controller #0: c16f5e00
Marvell USB EHCI Host controller #1: c16f5c00
pexBarOverlapDetect: winNum 2 overlap current 0
mvPexInit:Warning :Bar 2 size is illigal
it will be disabled
please check Pex and CPU windows configuration
PCI: bus0: Fast back to back transfers enabled
PCI: bus1: Fast back to back transfers enabled
SCSI subsystem initialized
use IDMA acceleration in copy to/from user buffers. used channels 2 and 3 
Done. 
cesadev_init(c0011d34)
Fast Floating Point Emulator V0.9 (c) Peter Teichmann.
SGI XFS with large block numbers, no debug enabled
Initializing Cryptographic API
io scheduler noop registered (default)
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
serial8250: ttyS0 at MMIO 0x0 (irq = 3) is a 16550A
serial8250: ttyS1 at MMIO 0x0 (irq = 4) is a 16550A
RAMDISK driver initialized: 3 RAM disks of 16384K size 1024 blocksize
loop: loaded (max 8 devices)
Marvell Gigabit Ethernet Driver 'egiga':
  o Ethernet descriptors in DRAM
  o DRAM SW cache-coherency
  o Checksum offload enabled
  o Loading network interface ** egiga_init_module (0)
'eth0' 
Intergrated Sata device found
scsi0 : Marvell SCSI to SATA adapter
scsi1 : Marvell SCSI to SATA adapter
** BUFFALO Disable Command Queuing Function [0 0] **
** BUFFALO Disable Command Queuing Function [0 1] **
  Vendor: SAMSUNG   Model: HD103UJ           Rev: 1AA0
  Type:   Direct-Access                      ANSI SCSI revision: 03
  Vendor: SAMSUNG   Model: HD103UJ           Rev: 1AA0
  Type:   Direct-Access                      ANSI SCSI revision: 03
Linux IAL (ERROR) : retry command host=0, bus=0 SCpnt = c1447ba0
SCSI device sda: 1953525168 512-byte hdwr sectors (1000205 MB)
sda: Write Protect is off
sda: Mode Sense: 23 00 00 00
SCSI device sda: drive cache: write back
SCSI device sda: 1953525168 512-byte hdwr sectors (1000205 MB)
sda: Write Protect is off
sda: Mode Sense: 23 00 00 00
SCSI device sda: drive cache: write back
 sda: sda1 sda2 sda4 < sda5 sda6 >
sd 0:0:0:0: Attached scsi disk sda
Linux IAL (ERROR) : retry command host=1, bus=1 SCpnt = c1447ba0
SCSI device sdb: 1953525168 512-byte hdwr sectors (1000205 MB)
sdb: Write Protect is off
sdb: Mode Sense: 23 00 00 00
SCSI device sdb: drive cache: write back
SCSI device sdb: 1953525168 512-byte hdwr sectors (1000205 MB)
sdb: Write Protect is off
sdb: Mode Sense: 23 00 00 00
SCSI device sdb: drive cache: write back
 sdb: sdb1 sdb2 sdb4 < sdb5 sdb6 >
sd 1:0:0:0: Attached scsi disk sdb
sd 0:0:0:0: Attached scsi generic sg0 type 0
sd 1:0:0:0: Attached scsi generic sg1 type 0
physmap flash device: 40000 at ff800000
CFI: Found no phys_mapped_flash device at location zero
>jedec_probe
Found: SST 39LF020
phys_mapped_flash: Found 1 x8 devices at 0x0 in 8-bit bank
number of JEDEC chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
cmdlinepart partition parsing not available
RedBoot partition parsing not available
mice: PS/2 mouse device common for all mice
md: raid0 personality registered for level 0
md: raid1 personality registered for level 1
md: md driver 0.90.3 MAX_MD_DEVS=256, MD_SB_DISKS=27
md: bitmap version 4.39
Kernel event proc (C) BUFFALO INC. V.1.00 installed.
MICON ctrl (C) BUFFALO INC. V.1.00 installed.
mvGppValueSet: Err. An attempt to set output value to GPP 8 in input mode.
Buffalo CPU Inerupts Driver (C) BUFFALO INC. Ver.0.01 alpha1 installed.
mvGppValueSet: Err. An attempt to set output value to GPP 2 in input mode.
Buffalo Gpio Control Driver (C) BUFFALO INC. Ver.0.02 installed.
NET: Registered protocol family 2
IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
TCP established hash table entries: 8192 (order: 3, 32768 bytes)
TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP reno registered
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
RAMDISK: Compressed image found at block 0
VFS: Mounted root (ext2 filesystem).
md: md10 stopped.
md: md1 stopped.
md: md0 stopped.
md: bind<sda1>
md: bind<sdb1>
md: kicking non-fresh sda1 from array!
md: unbind<sda1>
md: export_rdev(sda1)
raid1: raid set md0 active with 1 out of 2 mirrors
kjournald starting.  Commit interval 5 seconds
EXT3 FS on md0, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
md: md10 stopped.
md: bind<sda5>
md: bind<sdb5>
md: kicking non-fresh sda5 from array!
md: unbind<sda5>
md: export_rdev(sda5)
raid1: raid set md10 active with 1 out of 2 mirrors
md: md1 stopped.
md: bind<sda2>
md: bind<sdb2>
md: kicking non-fresh sda2 from array!
md: unbind<sda2>
md: export_rdev(sda2)
raid1: raid set md1 active with 1 out of 2 mirrors
XFS mounting filesystem md1
Starting XFS recovery on filesystem: md1 (logdev: internal)
Ending XFS recovery on filesystem: md1 (logdev: internal)
XFS mounting filesystem md1
Ending clean XFS mount for filesystem: md1
VFS: Mounted root (xfs filesystem).
Trying to move old root to /initrd ... okay
Freeing init memory: 116K
Adding 1003896k swap on /dev/md10.  Priority:-1 extents:1 across:1003896k
kjournald starting.  Commit interval 5 seconds
EXT3 FS on md0, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
usbcore: registered new driver usbfs
usbcore: registered new driver hub
ehci_platform ehci_platform.4523: EHCI Platform Host Controller
ehci_platform ehci_platform.4523: new USB bus registered, assigned bus number 1
ehci_platform ehci_platform.4523: irq 17, io mem 0x00000000
ehci_platform ehci_platform.4523: USB 0.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
ehci_platform ehci_platform.16781: EHCI Platform Host Controller
ehci_platform ehci_platform.16781: new USB bus registered, assigned bus number 2
ehci_platform ehci_platform.16781: irq 12, io mem 0x00000000
ehci_platform ehci_platform.16781: USB 0.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
Initializing USB Mass Storage driver...
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
usbcore: registered new driver usblp
drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
eth0: link down
eth0: link up<5>, full duplex<5>, speed 100 Mbps<5>
md: bind<sda1>
RAID1 conf printout:
 --- wd:1 rd:2
 disk 0, wo:1, o:1, dev:sda1
 disk 1, wo:0, o:1, dev:sdb1
md: syncing RAID array md0
md: minimum _guaranteed_ reconstruction speed: 1000 KB/sec/disc.
md: using maximum available idle IO bandwidth (but not more than 50000 KB/sec) for reconstruction.
md: using 128k window, over a total of 1003904 blocks.
md: bind<sda2>
RAID1 conf printout:
 --- wd:1 rd:2
 disk 0, wo:1, o:1, dev:sda2
 disk 1, wo:0, o:1, dev:sdb2
md: delaying resync of md1 until md0 has finished resync (they share one or more physical units)
md: bind<sda5>
RAID1 conf printout:
 --- wd:1 rd:2
 disk 0, wo:1, o:1, dev:sda5
 disk 1, wo:0, o:1, dev:sdb5
md: delaying resync of md10 until md1 has finished resync (they share one or more physical units)
XFS mounting filesystem sda6
Starting XFS recovery on filesystem: sda6 (logdev: internal)
XFS: failed to read root inode
XFS mounting filesystem sdb6
Starting XFS recovery on filesystem: sdb6 (logdev: internal)
Ending XFS recovery on filesystem: sdb6 (logdev: internal)
md: md0: sync done.
md: delaying resync of md10 until md1 has finished resync (they share one or more physical units)
md: delaying resync of md1 until md10 has finished resync (they share one or more physical units)
RAID1 conf printout:
 --- wd:2 rd:2
 disk 0, wo:0, o:1, dev:sda1
 disk 1, wo:0, o:1, dev:sdb1
md: syncing RAID array md10
md: minimum _guaranteed_ reconstruction speed: 1000 KB/sec/disc.
md: using maximum available idle IO bandwidth (but not more than 50000 KB/sec) for reconstruction.
md: using 128k window, over a total of 1003904 blocks.
md: md10: sync done.
md: syncing RAID array md1
md: minimum _guaranteed_ reconstruction speed: 1000 KB/sec/disc.
md: using maximum available idle IO bandwidth (but not more than 50000 KB/sec) for reconstruction.
md: using 128k window, over a total of 5004160 blocks.
RAID1 conf printout:
 --- wd:2 rd:2
 disk 0, wo:0, o:1, dev:sda5
 disk 1, wo:0, o:1, dev:sdb5
NET: Registered protocol family 5
BuffaloSwPollingCheck> SW_POWER_ON
XFS mounting filesystem sda6
Starting XFS recovery on filesystem: sda6 (logdev: internal)
XFS: failed to read root inode
md: md1: sync done.
RAID1 conf printout:
 --- wd:2 rd:2
 disk 0, wo:0, o:1, dev:sda2
 disk 1, wo:0, o:1, dev:sdb2
XFS mounting filesystem sda6
Starting XFS recovery on filesystem: sda6 (logdev: internal)
XFS: failed to read root inode

XFSREPAIR

# time sudo xfs_repair -n /dev/sda6

time sudo xfs_repair -n /dev/sda6

Phase 1 - find and verify superblock...
Phase 2 - using internal log
        - scan filesystem freespace and inode maps...
bad magic # 0x0 for agf 0
bad version # 0 for agf 0
bad length 0 for agf 0, should be 1048576
bad magic # 0x0 for agi 0
bad version # 0 for agi 0
bad length # 0 for agi 0, should be 1048576
would reset bad agf for ag 0
would reset bad agi for ag 0
bad uncorrected agheader 0, skipping ag...
root inode chunk not found
Phase 3 - for each AG...
        - scan (but don't clear) agi unlinked lists...
error following ag 0 unlinked list
        - process known inodes and perform inode discovery...
        - agno = 0
bad magic number 0x0 on inode 128
bad version number 0x0 on inode 128
(...)
"bad directory block magic #" "for directory inode"

OBSOLETE

ToDo

XFS / RAID0

How to recover a raid0 array once accidently reformated by my nas ?

photorec finds some files…

but I want to avoid to tear out 1TB of junk (Disk /dev/md2: 984.0 GB, 984022908928 bytes )

Software :

sudo mdadm --examine --brief --scan
dpkg -L  ufsxsci && sudo /usr/bin/ufsxsci

Misc:

xfsprogs

ToDo: merge irecover it into xfs :

 git clone git://oss.sgi.com/xfs/cmds/xfsprogs

@more: xfs fs sgi raid

xfs_repair -n -P

xfs_irecover @ HXTOOLS

Btw I packaged hxtools to deb that provides

http://dev.medozas.de/gitweb.cgi?p=hxtools;a=blob;f=sadmin/xfs_irecover.c;hb=HEAD

http://dev.medozas.de/gitweb.cgi?p=hxtools;a=history;f=sadmin/xfs_irecover.c;hb=HEAD

install it using apt

sudo apt-get install rzr hxtools devscripts apt-src valgrind libtool autoconf libhx-dev libcap-dev

http://search.gmane.org/?query=xfs_irecover&author=&group=gmane.comp.file-systems.xfs.general&sort=date&DEFAULTOP=and&xP=Zxfs_irecov&xFILTERS=Gcomp.file-systems.xfs.general---A

ToDo :

http://article.gmane.org/gmane.comp.file-systems.xfs.general/27303/match=xfs_irecover

http://thread.gmane.org/gmane.comp.file-systems.xfs.general/33724/focus=33759

http://article.gmane.org/gmane.comp.file-systems.xfs.general/28475/match=xfs_irecover

sudo sudo mdadm --examine --brief --scan
dev=/dev/md2
dir=/tmp/$dev/xfs_irecover
sudo mkdir -p $dir
start=0
time sudo xfs_irecover  -r $start -D $dev -o $dir
Filesystem claims to have 3843839488 inodes
Inode range 0--3843839488
ino 710455/3843839488 (0.02%) 35597/s ETA 29h:59m:22s recov 4934
ino 713777 is pretty large (size 787 MB), skipping.

ino 713778 is pretty large (size 743 MB), skipping.
# ino 1266970/3843839488 (0.03%) 46583/s ETA 22h:54m:48s recov 8136
ino 1267469/3843839488 (0.03%) 8680/s ETA 122h:58m:12s recov 8187
Segmentation fault

start=713777
start=1267469
max=10000000000
time sudo xfs_irecover  -n -D $dev -o $dir -r $start -s $max
Inode range 1267469--3843839488
ino 1267469/3843839488 (0.03%) 1267469/s ETA 0h:50m:31s recov 0Segmentation fault

stop=3843839488
while [  $stop -ge $start ] ; do start=$(expr 1 + $start) && xfs_irecover -n -r $start -D /dev/md127 -o /mnt/sdc5/tmp/xfs_irecover/ ; done


strace ...

ioctl(6, FIONREAD, [16384])             = 0
read(6, "0,0] 62683:[0,0,0,0] 62684:[0,0,"..., 16384) = 16384
poll([{fd=6, events=POLLIN}], 1, -1)    = 1 ([{fd=6, revents=POLLIN}])
ioctl(6, FIONREAD, [16384])             = 0
read(6, 0xb76c0008, 16384)              = -1 EFAULT (Bad address)
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Segmentation fault

ToDo : need to compile with debug (-O0 -ggdb3) and use valgrind. Granted, error checking is a bit short, and if xfs_db's interactive interface changed, I can imagine it fails somewhere.

ValGrind :

start=1267468
time sudo valgrind /usr/local/bin/xfs_irecover -D /dev/md2  -o $(pwd)/

==10744== Memcheck, a memory error detector
==10744== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==10744== Using Valgrind-3.6.0.SVN-Debian and LibVEX; rerun with -h for copyright info
==10744== Command: /usr/local/bin/xfs_irecover -D /dev/md2 -o /home/local/tmp/
==10744== 
==10744== Invalid read of size 1
==10744==    at 0x80493A0: main2 (xfs_irecover.c:427)
==10744==    by 0x804A29D: main (xfs_irecover.c:569)
==10744==  Address 0x43b564e is 0 bytes after a block of size 6 alloc'd
==10744==    at 0x4025BD3: malloc (vg_replace_malloc.c:236)
==10744==    by 0x404E737: HX_split (in /usr/lib/libHX.so.22.3.0)
==10744==    by 0x80492E4: main2 (xfs_irecover.c:415)
==10744==    by 0x804A29D: main (xfs_irecover.c:569)

Filesystem claims to have 3843839488 inodes
Inode range 0--3843839488
ino 709944/3843839488 (0.02%) 35082/s ETA 30h:25m:47s recov 4849
ino 713777 is pretty large (size 787 MB), skipping.

ino 713778 is pretty large (size 743 MB), skipping.
ino 1266732/3843839488 (0.03%) 15897/s ETA 67h:08m:36s recov 8090

http://packages.qa.debian.org/libh/libhx.html

xfsr

xfsr-dirfind    xfsr-dump       xfsr-ls         xfsr-rawsearch  

  sudo xfsr-dirfind /dev/md2
    0x467dc8f7

  hex=0x467dc8f7 # 1182648567
  dec=$(printf "%llu\n" "$hex")
  
  sudo xfsr-ls  -A $dec  -m /dev/md2 2>&1 | less
  0x467e0ef7      .
  0x52530601      ..
  [ ERR] Invalid local
  0x595d0501      ^V<FF>^B;::9
  
  
sudo xfsr-ls  -A $(printf "%x" "$ad") -m /dev/md2 2>&1 | less
[ ERR] Not a valid inode (iadr=0x3218da9, ino=0x32190a9)

MORE

xfs.txt · Last modified: 2020/09/08 20:51 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki