Difference between revisions of "How to mount usb drive"

From IPLOG
Jump to: navigation, search
(Mount/Umount via Web Interface)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<big><big>This site is under construction!</big></big><br>
 
 
== Mount/Umount via Web Interface==
 
== Mount/Umount via Web Interface==
 
If a USB device is connected to the IPLOG unit a list of all volumes that are ready for operation can be found in the web interface in the '''System/USB''' menu. When you click to '''mount''' button, it will be automaticaly mounted the volume to default path "media/usbX". X is a number that corresponds to the mounting order of each volume. If you want '''unmount''' the volume, close your shell or navigate away from USB mount point and clik to unmount button.
 
If a USB device is connected to the IPLOG unit a list of all volumes that are ready for operation can be found in the web interface in the '''System/USB''' menu. When you click to '''mount''' button, it will be automaticaly mounted the volume to default path "media/usbX". X is a number that corresponds to the mounting order of each volume. If you want '''unmount''' the volume, close your shell or navigate away from USB mount point and clik to unmount button.
 
[[File:usb_web.png|1500px|USB.png]]
 
[[File:usb_web.png|1500px|USB.png]]
 
=== Change default mount path ===
 
=== Change default mount path ===
In the column with "'''Name'''" click to volume, where you want to assign your path. The path must point to a destination folder that does not exist, because this folder will be automatically deleted when volume is unmounted.
+
In the column with "'''Name'''" click to volume, where you want to assign your path. The '''path''' must point to a destination folder that does not exist, because this folder will be automatically deleted when volume is unmounted.
 
+
[[File:USB web2.png|Path]]
 +
[[File:USB web3.png|1500px|USB]]
 
== Mount/Umount via Console ==
 
== Mount/Umount via Console ==
 
=== Detecting USB Hard Drive ===
 
=== Detecting USB Hard Drive ===

Latest revision as of 11:04, 7 January 2021

Mount/Umount via Web Interface

If a USB device is connected to the IPLOG unit a list of all volumes that are ready for operation can be found in the web interface in the System/USB menu. When you click to mount button, it will be automaticaly mounted the volume to default path "media/usbX". X is a number that corresponds to the mounting order of each volume. If you want unmount the volume, close your shell or navigate away from USB mount point and clik to unmount button. USB.png

Change default mount path

In the column with "Name" click to volume, where you want to assign your path. The path must point to a destination folder that does not exist, because this folder will be automatically deleted when volume is unmounted. Path USB

Mount/Umount via Console

Detecting USB Hard Drive

After you plug in your USB device to your USB port, Linux system adds a new block device into /dev/ directory. At this stage, you are not able to use this device as the USB filesystem needs to be mouted before you can retrieve or store any data. To find out what name your block device file have you can run fdisk -l command.

root@iplog:/media# fdisk -l

Disk /dev/mmcblk0: 7458 MB, 7820279808 bytes, 15273984 sectors
238656 cylinders, 4 heads, 16 sectors/track
Units: cylinders of 64 * 512 = 32768 bytes

Device       Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type
/dev/mmcblk0p1    0,1,1       1023,3,16           16    3818495    3818480 1864M 83 Linux
/dev/mmcblk0p2    1023,3,16   1023,3,16      3818496    7636991    3818496 1864M 83 Linux
/dev/mmcblk0p3    1023,3,16   1023,3,16      7636992   11455487    3818496 1864M 83 Linux
/dev/mmcblk0p4    1023,3,16   1023,3,16     11455488   15273983    3818496 1864M 83 Linux
Disk /dev/sda: 3860 MB, 4047503360 bytes, 7905280 sectors
492 cylinders, 255 heads, 63 sectors/track
Units: cylinders of 16065 * 512 = 8225280 bytes

Device  Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type
/dev/sda1    0,14,31     491,254,63         912    7905279    7904368 3859M  c Win95 FAT32 (LBA)
Partition 1 has different physical/logical end:
     phys=(491,254,63) logical=(492,20,40)

Create Mount Point

Before we are able to use mount command to mount the USB partition, we need to create a mount point. Mount point can be any new or existing directory within your host filesystem. Use mkdir command to create a new mount point directory where you want to mount your USB device:

root@iplog:/# mkdir /media/usb-drive

Mount USB Drive

At this stage we are ready to mount our USB's partition /dev/sda1 into /media/usb-drive mount point.

root@iplog:~# mount /dev/sda1 /media/usb-drive/

Check the Files

root@iplog:~# ls -l /media/usb-drive/
total 60604
-rwxr-xr-x    1 root     root      35522560 Dec  8 09:43 12.0.11207.tar
drwxr-xr-x    2 root     root          4096 Dec  8 10:05 System Volume Information
-rwxr-xr-x    1 root     root       1337382 Oct 15 11:50 puzzle.ai
-rwxr-xr-x    1 root     root         51887 Dec 10 10:42 puzzle.png
-rwxr-xr-x    1 root     root      23845926 Dec 10 10:42 puzzle.tif
-rwxr-xr-x    1 root     root       1287308 Dec 10 10:42 puzzle2.ai

USB Unmount

Close your shell or navigate away from USB mount point and execute the following linux command to unmount your USB drive:

root@iplog:~# umount /media/usb-drive