27

When i do the following.

"cat /proc/mounts".
tmpfs /export/ftp/import tmpfs rw,relatime,size=102400k 0 0
tmpfs /export/ftp/export tmpfs rw,relatime,size=10240k,mode=755 0 0

The documentation of embedded device said that import and export are located in DRAM

However in other equipment

ubi18_0 /nvdata1/temporary-download ubifs rw,sync 0 0
ubi18_0 /export/ftp/import ubifs rw,sync 0 0
ubi18_0 /export/http/import ubifs rw,sync 0 0
tmpfs /export/ftp/export tmpfs rw,size=10240k,mode=755 0 0

The documentation of embedded device said that import is located in NAND and export are located in DRAM.

I really do not know what resides in DRAM, NAND, NOR.

The basic knowledge i have in our equiment is that NOR has u-boot. NAND has kernel and rootfs.

tshepang
  • 12,111
  • 21
  • 91
  • 136
New to Rails
  • 2,824
  • 5
  • 27
  • 43
  • 1
    Linux [tmpfs](http://en.wikipedia.org/wiki/Tmpfs) are technically not in DRAM, but in the virtual memory (in particular, could use *swap*). – Basile Starynkevitch Aug 08 '13 at 13:51
  • Thanks Basile. Does it mean that import and export are present in tmpfs? and hence import and export are located in virtual memory? – New to Rails Aug 08 '13 at 14:31

1 Answers1

40

Format of /proc/mounts

The 1st column specifies the device that is mounted.
The 2nd column reveals the mount point.
The 3rd column tells the file-system type.
The 4th column tells you if it is mounted read-only (ro) or read-write (rw).
The 5th and 6th columns are dummy values designed to match the format used in /etc/mtab.

More details on filesystem mount-points are available here.


tmpfs /export/ftp/import tmpfs rw,relatime,size=102400k 0 0
tmpfs /export/ftp/export tmpfs rw,relatime,size=10240k,mode=755 0 0

Meaning : Two independent tmpfs-es are mounted at both /export/ftp/import and /export/ftp/export. Any data stored into these directories is lost upon rebooting the kernel. tmpfs is essentially a ramdisk-like construct that stores data in the RAM. Technically speaking tmpfs is mapped into virtual memory which uses RAM and swap (if present).


ubi18_0 /nvdata1/temporary-download ubifs rw,sync 0 0
ubi18_0 /export/ftp/import ubifs rw,sync 0 0
ubi18_0 /export/http/import ubifs rw,sync 0 0
tmpfs /export/ftp/export tmpfs rw,size=10240k,mode=755 0 0

Meaning : The same "partition" on the NAND device (ubi18_0) is mounted at 3 different mount-points. ubi is a intermediate file-system layer that simplifies and optimises I/O with the underlying flash media devices. Also a temporary filesystem is mounted at /export/ftp/export.

Community
  • 1
  • 1
TheCodeArtist
  • 21,479
  • 4
  • 69
  • 130
  • Thanks TheCodeArtist. So my understanding is as follows? 1)The device tempfs with file system tempfs is mounted at /export/ftp/import with read write permission. Or in other words, The device tempfs using file system tempfs can be accessed using the directory(/export/ftp/import) and there is read wire permission to it 2)The device tempfs using file system tempfs can be accessed using the directory(/export/ftp/export) and there is read wire permission to it – New to Rails Aug 11 '13 at 07:36
  • And in other device, 1)the NAND device (ubi18_0) using file system ubifs can be accessed using the directory(/export/ftp/import,/export/http/import,/nvdata1/temporary-download) with read write access. 2)The device tempfs using file system tempfs can be accessed using the directory(/export/ftp/export) and there is read wire permission to it. But what is the use? Why is it done like this? I think i need to read about filesystems and mounting first before i ask more questions. And i think my question is wrong. Should it be as follows? "How to find if a device is mounted in DRAM or NAND or NOR?" – New to Rails Aug 11 '13 at 07:39
  • Yes. Note that both are independent. And writing into one does NOT update in the other. i.e. they are multiple entities of type tmpfs. In contrast is the `ubi18_0` in which writing using any of the mount points will reflect in the other mount-points. – TheCodeArtist Aug 11 '13 at 07:39
  • could you explain more what you mean by *device*? is it the same as char device modules? – ThunderWiring Dec 16 '15 at 00:21
  • **device** = block device. FYI, there are 3 common classes of devices char, block and network. Storage media are usually enumerated as block devices. – TheCodeArtist Dec 16 '15 at 03:10
  • The fourth column is more than just whether it's ro or rw, right? The arguments that were given to mount, or some such? – msouth Feb 21 '18 at 06:17
  • @msouth Yes, the 4th column is a comma-separated list of flags used to mount that particular mount-point. – TheCodeArtist Feb 21 '18 at 09:02
  • 1
    Is this missing a citation to https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/4/html/reference_guide/s2-proc-mounts? – Zach May 26 '20 at 20:51
  • Done. Added a link to the detailed [Mounting File Systems](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/4/html-single/introduction_to_system_administration/index#s2-storage-fs-mounting) section. – TheCodeArtist May 27 '20 at 05:53
  • `tmpfs` essentially isn't a real [device file](https://en.wikipedia.org/wiki/Device_file) - it's a part of the RAM. What you write under the mount point will be written to RAM. – Lyubomir Oct 23 '21 at 17:44