# xfs log corruption

## 666threesixes666

my system freaked out on the / partition witch is xfs.  xfs is NOT JFS, as i have found out the hard way.  it has xfs_repair and it basically says mount to replay logs, basically im stuck in a cyclic catch 22. with similar error messages to this

```

ERROR: The filesystem has valuable metadata changes in a log which needs to

  be replayed.  Mount the filesystem to replay the log, and unmount it before

  re-running xfs_repair.  If you are unable to mount the filesystem, then use

  the -L option to destroy the log and attempt a repair.

  Note that destroying the log may cause corruption -- please attempt a mount

  of the filesystem before doing this.

```

&&

```

mount: Structure needs cleaning

```

gparted check file system shows ok, then back to the xfs_repair -L being the only solution.

clearly not as easy as fsck.jfs to repair all power off problems to the disk.  fsck.xfs brought me to the xfs_repair command and another xfs command.  im not at the computer right now and do not have access to it.  jfs is way more battle hardened than xfs.  /boot was recovered in like 2 seconds, and root xfs is about to get the xfs_repair -L and migration to JFS if corruption lurks in.  im kind of scared though now as my home partition is also xfs.

/boot = jfs

/ =xfs

/home = xfs

----------

## kiksen

Hi,

What message do you get when trying to mount /  from a Live CD/USB?

xfs_repair -L is a last resort (as you may know), as it will zero the log (and you will loose the changes. That may or may not be a problem, depending on what you were doing when your file systems went bad. IMHO XFS is an extremely stable filesystem - I've been running it for years on different systems without problems - except for a disk that died.

Please post the message when trying to mount your / 

/kiksen

----------

## 666threesixes666

mount: Structure needs cleaning is from a live cd mount

i have ubuntu 10.10 on a live usb drive, ive used XFS for like 2 years with out a problem, just this hard restart threw it into super block corruption mode, and its not easy as fsck.xfs to repair it.  im kinda surprised that it has xfs_command style commands to repair it.  i know the -L is the last resort.  it says it needs to replay logs to bla bla valuable data....  then mount refuses to mount / play valuable data because its structure needs cleaning.  smart says the partitions fine.  the disk did have problems with bad firmware in the past, but im not showing corruption in the other partitions so i know its not that issue cropping back up, just /....  / was designed to be expendable, but its kinda scary to have to ask the net how to reset it.

in short, mount absolutely refuses to mount the disk, and says its filthy.

(ie fsck (mount disk to enable fsck to run) mount disk (fsck disk to enable mounting)) type of problem....  absurd, about to get XFS blackmarked in my book.  i dont remember the EXACT EXACT messages, though i do remember cycling through those, and being up against the wall with -L as my only option out, and id rather repair than destroy the logs.

----------

## kiksen

Well, if you can't replay the log xfs_repair -L seems like the only way forward. I'd ask for help on #xfs on freenode. There are experts out there  :Smile: 

/Kiksen

----------

