The law by a pergola-Are its beams valid Sechach, and must one do anything to it if he desires to use it as a Sukkah?
The Halachic issues: A pergola is an outsided shaded area which is made with wooden panels that create a roofing to provide shade. The validity of using this area for Sukkos is questionable on three fronts as, 1) Perhaps it is defined as an old Sukkah which requires a 1×1 Tefach square of new Sechach to be placed, or 2) Perhaps it is defined as a Sukkah used throughout the year for dwelling purposes which requires all the beams to be lifted up and replaced. 3) Perhaps the pergola beams themselves are invalid being that they are attached to the roofing, and hence must be removed and have Kosher Sechach placed in their stead.
The law of the screwed in pergola beams: If the beams of the pergola are nailed or screwed into the roofing, then these beems are invalid for Sechach unless they are unscrewed and then re-rested onto the frame before Sukkos without rescrewing them.
The law of loose pergola beams: If the beams are not nailed or screwed in, and they are very narrow to the point that they are not normally used as roofing material, and are certainly less than 24 centemeters wide, then they are valid for Sechach if it was placed on the pergola also for the sake of the Mitzvah of Sukkah, and the pergola was not used for dwelling purposes. If the pergola was used also for dwelling purposes, then all the beams must be lifted and replaced to be validated, as stated in the Halacha above. If the pergola was made only for shade and not also for the Mitzvah, then a 1×1 Tefach space would need to be renewed prior to Sukkos, as stated above.
The law if the pergola contains both screwed and loose beams: If the pergola is made up of both nailed in or screwed in beams and loose beams, then the loose beams are valid if placed also for the sake of the Mitzvah, and not used for dwelling purposes during the year, while the nailed or screwed beams are invalid. If there are more loose beams than screwed beams on the Sukkah, then then Sukkah is valid. If one removes the loose beams and places Sechach over the frame of screwed beams, some Poskim rule that even the screwed beames become validated as a result.
The law if the pergola contains only a mere screwed in frame: If the pergola is made up of a frame of screwed beams, with empty space between the beams of the frame, then although the frame beams are invalid for Sechach, placing Kosher Sechach over the frame validates the Sukkah, if the Kosher Sechach gives off more shade than the pergola screwed beam frames. If the pergola frame beams are less than three Tefachim wide, then one may even eat under them.
How to initially build a pergola with intent to use also on Sukkos: A pergola can be built in the following way to be valid also for Sukkos: Build a frame with less than three Tefachim wide [24 centemeters] beams, making sure to leave more empty space than the space taken up by the frame. Then make short narrow beams which slide into pockets made within the frame. These beams remain valid for Sechach being that they are not screwed in, so long as they are initially rested on the frame for the sake of the Mitzvah of Sukkah. Thus, make sure that the carpenter builds the pergola in a way that there is greater space between each set of beams than the width of the beams themselves.
 See Piskeiy Teshuvos 626:9; Or Torah 5758 p. 43; Hamoadim Kehilchasam 1:205;
Explanation: According to all opinions, so long as a) you place Kosher Sechach in-between the beams of the pergola, or on top of them in a way that the Kosher Sechach hovers over the space between the beams, and b) the Kosher Sechach provides more shade than the shade of the pergola beams [such as if there is more empty space between the beams than the space that the beams themselves take up, such as if the beams are 10 centimeters wide and there is 15 centimeters of empty space between each beam], and c) the pergola beams are less than 24 centimeters wide, then the Sukkah is fully Kosher and one may even eat under the beams. If however the pergola beams provide more shade than the Kosher Sechach [such as if there is more beams than empty space between the beams, such as if the beams are 15 centimeters wide and there is 10 centimeters of empty space between each beam] then the Kashrus of such a Sukkah is dependent on several factors, such as if it was made for the sake of being used as a roof, or for the sake of giving shade throughout the year, or only for the sake of the Mitzvah of Sukkah. Even in the latter case, it is still subject to debate amongst Poskim, with some always invalidating the beams due to them being nailed or screwed into the frame, and some validating it if there was material in between the beams which was removed for the sake of placing the Kosher Sechach there, or some validating even with simply placing Kosher Sechach over it. According to all, the beams are valid if one unscrews them and rests them back onto the frame for the sake of Sechach. Likewise, according to all, the beams are invalid if there exists no material that was removed from in-between the beams, and one made the pergola for the sake of dwelling under it throughout the year, to eat and sleep there. [Admur 626:13 that only if remove roof tiles can roof beams become Kosher and 636:1 regarding Sukkah yeshana that simply placing Kosher Secha of 1×1 Tefach suffices; M”B 626:17; The following Poskim invalidate nailed beams: Rashba 1:213; Tosafus Sukkah 2a, M”A 626:6 and 627:2, Divrei David 1:37, Shaar Hatziyon 633:6; Emek Teshuvah 96; Piskeiy Teshuvos 626:9 that a) Placing on top of the beams suffices to negate the issue of Lavud Lehachmir, and b) Screwed beams are invalid Sechach and thus one must have majority shade in the Sukkah from the Kosher Sechach alone]
 The following Poskim invalidate nailed beams from being used as Sechach: Rashba 1:213; Tosafus Sukkah 2a, M”A 626:6 and 627:2, Beis Yosef 629:8, Divrei David 1:37, Shaar Hatziyon 633:6; Emek Teshuvah 96; Hamoadim Kehilchasam 1:205; See Piskeiy Teshuvos 626:9; Sefer Hasukkah p. 290 and 321; Omitted from Admur in 626:12, thus implying that even screwed in beams remain valid, and so is likewise implied from Piskeiy Teshuvos ibid who writes that if one removes the pergola beams from the frame then even the frmae becomes valid.
 Admur 629:32
 Admur 629:31-32
 See Halacha above and previous Q&A in name of Sefer Hachaim that when placed also for the sake of the Mitzvah, it does not require even renewal
 See Piskeiy Teshuvos ibid
 Piskeiy Teshuvos ibid
 See Admur 626:14 that the Kosher Sechach inbetween the non-Kosher beams negates the issue of Lavud; M”B 626:17; Emek Hateshuvah 96
 See Michaber 632:1; M”B 632:2-3
 See Moadim Kehilchasam 1:207 [however, see there that before Sukkos one is to relift 1×1 Tefach of Sechach, however according to Sefer Hachaim, ibid, so long as itw as made also for the sake of Sukkos it is valid, even this is not necessary.]