The emergence of coverage holes in wireless sensor networks (WSNs) means that some special events have broken out and the function of WSNs will be seriously influenced. Therefore, the issues of coverage holes have attracted considerable attention. In this paper, we focus on the identification of boundary nodes and coverage holes, which is crucially important to preventing the enlargement of coverage holes and ensuring the transmission of data. We define the problem of coverage holes and propose two novel algorithms to identify the coverage holes in WSNs. The first algorithm, Distributed Sector Cover Scanning (DSCS), can be used to identify the nodes on hole borders and the outer boundary of WSNs. The second scheme, Directional Walk (DW), can locate the coverage holes based on the boundary nodes identified with DSCS. We implement the algorithms in various scenarios and fully evaluate their performance. The simulation results show that the boundary nodes can be accurately detected by DSCS and the holes enclosed by the detected boundary nodes can be identified by DW. The comparisons confirm that the proposed algorithms outperform the existing ones.