I did a big oops, but the file is still open and in use.
Following (http://stackoverflow.com/questions/1178593/link-to-a-specific-inode),
copying from the /proc/###/fd/###
to a new file is not useful because:
- the file is changing
- The filesize is 40G and the disk is full (150MB free)
I am attempting to relink it to the filesystem (undelete it).
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
vmware-vm 4281 root 126u REG 253,0 40020664320 10928132 /var/mnt/partial.img
I held the file open with a "wc /proc/4281/fd/126", then suspended it.
I created a link on the filesystem by using debugfs (inspired from dag wieers) then edited the directory entry to set the deleted time to 0, update the link count. reboot and run fsck all is well.
This is a kernel mod to do it, I have not tested it yet.