Bring back a deleted partition

I deleted my partition on a test server and want to
bring back the partition.

I have not rebooted yet, so system is operational.

I have the /proc/partition

major    minor    #blocks        name
8          0         195359960    sda
8          1         1044224       sda1
8          2         2096482       sda2
8          3         4200997       sda3
8          4         1                sda4
8          5         5245222      sda5
8          6         1044224      sda6
8          7         2096           sda7
8          8         179598667   sda8

the /etc/fstab

/dev/sda1         swap          swap        pri=42 0 0
devpts             /dev/pts      devpts      defaults 0 0
proc                /proc           proc         defaults 0 0
/dev/sda2        /                 reiserfs     defaults,nosuid 0 0
/dev/sda3        /usr             reiserfs     defaults,nosuid 0 0
/dev/sda5        /var             reiserfs     defaults,nosuid 0 0
/dev/sda6        /suid            reiserfs     defautls 0 0
/dev/sda7        /tmp            reiserfs     defaults,nosuid 0 0
/dev/sda8        /local           reiserfs     defaults,nosuid 0 0

if i do an fdisk -l

Disk /dev/sda: 200GB  200048599040 bytes
255 heads, 63 sectors/track, 24321 cylinders
units=cylinders of 16065 * 512 = 8225280 bytes

My question is, how do I recreate the same blocks (partition) with fdisk
given this information?

fdisk asks for +size, +sizeK, + sizeM and the blocks never seem to
match no matter how many tries I make?

If you have the /sys filesystem mounted, you're in good shape. Look in /sys/block/sda/sda*/start. These give you your starting block numbers for the each partition... the one the kernel knows about since the last reboot.

When fdisk asks for a number, it's usually a cylinder number, not a block number. To convert block numbers to cylinder numbers, divide by (63*255) -- in your case -- then add one. So I get:

cat /sys/block/sda/sda*/start
63
257040
17028900
21221865

The starting cylinder numbers are as follows:

1
17
1061
1322

The ending cylinder numbers should normally be the next starting minus one.

The partition may still work if it ends up larger in the partition table than it was before. This new space will not be available inside it without reformatting but that won't stop it from working for some kinds of partitions. Smaller, of course, would be a big problem...