corrupted /data partition? for a stupid reason I used TWRP which is btw a stupid tool... long story short.. It messed up the data partition...

Currently I have a nexus 5 that can run whatever recovery I want, but doesn't have a /data partition...

How do I fix my phone so that I can install any ROM for complete reference here are some of the info

when ever I try factory reset (using CWM) I get the following error

--Wiping data...
Formatting /data...
E:Error mounting /data!
Formatting /cache...
Formatting /sd-ext...
E:unknown volume for path [/sd-ext]
Formatting /sdcaard/.android_secure...
E:Error mounting /sdcaard/.android_secure!
Data wipe complete


I've tried adb shell and then running the following 

~# e2fsck /dev/block/platform/msm_sdcc.1/by-name/userdata

e2fsck 1.41.14 (22-Dec-2010)
e2fsck: Superblock invalid, trying backup blocks...
e2fsck: Bad magic number in super-block while trying to open /dev/block/platform/msm_sdcc.1/by-name/userdata

The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 &lt;device&gt;
Try doing what it suggests... run e2fsck -b 8193 /dev/block/platform/msm_sdcc.1/by-name/userdata. If that doesn't work, try running mke2fs /dev/block/platform/msm_sdcc.1/by-name/userdata.

You can also boot into fastboot mode and run fastboot erase userdata.

If none of these work, please elaborate on this "long story". How did you mess up your data partition with TWRP? Got any logs/error messages/steps to reproduce? I've been using TWRP ever since I started using custom ROMs and never had an issue.