Linux cyclic device/dev/loop

Source: Internet
Author: User

Linux cyclic device/dev/loop (or vnd (vnode disk) or lofi (Cyclic file Interface) is a pseudo device, this type of device allows files to be accessed as Block devices. Before use, the cyclic device must be associated with files on the existing file system. This association provides you with an application interface that allows you to use a file as a special block file (see the device file system. Therefore, if a file contains a complete file system, the file can be mounted as a disk device. These device files are often used for CDs or Disk Images (IOS and IMG ). By means of cyclic mounting, you can mount the files containing the file system so that the files in the file system can be accessed. These files will appear in the mount point directory. To mount a file containing a file system in a directory: 1. use a loop device (/dev/loop) to connect to the file (use the losetup command) 2. mount the cyclic device to a directory (run the mount command). For example, there is a file sample containing the file system. img,/mnt/point is the directory, if you set sample. to mount img to/mnt/point, run the following command [plain] losetup/dev/loop0 sample. img mount/dev/loop0/mnt/point # You can use a mount command to replace the above two commands mount-o loop sample. img/mnt/point # uninstall umount/mnt/point # view all loop devices associated with the file # losetup-a losetup-d/dev/loop0

Related Article

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.