THE IMMEDIATE questions about the violence at the home of Virginia Sen. R. Creigh Deeds (D-Bath), whose son apparently attacked and stabbed him before taking his own life, are rightly focused on the response of local mental health officials and whether they might have done something to avert this tragedy. If Austin Deeds, the senator’s son, needed emergency psychiatric care Monday, as officials say, why was no bed found for him at any of the regional facilities around Bath County in western Virginia, where the Deeds family lived?

A local official said phone calls turned up no available beds; three regional hospitals within two hours of the Deeds home say that, in fact, they had beds available. As the story unravels , officials must grapple with this question: Why does Virginia lack a central online registry, updated in real time, that could help mental health officials at least narrow their search for an inpatient facility to handle a person in urgent need of psychiatric care?

One health professional told us that the need for such a registry has been discussed in Virginia for a decade. Yet in the crisis posed by Austin Deeds on Monday, there was no centralized information source to guide people seeking appropriate care for him.

A broader question is whether Virginia, which prides itself on austere budgets, has managed to develop and preserve a mental health safety net adequate to its needs. The jury is still out.

It’s true the state has beefed up funding for community mental health services over the past decade, particularly since the massacre at Virginia Tech in 2007. The state’s budget for such services has grown by more than 80 percent over the past 10 years — about twice as much as the increase in overall general fund spending or in outlays for public schools and more than three times more than the growth in spending for public safety.

That’s good, though it partly reflects that the state grossly underfunded mental health services in the past. It also obscures other problems and danger areas.

For instance, as a result of a settlement with the Justice Department , Virginia is transferring thousands of developmentally disabled people from large state facilities into community-based group homes. That mandated spending for the developmentally disabled probably will compete in coming years with outlays for the mentally ill.

More worrisome, health officials cite significant gaps in resources and facilities for the mentally ill, despite the infusion of dollars. They include an inadequate number of beds and medical professionals to accommodate patients released from psychiatric hospitals but who are not ready to go home or cope with daily life without ongoing services and support. Health officials also say that local community services boards — the agencies responsible for addressing the needs of the mentally ill — sometimes have too few trained psychiatrists available to help at-risk individuals on an ongoing and reliable basis. In other words, they lack the resources to head off a crisis in the making.

The Virginia Tech massacre started a badly needed discussion on the level of resources the state was devoting to mental health. The Deeds family tragedy should renew it.