In spring 617, Li persuaded Zhai that, with Emperor Yang away and Yang Tong in charge at Luoyang, the officials there were not of one mind. They thus sent Pei Shufang () to Luoyang to scout it, but Pei was discovered, and the Sui officials at Luoyang began to prepare for an attack. In response, Li and Zhai launched their assault at Luokou Storage (), a massive food storage that Emperor Yang built, and they captured it. They opened the food storage to allow the people to take food, and many people joined them. The Sui generals Liu Changgong () and Fang Shi (), viewing Zhai's forces as nothing more than bandits looking for food, took them lightly and attacked. Li and Zhai wore out the army from Luoyang with hunger, and then attacked, defeating it.