This early phase I trial studies the side effects of combination chemotherapy, total body irradiation, and donor blood stem cell transplant in treating patients with primary or secondary myelofibrosis. Drugs used in chemotherapy, such as melphalan, fludarabine phosphate, cyclophosphamide, tacrolimus, mycophenolate mofetil, and filgrastim work in different ways to stop the growth of cancer cells, either by killing the cells, by stopping them from dividing, or by stopping them from spreading. Radiation therapy uses high energy x-rays to kill cancer cells and shrink tumors. Giving combination chemotherapy and total body irradiation before a donor blood stem cell transplant helps to stop the growth of cells in the bone marrow, including normal blood-forming cells (stem cells) and cancer cells. When the healthy stem cells from a donor are infused into the patient they may help the patient's bone marrow make stem cells, red blood cells, white blood cells, and platelets.