Question: Recently had a LVM'd CentOS 6.5 install get accidentally cold-shutdown. On bootup, it says that the home partition need fscking:

```
/dev/mapper/vg_myserver-lv_home: Block bitmap for group 3072 is not in group.  (block 3335668205)

/dev/mapper/vg_myserver-lv_home: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.

```

...but I guess the root partition is OK, since it gives me a shell there. So we run `e2fsck -b 32768 /dev/mapper/vg_myserver/lv_home` and after saying Yes to various fixes, on Pass 5 it just prints endless numbers to the screen, very fast. Once in a while it will print them in neat columns, and if these are block numbers, after a couple hours we are still nowhere near the first 2% being done of our 1.2 TB LV.

I read that you can use `cleap_mmp` with `tune2fs`, but upon trying that, it doesn't accept cleap\_mmp nor list it among valid options.

My question is, how does everyone deal with a corrupt ext4 fs without weeks of downtime? Does everyone have this dilemma, or weeks of downtime vs rebuilding your server / lost data? If so why does anyone use or recommend the use of ext4? Is there some trick I'm missing that would **let me target the specific block/group it's complaining about**, so we can get on with it and mount the home fs again?

Answer: 
Others have suggested this is not possible without various extensions to certain regular expression systems that are not in fact regular. However, since the language you want to match is finite, it's clearly regular. For 3 letters from a 4-letter alphabet, it would be easy:

```
(abc|abd|acb|acd|bac|bad|bcd|bdc|cab|cad|cbd|cdb|dab|dac|dbc|dcb)

```

Obviously this gets out of hand in a hurry with more letters and larger alphabets. :-)
A Perl solution:

```
perl -lne 'print if (!/(.)(?=$1)/g && /^\w{10}$/)' file

```

but it doesnt work with

```
perl -lne 'print if (!/(.)(?=\1)/g && /^\w{10}$/)' file

```

or

```
perl -lne 'print if ( /(.)(?!$1)/g && /^\w{10}$/)' file

```

tested with perl v5.14.2 and v5.18.2