Pen drive does not show on mac on attaching but show error on removal? My problem is that when I attach my pen drive to any of the ports on my Mac, it won't show up on my Mac, but when I remove the pen drive, it shows the error, "The disk was not ejected properly. If possible, always eject a disk before unplugging."

This means the Mac detects the pen drive on removal, but not on attaching.

Can anybody tell me how I can fix this problem?
If the drive is appearing in Disk Utility and shows up as being mounted, try this:
In the Finder, go to the Finder menu, then Finder Preferences, then General and be sure "external disks" is checked under "Show these items on the desktop". Then on the Sidebar screen and be sure "external disks" is checked under "Show these items in the sidebar."

This should make the drive appear.