2 Peter 3:5-6 - "5 But they deliberately forget that long ago by God’s word the heavens existed and the earth was formed out of water and by water.
6 By these waters also the world of that time was deluged and destroyed."

Verse 6 is sometimes used by Young Earth Creationists (YECs) to demonstrate that the waters that covered the earth during creation also covered the earth during the flood. If true, then the flood completely covered the earth, and the earth is young.
This verse is given even more power when you consider that Peter is providing the means to identify scoffers in the end times. These are people who doubt Jesus' return in particular, but God's Word in general. An Old Earth Creationist (OEC) is sometimes looked upon with concern for not appearing to believe the plain wording of Genesis 1. So, let us review the specific verses from Genesis 1 that Peter is alluding to above in 2 Peter 3:5...
6 And God said, “Let there be a vault between the waters to separate water from water.” 7 So God made the vault and separated the water under the vault from the water above it. And it was so. 8 God called the vault “sky.” And there was evening, and there was morning—the second day.
In other words, the sky is below the upper waters. The oceans constitute the lower waters. Moving on to verse 9...
9 And God said, “Let the water under the sky be gathered to one place, and let dry ground appear.” And it was so.
10 God called the dry ground “land,” and the gathered waters he called “seas.” And God saw that it was good.
So, the creation of land was a two-fold process. First, God divided the waters into upper and lower. Then, He raised the land out of the lower waters. As for the upper waters, we do not see them again until the flood in Genesis 7...
11 In the six hundredth year of Noah’s life, on the seventeenth day of the second month—
on that day all the springs of the great deep burst forth, and the floodgates of the heavens were opened.
12 And rain fell on the earth forty days and forty nights.
As Peter wrote, it was both by the lower waters and the upper waters that God flooded the earth. It seems pretty clear, until you look at where God put the sun on Day 4. Remember, the vault is below the upper waters...
16 God made two great lights—the greater light to govern the day and the lesser light to govern the night. He also made the stars.
17 God set them in the vault of the sky to give light on the earth,
18 to govern the day and the night, and to separate light from darkness. And God saw that it was good.
Clearly, God did not create the heavens (i.e., the sun, moon, and stars) below the flood gates of the heavens (i.e., the upper waters of Genesis 1:7). The challenge is how to point this out without messing with the doctrine of Biblical inerrancy, something I believe in.
= = =
The concept of creating the heavens below the upper waters was something that Moses learned growing up as an Egyptian. If you study the Egyptian creation myths, they believed almost exactly what Moses wrote. What Moses added is that God is the one and only Creator. Contrary to Egyptian gods who control only one part of nature or another, God created nature itself. So, Moses was not trying to correct the false science that the Hebrew slaves and he were familiar with. Frankly, he didn't know it was wrong!
Second, you can see why an ancient race might believe there were waters above the sky... the sky is blue! Why else would it be blue if there were no waters above it? They knew nothing of the atmosphere and its ability to bend the sunlight as it passes through. So, contrary to the sun being in the background of the sky, the sky appeared to them to be in the background of the sun! With the blue skies appearing above sun, it would seem that the upper waters were not entirely drained on the flood... perhaps Moses thought that God had put them back.
As for biblical inerrancy, it is the not the Egyptian science that must be correct for doctrine to survive. It is the truth of what God did that must survive, and it does. The early earth development that mainstream science theorizes are responsible for the exact appearance of what Moses recorded in Genesis 1: creation of a what appears to be vault, appearance of constellations, moon, and sun, a blue sky, all of it. The waters that science confirms were indeed involved in the development of the earth and later the flood. The science may be different, but the events themselves occurred.
= = =
So, what is Peter saying? Peter is not saying that God created a vault below the flood gates of heaven. He is merely referring back to what Moses wrote. That is all. Whatever Moses meant, Peter is just confirming it. Whatever actually happened in between Moses' false science, Peter is just confirming the truth of what happened: the hydrosphere gave way to the earth, and the water from that was used in the flood.
As for the scope of the flood itself, Peter again is not adding any understanding beyond what Moses wrote of the flood. Moses recorded the flood using words that could refer to the planet, or just a populated region; so did Peter. So, whatever Moses meant, Peter is just confirming it.
For Christians, OEC and YEC alike, this should come as good news. Why? Because Peter was warning against scoffers, and as a litmus test against an old earth, the implication is rather ugly... that believing the earth is old is akin to denying the imminent coming of our Lord. But far from scoffing at that expectation, I embrace it.