Securely remove the drive, pop-up, detach, and view the differences before and after the device is executed

Source: Internet
Author: User
Tags kingston technology

/********************************************************************* * Author  : Samson * Date    : 10/21/2014 * Test platform: *              Mint 16 *              GNU bash, version 4.2.45 * *******************************************************************/

Unmount (umount)


Only unmount, you can directly re-mount,
Simply put, the link to the storage medium on the access device is removed from the software,
In general, unplugging the device is safe for the data in it,
Because the data read/write has been terminated at the time of uninstallation, the buffered content will be written to the media.
It will be used later to continue using the media, and you can mount it again ).

Pop-up (eject)

Remove the storage medium from the drive and disconnect from the media in the drive,
Because the storage medium is missing, you cannot re-mount it.
Compared with the optical drive, the disk is taken out, but the optical drive device can still see it,
When the pop-up dialog box is displayed, Unmount and disconnect, so the data is secure.
Used to replace other media later. You need to re-insert the media.
For the built-in devices of the USB flash drive, you need to unplug the device and re-access the device.

Secure remove drive (safely remove drive)

The power supply of the device is disconnected. To remove the device, you need to re-insert the device,
For the optical drive, the power of the optical drive is disconnected.
When safely removing the drive, unmount the drive and cut off the power of the drive. Therefore, the data is safe.
It is used to stop using the media and drive, and re-access the drive is required for re-use.

The above statement comes from the network:
Http://blog.chinaunix.net/uid-14735472-id-3770635.html

This explanation is not very clear, so let's look at the situation in the actual system:
As mentioned above, safely removing a drive is equivalent to directly disconnecting the power supply. That is to say, you cannot view the device by using commands. Here, we use a USB flash drive as an example, the USB flash drive represents a row containing Kingston Technology in the following format:
Before security removal:
[Email protected]: ~ $ Lsusb
Bus 001 device 004: Id 0951: 1666 Kingston Technology
Bus 004 device 002: Id 04b3: 310d IBM Corp.
Bus 004 device 003: Id 413c: 2003 Dell Computer Corp. keyboard

After security removal:
[Email protected]: ~ $ Lsusb
Bus 004 device 002: Id 04b3: 310d IBM Corp.
Bus 004 device 003: Id 413c: 2003 Dell Computer Corp. keyboard

Is there no line that contains Kingston Technology.

Before the pop-up:
[Email protected]: ~ $ Mount
......
Gvfsd-fuse on/run/user/UFO/gvfs type fuse. gvfsd-fuse (RW, nosuid, nodev, user = UFO)
/Dev/sdb4 on/Media/UFO type vfat (RW, nosuid, nodev, uid = 1000, gid = 1000, shortname = mixed, dmask = 0077, utf8 = 1, showexec, flush, uhelper = udisks2)

After the pop-up:
......
Gvfsd-fuse on/run/user/UFO/gvfs type fuse. gvfsd-fuse (RW, nosuid, nodev, user = UFO)

Because the USB flash drive represents the second hard disk under/dev, as mentioned above,/dev/SDB should also exist at this time. Use the command to view the information as follows:
[Email protected]: ~ $ Ls/dev/SD
SDA sda1 sda2 sda5 SDB
Lsusb also has the line of Kingston Technology:
[Email protected]: ~ $ Lsusb
Bus 001 device 005: Id 0951: 1666 Kingston Technology
Bus 004 device 002: Id 04b3: 310d IBM Corp.
Bus 004 device 003: Id 413c: 2003 Dell Computer Corp. keyboard

Before uninstallation:
[Email protected]: ~ $ Mount
......
Gvfsd-fuse on/run/user/UFO/gvfs type fuse. gvfsd-fuse (RW, nosuid, nodev, user = UFO)
/Dev/sdb4 on/Media/UFO type vfat (RW, nosuid, nodev, uid = 1000, gid = 1000, shortname = mixed, dmask = 0077, utf8 = 1, showexec, flush, uhelper = udisks2)

After uninstallation:
......
Gvfsd-fuse on/run/user/UFO/gvfs type fuse. gvfsd-fuse (RW, nosuid, nodev, user = UFO)

Note: here, this is the biggest difference between umount and eject, including the partitions of the USB flash disk. /Dev/sdb4 is a partition of SDB. After eject, no such partition can be seen. Only information of the entire disk can be seen.
[Email protected]: ~ $ Ls/dev/SD
SDA sda1 sda2 sda5 SDB sdb4

[Email protected]: ~ $ Lsusb
Bus 001 device 006: Id 0951: 1666 Kingston Technology
Bus 004 device 002: Id 04b3: 310d IBM Corp.
Bus 004 device 003: Id 413c: 2003 Dell Computer Corp. keyboard

Securely remove the drive, pop-up, detach, and view the differences before and after the device is executed

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.