How to create a new loop device in CentOS6.3

Source: Internet
Author: User
Tags centos

A recent installation of a PXE network to install a Linux server requires a large number of loop devices to mount an ISO image as a system installation source. In fact, to build a complete PXE installation server, the source configuration is still a big problem, advanced point, large point I would like to use the way of Rsync direct synchronization of the official source bar.
Well, the nonsense is not much to say, I believe many people will encounter such mount Hint: mount:could not found any free loop device
It means that you can't find an idle loop device.
As everyone knows, Linux system device files exist under the directory/dev/. Let's take a look at the number of existing loop devices:

The code is as follows Copy Code
[root@localhost html]# losetup-a
/dev/loop0: [0803]:5506094 (/var/www/html/centos-5.8-x86_64-bin-dvd-1of2.iso)
/dev/loop1: [ 0803]:5506099 (/var/www/html/centos-5.9-x86_64-bin-dvd-1of2.iso)
/dev/loop2: [0803]:5506103 (/var/www/html/ Centos-6.0-x86_64-bin-dvd1.iso)
/dev/loop3: [0803]:5506105 (/var/www/html/centos-6.1-x86_64-bin-dvd1.iso)
/DEV/LOOP4: [0803]:5505636 (/var/www/html/centos-6.2-x86_64-bin-dvd1.iso)
/DEV/LOOP5: [0803]:5506068 (/var/www/ Html/centos-6.3-x86_64-bin-dvd1.iso)
/dev/loop6: [0803]:5506109 (/var/www/html/centos-6.4-x86_64-bin-dvd1.iso
/DEV/LOOP7: [0803]:5506016 (/var/www/html/centos-6.5-x86_64-bin-dvd1.iso)
/DEV/LOOP8: [0803]:5506127 (/var /www/html/centos-7.0-1406-x86_64-dvd.iso)

CentOS 6.3, the default loop device is only LOOP0-LOOP7 these 8, we use the Mknod command to create a loop block device, creating a loop block device is very simple, a command can be done:
Mknod-m 0660/dev/loopx B 7 X
Note that the loopx corresponds to the X. As in the following example:

We can use the Losetup command to see the number of loop block device that are already in use. Losetup-a |wc-l

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.