Types of devices in Linux

Source: Internet
Author: User

Loop device

Loop device

One. Reference commands
[Email protected] a]# Losetup
Usage
Losetup Loop_device # Give info
losetup-d Loop_device # Delete
Losetup-f # Find Unused
LOSETUP-A # list all used
Losetup-r # Read-only Loop
Losetup [-E encryption] [-O offset] [-r] {-f|loop_device} file # Setup
[Email protected] a]#

Two. Loop mount
2.1 Mount to an idle loop device
[Email protected] a]# losetup-f-o $[208845*512]/lvm/vm/vm41.img
2.2 Mount to the specified loop device
[Email protected] a]# Losetup/dev/loop4-o $[208845*512]/lvm/vm/vm41.img
2.3 View all in-use loop devices
[Email protected] a]# losetup-a
/DEV/LOOP0: [fd00]:327683 (/lvm/vm/vm42.img), offset 106928640
/DEV/LOOP4: [fd00]:327682 (/lvm/vm/vm41.img), offset 106928640


Three. Loop Delete
Losetup-a
Losetup-d/DEV/LOOP1

Device types in Linux

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.