Then His brothers and His mother came, and standing outside they sent to Him, calling Him. And a multitude was sitting around Him; and they said to Him, "Look, Your mother and Your brothers and outside seeking You." But He answered them, saying, "Who is My mother, or My brothers?" Mark 3:31-33, NKJV
Other than Mary and Joseph (to a lesser extent) we don't find much about Jesus' family in the New Testament. Matthew names His brothers as James, Joseph, Simon, and Judas and mentions sisters in passing (Matt. 13:55, 56).
John tells us that His "brothers did not believe in him" and that He couldn't be straightforward about His plans with them (John 7:5, 3; cf. 10, RSV). On the other hand, the birth and early childhood narratives of Matthew and Luke leave no doubt that Mary understood and believed in her Son's forthcoming mission.
The events of Mark 3:31-35, in which Jesus redefines His family, began in verse 21 when His brothers and mother show up to take custody of Him, fearing that He was losing His bearings. Thus the two family passages form a sandwich around the opposition of the Jerusalem scribes who believed that a devil possessed Him (verses 22-27).
The overall pattern of verses 21-35 finds unity in that both groups oppose Jesus and believe that He is under the control of an evil power. It is impossible to say if Mary shared that attitude, or if she was merely under the domineering influence of Jesus' brothers, who had no doubts about His problems. On the other hand, she may have become discouraged. After all, things weren't turning out as she probably imagined they would. Instead of Jesus acting like the promised Messiah, as far as she could see, He was merely making a mess out of His life and heading for catastrophe.
We can be thankful that Mark 3 is not the end of what we know about Jesus' family. Some, if not all, of His brothers eventually came to believe in Him, probably after His death and resurrection (Acts 1:14). After that, Jesus appeared to James (1 Cor. 15:7), who later became the leader of the Jerusalem church (Gal. 1:19; 2:9; Acts 12:17; 15:13; 21:18). He would also write the book that carries his name, while Jesus' brother Jude would write the letter that bears that title (James 1:1; Jude 1).
The moral of the story: Never give up on your family, even if they think you are nuts and try to block your walk with Jesus.