hupaa
Posts: 16
Joined: Mon Feb 12, 2018 11:36 am

file transferring in raspberry pi3 modelB

Tue Mar 06, 2018 12:51 pm

Hello,
I have a programmed raspberry pi3 modelB with raspbian V16.0
based on its program after downloading a file from the web, the file will sent to media immediately.
I want to know this file go from which path up to save in media?
does it at first save in internal memory of raspberry pi3 and then send to external hard? where is its path?
the media was mounted to /sda but when I check the /sda after downloading a file, show me nothing.

thanks

fruitoftheloom
Posts: 23337
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: file transferring in raspberry pi3 modelB

Tue Mar 06, 2018 2:27 pm

hupaa wrote:
Tue Mar 06, 2018 12:51 pm
Hello,
I have a programmed raspberry pi3 modelB with raspbian V16.0
based on its program after downloading a file from the web, the file will sent to media immediately.
I want to know this file go from which path up to save in media?
does it at first save in internal memory of raspberry pi3 and then send to external hard? where is its path?
the media was mounted to /sda but when I check the /sda after downloading a file, show me nothing.

thanks

What release of Raspbian as there is no V16.0 ??
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot)..
Asus ChromeBox 3 Celeron is my other computer...

jahboater
Posts: 5759
Joined: Wed Feb 04, 2015 6:38 pm
Location: West Dorset

Re: file transferring in raspberry pi3 modelB

Tue Mar 06, 2018 3:19 pm

hupaa wrote:
Tue Mar 06, 2018 12:51 pm
the media was mounted to /sda but when I check the /sda after downloading a file, show me nothing.
Try typing:

lsblk

You will see that its probably "sda1" which has the mounted file system.

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5618
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: file transferring in raspberry pi3 modelB

Tue Mar 06, 2018 5:03 pm

hupaa wrote:
Tue Mar 06, 2018 12:51 pm
Hello,
I have a programmed raspberry pi3 modelB with raspbian V16.0
based on its program after downloading a file from the web, the file will sent to media immediately.
I want to know this file go from which path up to save in media?
does it at first save in internal memory of raspberry pi3 and then send to external hard? where is its path?
the media was mounted to /sda but when I check the /sda after downloading a file, show me nothing.
thanks
What (type of device) is "media"? (USB flash drive/HDD ...)
What does the df command report** when "media" is present?
Trev.
** post within "Code" tags please, 5th. tab above when posting.
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, and a A+) but Buster on the P4B's. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

User avatar
HawaiianPi
Posts: 5838
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: file transferring in raspberry pi3 modelB

Tue Mar 06, 2018 8:48 pm

hupaa wrote:
Tue Mar 06, 2018 12:51 pm
Hello,
I have a programmed raspberry pi3 modelB with raspbian V16.0
What? Never heard of Raspbian V16.0?
based on its program after downloading a file from the web, the file will sent to media immediately.
What "program" are you referring to?
I want to know this file go from which path up to save in media?
does it at first save in internal memory of raspberry pi3 and then send to external hard? where is its path?
That would depend on the program. Most web browsers default to saving to a folder called Downloads in your home directory.
the media was mounted to /sda but when I check the /sda after downloading a file, show me nothing.
/dev/sda is a device. Normally you would mount a partition like /dev/sda1, and if you want your files to download there, you'll have to tell your "program" to do that.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

hupaa
Posts: 16
Joined: Mon Feb 12, 2018 11:36 am

Re: file transferring in raspberry pi3 modelB

Sat Mar 10, 2018 6:55 am

Hi,
I am sorry because of late answer. I did not have access to the net for some days.
I make a mistake about release of raspbian. it is release 1.1 for November 2016.

about media it's an external SATA hard that was connected to my board through SATA to USB connector

about "program", I said that this board was manipulate by some body and I don't know how they configure that.

It does not save in "Downloads"

about "lsblk" and "df" I will try them and write the results here.

Is it true at first the file save in internal memory of Pi3 board and then send to external hard?

Thanks

jahboater
Posts: 5759
Joined: Wed Feb 04, 2015 6:38 pm
Location: West Dorset

Re: file transferring in raspberry pi3 modelB

Sat Mar 10, 2018 8:12 am

hupaa wrote:
Sat Mar 10, 2018 6:55 am
Is it true at first the file save in internal memory of Pi3 board and then send to external hard?
It will write the file directly to wherever you want it.
There is no "two-stages" and there is no internal memory on the Pi3 board.

As you know there is the SD card, and you can save files in /home/pi if you wish.
Otherwise you might save them to /media/pi/xxx where xxx is your mounted USB drive.

hupaa
Posts: 16
Joined: Mon Feb 12, 2018 11:36 am

Re: file transferring in raspberry pi3 modelB

Sat Mar 10, 2018 8:46 am

I have downloaded a file with bigger size than previous.
So I can see that in /sda for short time and then removed.

jahboater
Posts: 5759
Joined: Wed Feb 04, 2015 6:38 pm
Location: West Dorset

Re: file transferring in raspberry pi3 modelB

Sat Mar 10, 2018 9:03 am

hupaa wrote:
Sat Mar 10, 2018 8:46 am
I have downloaded a file with bigger size than previous.
So I can see that in /sda for short time and then removed.
Whats /sda ?
Can you post the output of "lsblk" please?

The filesystem will be on /dev/sda1 and it will usually be mounted at /media/pi/xxxx (where xxx is the volume label or the uuid).

Your browser might download to its cache perhaps,

hupaa
Posts: 16
Joined: Mon Feb 12, 2018 11:36 am

Re: file transferring in raspberry pi3 modelB

Sun Mar 11, 2018 6:04 am

jahboater wrote:
Sat Mar 10, 2018 9:03 am
hupaa wrote:
Sat Mar 10, 2018 8:46 am
I have downloaded a file with bigger size than previous.
So I can see that in /sda for short time and then removed.
Whats /sda ?
Can you post the output of "lsblk" please?

The filesystem will be on /dev/sda1 and it will usually be mounted at /media/pi/xxxx (where xxx is the volume label or the uuid).

Your browser might download to its cache perhaps,
this is the output of "lsblk" :

https://pasteboard.co/HbmtPCW.png

this is 60G external hard that was mounted to /sda

hupaa
Posts: 16
Joined: Mon Feb 12, 2018 11:36 am

Re: file transferring in raspberry pi3 modelB

Sun Mar 11, 2018 6:24 am

the below link is the path that external hards were mounted
https://pasteboard.co/HbmBehI.png
I can see the zip file in /sda for a short time but I can not see anything in /mnt .
Is there any command that show me the history of /mnt? I mean show me which file was transferred in /mnt?
Thanks

jahboater
Posts: 5759
Joined: Wed Feb 04, 2015 6:38 pm
Location: West Dorset

Re: file transferring in raspberry pi3 modelB

Sun Mar 11, 2018 8:32 am

hupaa wrote:
Sun Mar 11, 2018 6:04 am
this is the output of "lsblk" :

https://pasteboard.co/HbmtPCW.png

this is 60G external hard that was mounted to /sda
Is that all?
Either you have removed a lot of information from the lsblk output or you are using some strange OS that is not Raspbian.
You don't have any mounted partitions by the look of it. Please list all of the output from lsblk and all the output from "df", or "mount", and someone may be able to help.

A normal Raspbian install should produce something like this (the sd card is mmcblk0 and a usb flash drive is sda).

Code: Select all

pi@pi3:~ $ lsblk
NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda           8:0    1 28.9G  0 disk 
└─sda1        8:1    1 28.9G  0 part 
mmcblk0     179:0    0 14.9G  0 disk 
├─mmcblk0p1 179:1    0 41.5M  0 part /boot
└─mmcblk0p2 179:2    0 14.9G  0 part /
pi@pi3:~ $ 

Code: Select all

pi@pi3:~ $ df
Filesystem     1K-blocks     Used Available Use% Mounted on
/dev/root       15290576 11950244   2656132  82% /
devtmpfs          443792        0    443792   0% /dev
tmpfs             448400        0    448400   0% /dev/shm
tmpfs             448400    45208    403192  11% /run
tmpfs               5120        0      5120   0% /run/lock
tmpfs             448400        0    448400   0% /sys/fs/cgroup
tmpfs             448400     2424    445976   1% /tmp
tmpfs              65536     9080     56456  14% /var/log
/dev/mmcblk0p1     41853    21328     20525  51% /boot
tmpfs              89680        0     89680   0% /run/user/1000
/dev/sda1       30294704 19262144  11032560  64% /media/backup
pi@pi3:~ $ 
You can see how the raw disk is sda and the partitions containing file systems are sda1 sda2 etc.

hupaa
Posts: 16
Joined: Mon Feb 12, 2018 11:36 am

Re: file transferring in raspberry pi3 modelB

Sun Mar 11, 2018 8:46 am

jahboater wrote:
Sun Mar 11, 2018 8:32 am
hupaa wrote:
Sun Mar 11, 2018 6:04 am
this is the output of "lsblk" :

https://pasteboard.co/HbmtPCW.png

this is 60G external hard that was mounted to /sda
Is that all?
Either you have removed a lot of information from the lsblk output or you are using some strange OS that is not Raspbian.
You don't have any mounted partitions by the look of it. Please list all of the output from lsblk and all the output from "df", or "mount", and someone may be able to help.

A normal Raspbian install should produce something like this (the sd card is mmcblk0 and a usb flash drive is sda).

Code: Select all

pi@pi3:~ $ lsblk
NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda           8:0    1 28.9G  0 disk 
└─sda1        8:1    1 28.9G  0 part 
mmcblk0     179:0    0 14.9G  0 disk 
├─mmcblk0p1 179:1    0 41.5M  0 part /boot
└─mmcblk0p2 179:2    0 14.9G  0 part /
pi@pi3:~ $ 

Code: Select all

pi@pi3:~ $ df
Filesystem     1K-blocks     Used Available Use% Mounted on
/dev/root       15290576 11950244   2656132  82% /
devtmpfs          443792        0    443792   0% /dev
tmpfs             448400        0    448400   0% /dev/shm
tmpfs             448400    45208    403192  11% /run
tmpfs               5120        0      5120   0% /run/lock
tmpfs             448400        0    448400   0% /sys/fs/cgroup
tmpfs             448400     2424    445976   1% /tmp
tmpfs              65536     9080     56456  14% /var/log
/dev/mmcblk0p1     41853    21328     20525  51% /boot
tmpfs              89680        0     89680   0% /run/user/1000
/dev/sda1       30294704 19262144  11032560  64% /media/backup
pi@pi3:~ $ 
You can see how the raw disk is sda and the partitions containing file systems are sda1 sda2 etc.

Code: Select all

root@Low:/# df
Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/root       14727536 4928952   9141580  36% /
devtmpfs          469532       0    469532   0% /dev
tmpfs             473864       0    473864   0% /dev/shm
tmpfs             473864   48184    425680  11% /run
tmpfs               5120       4      5116   1% /run/lock
tmpfs             473864       0    473864   0% /sys/fs/cgroup
/dev/mmcblk0p1     64456   42856     21600  67% /boot
/dev/sda        57432056   53280  54431608   1% /sda
tmpfs              94776       0     94776   0% /run/user/1000
/dev/sdb        57432056   53256  54431632   1% /mnt

Code: Select all

root@Low:/# lsblk
NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda           8:0    0 55.9G  0 disk /sda
sdb           8:16   0 55.9G  0 disk /mnt
mmcblk0     179:0    0 14.5G  0 disk
├─mmcblk0p1 179:1    0   63M  0 part /boot
└─mmcblk0p2 179:2    0 14.4G  0 part /


hupaa
Posts: 16
Joined: Mon Feb 12, 2018 11:36 am

Re: file transferring in raspberry pi3 modelB

Sun Mar 11, 2018 8:47 am

How Can I log activities on /mnt?

jahboater
Posts: 5759
Joined: Wed Feb 04, 2015 6:38 pm
Location: West Dorset

Re: file transferring in raspberry pi3 modelB

Sun Mar 11, 2018 8:52 am

OK so you have created file systems on the raw disks rather than within partitions.
Which is possible on Linux, but rarely done, and should have produced a warning.

You can redirect output from programs to anywhere you have permission for, with

myprogram >/mnt/mylogfile

epoch1970
Posts: 5131
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: file transferring in raspberry pi3 modelB

Sun Mar 11, 2018 12:25 pm

To continue with jahboater's remark, the way you've organized your mounts is also unconventional.
  • With linux "sda" might become sdb at the next reboot or disconnect/reconnect cycle, so it is not a very useful mount name
  • It is customary to not add directories to root (/) but rather add directories in existing subdirectories. By convention, "/mnt" is the place where you'd mount fixed media like these hard drives. Unless your machine will never have more than one device, you're supposed to create subdirectories in /mnt.
    For example you could create directories /mnt/data1 and /mnt/data2 and adjust your system to mount the drives there.
If you want to monitor your drives activity you can "sudo apt-get install sysstat" and then try something like "sudo iostat 10".
Iostat would print every 10 seconds the activity on your various storage devices.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

hupaa
Posts: 16
Joined: Mon Feb 12, 2018 11:36 am

Re: file transferring in raspberry pi3 modelB

Mon Mar 12, 2018 7:47 am

jahboater wrote:
Sun Mar 11, 2018 8:52 am
OK so you have created file systems on the raw disks rather than within partitions.
Which is possible on Linux, but rarely done, and should have produced a warning.

You can redirect output from programs to anywhere you have permission for, with

myprogram >/mnt/mylogfile
Excuse me, Could you please explain more.
there is no "mylogfile" in /mnt

hupaa
Posts: 16
Joined: Mon Feb 12, 2018 11:36 am

Re: file transferring in raspberry pi3 modelB

Mon Mar 12, 2018 7:52 am

epoch1970 wrote:
Sun Mar 11, 2018 12:25 pm
To continue with jahboater's remark, the way you've organized your mounts is also unconventional.
  • With linux "sda" might become sdb at the next reboot or disconnect/reconnect cycle, so it is not a very useful mount name
  • It is customary to not add directories to root (/) but rather add directories in existing subdirectories. By convention, "/mnt" is the place where you'd mount fixed media like these hard drives. Unless your machine will never have more than one device, you're supposed to create subdirectories in /mnt.
    For example you could create directories /mnt/data1 and /mnt/data2 and adjust your system to mount the drives there.
If you want to monitor your drives activity you can "sudo apt-get install sysstat" and then try something like "sudo iostat 10".
Iostat would print every 10 seconds the activity on your various storage devices.
Thanks
I will try it.
based on document about "iostat" it should be show me is there any data read or data write on disks or not.

epoch1970
Posts: 5131
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: file transferring in raspberry pi3 modelB

Mon Mar 12, 2018 8:29 am

hupaa wrote:
Mon Mar 12, 2018 7:52 am
based on document about "iostat" it should be show me is there any data read or data write on disks or not.
Output looks like that (here with a single storage device, the SD card):

Code: Select all

admin@berck:~ $ sudo iostat 30
Linux 4.9.63-v7+ (berck) 	03/12/2018 	_armv7l_	(4 CPU)

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0.11    0.00    0.09    0.04    0.00   99.76

Device:            tps    kB_read/s    kB_wrtn/s    kB_read    kB_wrtn
mmcblk0           0.38         1.01         4.51     509793    2277180

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0.08    0.00    0.64    0.28    0.00   99.01

Device:            tps    kB_read/s    kB_wrtn/s    kB_read    kB_wrtn
mmcblk0           2.93       233.20         8.00       6996        240

^Cadmin@berck:~ $ 
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

hupaa
Posts: 16
Joined: Mon Feb 12, 2018 11:36 am

Re: file transferring in raspberry pi3 modelB

Mon Mar 12, 2018 10:36 am

epoch1970 wrote:
Mon Mar 12, 2018 8:29 am
hupaa wrote:
Mon Mar 12, 2018 7:52 am
based on document about "iostat" it should be show me is there any data read or data write on disks or not.
Output looks like that (here with a single storage device, the SD card):

Code: Select all

admin@berck:~ $ sudo iostat 30
Linux 4.9.63-v7+ (berck) 	03/12/2018 	_armv7l_	(4 CPU)

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0.11    0.00    0.09    0.04    0.00   99.76

Device:            tps    kB_read/s    kB_wrtn/s    kB_read    kB_wrtn
mmcblk0           0.38         1.01         4.51     509793    2277180

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0.08    0.00    0.64    0.28    0.00   99.01

Device:            tps    kB_read/s    kB_wrtn/s    kB_read    kB_wrtn
mmcblk0           2.93       233.20         8.00       6996        240

^Cadmin@berck:~ $ 

hupaa
Posts: 16
Joined: Mon Feb 12, 2018 11:36 am

Re: file transferring in raspberry pi3 modelB

Mon Mar 12, 2018 10:38 am

hupaa wrote:
Mon Mar 12, 2018 10:36 am
epoch1970 wrote:
Mon Mar 12, 2018 8:29 am
hupaa wrote:
Mon Mar 12, 2018 7:52 am
based on document about "iostat" it should be show me is there any data read or data write on disks or not.
Output looks like that (here with a single storage device, the SD card):

Code: Select all

admin@berck:~ $ sudo iostat 30
Linux 4.9.63-v7+ (berck) 	03/12/2018 	_armv7l_	(4 CPU)

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0.11    0.00    0.09    0.04    0.00   99.76

Device:            tps    kB_read/s    kB_wrtn/s    kB_read    kB_wrtn
mmcblk0           0.38         1.01         4.51     509793    2277180

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0.08    0.00    0.64    0.28    0.00   99.01

Device:            tps    kB_read/s    kB_wrtn/s    kB_read    kB_wrtn
mmcblk0           2.93       233.20         8.00       6996        240

^Cadmin@berck:~ $ 
Does it show the rate of read and write for small file such as 100KB or 200KB?

Return to “General discussion”