LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 02-26-2013, 10:34 AM   #1
rocker65
LQ Newbie
 
Registered: Feb 2013
Location: Ottawa Canada
Distribution: Centos 6
Posts: 13

Rep: Reputation: Disabled
Question free loop device question


Hello all

I have a question about loop device creation. On a centos 6 system, I need to mount a lot of ISO's and need extra loop devices. I want to make the devices permanent. I follow the steps described on the site listed below, and they seem to jive with what I've seen in other places.

http://seriousbirder.com/blogs/linux...e-loop-device/

Do the instructions here make sense?

Thanks in advance
 
Old 03-01-2013, 09:00 AM   #2
yowi
Member
 
Registered: Dec 2002
Location: Au
Distribution: Debian
Posts: 209

Rep: Reputation: 52
Yeah, why?
 
Old 03-01-2013, 09:15 AM   #3
rocker65
LQ Newbie
 
Registered: Feb 2013
Location: Ottawa Canada
Distribution: Centos 6
Posts: 13

Original Poster
Rep: Reputation: Disabled
Sorry, didn't make my post very clear. I followed those instructions, and when the system is rebooted, all my loop devices are gone. I end up with the default number which isn't enough. I can recreate them fine, but it seems odd that I have to do that.
 
Old 03-01-2013, 09:41 AM   #4
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: Slackware®
Posts: 11,040
Blog Entries: 1

Rep: Reputation: 1366Reputation: 1366Reputation: 1366Reputation: 1366Reputation: 1366Reputation: 1366Reputation: 1366Reputation: 1366Reputation: 1366Reputation: 1366
Member Response

Hi,

Welcome to LQ!

Quote:
Originally Posted by rocker65 View Post
Hello all

I have a question about loop device creation. On a centos 6 system, I need to mount a lot of ISO's and need extra loop devices. I want to make the devices permanent. I follow the steps described on the site listed below, and they seem to jive with what I've seen in other places.

http://seriousbirder.com/blogs/linux...e-loop-device/

Do the instructions here make sense?

Thanks in advance
What part of this do you not understand;
Quote:
excerpt from Linux error mount: could not find any free loop device For CentOS 6 / RHEL 6 / Fedora;

To make loop devices permanent on CentOS6 or latest Fedora,
op devices permanent on CentOS6 or latest Fedora, you need to enter MAKEDEV command in /etc/rc.local
rhel 6 see /etc/modprobe.d
create loop.conf

add to /etc/modprobe.d/loop.conf
options loop max_loop=64

#You can use following command to create 256 loop devices.

MAKEDEV -v /dev/loop

#Or followings to create 10

MAKEDEV -v /dev/loop7
MAKEDEV -v /dev/loop8
MAKEDEV -v /dev/loop9

#Mount some other ISO’s…
#example mounts, yours can/will differ

# losetup -a
/dev/loop0: [fd05]:2506814 (/var/mrepo/centos5-x86_64/CentOS-5.8-x86_64-bin-DVD-1of2.iso)
/dev/loop1: [fd05]:2506813 (/var/mrepo/centos5-x86_64/CentOS-5.8-x86_64-bin-DVD-2of2.iso)
/dev/loop2: [fd05]:12992520 (/var/mrepo/centos6-x86_64/CentOS-6.3-x86_64-bin-DVD1.iso)
/dev/loop3: [fd05]:12992521 (/var/mrepo/centos6-x86_64/CentOS-6.3-x86_64-bin-DVD2.iso)
/dev/loop4: [fd05]:12992520 (/var/mrepo/centos6-x86_64/CentOS-6.3-x86_64-bin-DVD1.iso)
/dev/loop5: [fd05]:12992521 (/var/mrepo/centos6-x86_64/CentOS-6.3-x86_64-bin-DVD2.iso)
/dev/loop6: [fd05]:2834850 (/var/mrepo/sles11sp1-x86_64/SLES-11-SP1-for-VMware-DVD-x86_64-*)
/dev/loop7: [fd05]:2834851 (/var/mrepo/sles11sp1-x86_64/SLES-11-SP1-for-VMware-DVD-x86_64-*)

Last edited by onebuck; 03-01-2013 at 09:44 AM. Reason: typo
 
Old 03-01-2013, 09:55 AM   #5
rocker65
LQ Newbie
 
Registered: Feb 2013
Location: Ottawa Canada
Distribution: Centos 6
Posts: 13

Original Poster
Rep: Reputation: Disabled
I guess I don't know what I don't understand. The instructions are pretty plain. So I don't know how I have missed anything:


# cat /etc/rc.local

#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local
logger "/etc/rc.local starting tracd"
#tracd -d -s -p 8000 --pidfile=/var/run/tracd.pid /var/www/trac
/usr/bin/python /usr/sbin/tracd -d -s -p 8000 --auth=trac,/var/www/trac/.htpasswd,ssc-dcs2 --pidfile=/var/run/tracd.pid /var/www/trac
MAKEDEV /dev/loop
exit 0

my loop.conf

# cat /etc/modprobe.d/loop.conf
options loop max_loop=32

I can create them manually as I said, MAKEDEV -v /dev/loop etc..... But using the above configuration, when I reboot I only have 8 loop devices. Maybe it was that dam meteor, it messed everything up.
 
Old 03-01-2013, 10:35 AM   #6
rocker65
LQ Newbie
 
Registered: Feb 2013
Location: Ottawa Canada
Distribution: Centos 6
Posts: 13

Original Poster
Rep: Reputation: Disabled
Talking

Ok, I'll answer this myself. I had time to look at it this morning.

Putting

MAKEDEV /dev/loop in the rc.local doesn't work.

but, putting

MAKEDEV -v /dev/loop

does work.

?
 
Old 07-09-2013, 02:22 PM   #7
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 197Reputation: 197
Quote:
Originally Posted by rocker65 View Post
Ok, I'll answer this myself. I had time to look at it this morning.

Putting

MAKEDEV /dev/loop in the rc.local doesn't work.

but, putting

MAKEDEV -v /dev/loop

does work.

?
Tell it to create the amount of loop devices you need by doing:

/sbin/MAKEDEV -m 32 /dev/loop

By default, MAKEDEV /dev/loop will only create the first 8 devices and since that's what you have in your rc.local, it's basically doing nothing since by default your system will create 8 to start with.

Use -m ## to specify the number you need, I think the max still is 256 but if you only need 32, just create 32.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting the file associated with a loop device telexl LinuxQuestions.org Member Success Stories 0 11-21-2011 01:26 AM
Loop device lawrence_lee_lee Linux - Software 1 06-17-2008 02:20 AM
What is a loop back device? kd7edh Linux - General 1 01-17-2006 07:19 PM
loop: can't open device /dev/loop0: No such device or address miaviator278 Linux - Security 3 06-09-2004 09:24 PM
UMSDOS vs. loop device okok Linux - General 5 01-29-2002 11:12 AM


All times are GMT -5. The time now is 11:16 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration