I created a partition under my sd card. All main partition is shown here.

enter image description here

Now " C44D-6FA2 " use for USB OTG Flash Drive. Now whenever I add any file in this USB flash drive, it is not showing under /mnt/usb_share. If I reboot the raspberry then it shows perfectly.

So how can I mount and unmount this specific partition using the command line?

Thank you in advance for answers.

  • 1
    Do not post pictures of text post text. – Milliways Jan 2 at 10:14
  • sorry for this time, I will remember this. – Maharshi Oza Jan 2 at 10:20
  • Mounting and unmounting can be carried out with the mount and umount commands, Provided the partition is listed in fstab you only need use the mountpoint in the command. This doesn't appear to be your problem though. It seems that seeing new files on /mnt/usb_share ? (is the mountpoint name truncated in your screenshot?) is your problem. Curious as to why the name is 'loop0' ? Maybe it being an OTG drive has something to do with it? (not sure why using an OTG drive). – Charemer Jan 2 at 11:06
  • yes, I am using specific sd card partition as OTG drive. Bcoz I am making one wifi-based flash drive. – Maharshi Oza Jan 2 at 11:23
  • now problem is, whenever I add(copy-pest) new file in USB OTG flash drive showing in windows but the same file not showing in command line(pi terminal). After rebooting pi it shows in Terminal. – Maharshi Oza Jan 2 at 11:25

It's the result of how this setup works. Changes made on either side will not show up on the other side. AFAIK there is no way around it apart of resetting / restarting.

Even worse: because filesystem drivers on either side are not aware of changes made on the other side you can get surprising and unexpected results, such as freshly written files being overwritten by the system 'on the other side of the USB cable'.

| improve this answer | |
  • noted sir, Thank you for the valuable replay. I am thinking of restarting Rpi for the same. – Maharshi Oza Jan 3 at 13:09
  • What setup you are talking about? What sides do you mean? – Ingo Feb 1 at 18:25
  • @Ingo: As mentioned in the Q / comments. Using USB OTG to 'share' a local partition / file / whatever on a Pi0 as a USB flash drive on another computer. 'Sides' are Pi and the 'other computer' – Dirk Feb 1 at 19:53
  • Ah, comments. Only read the question... – Ingo Feb 2 at 8:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.