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

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

/********************************************************************* * 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:
Ufo @ UFO :~ $ 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:
Ufo @ UFO :~ $ 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:
Ufo @ UFO :~ $ 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:
Ufo @ UFO :~ $ Ls/dev/sd
Sda sda1 sda2 sda5 sdb
Lsusb also has the line of Kingston Technology:
Ufo @ UFO :~ $ 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:
Ufo @ UFO :~ $ 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.
Ufo @ UFO :~ $ Ls/dev/sd
Sda sda1 sda2 sda5 sdb sdb4

Ufo @ UFO :~ $ 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

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.