LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-26-2016, 03:19 PM   #1
Joy Stick
Member
 
Registered: Dec 2015
Distribution: RHEL 4.7
Posts: 108

Rep: Reputation: Disabled
Loopback device not visible ( after reboot)


Hi all,

This is Oracle LINUX 5.5
Problem is loopback devices are disappeared after system reboot.

PHP Code:
# mkdir /asmdisk
# dd if=/dev/zero of=/asmdisk/disk1 bs=1024k count=1000 
PHP Code:
# ls -l /asmdisk/*
-rw-r--r-- 1 root root 1048576000 Feb 27 04:00 /asmdisk/disk1 
PHP Code:
# /sbin/losetup /dev/loop1 /asmdisk/disk1 
PHP Code:
# losetup -a
/dev/loop1: [0806]:1011842 (/asmdisk/disk1
PHP Code:
# raw /dev/raw/raw1 /dev/loop1
/dev/raw/raw1:  bound to major 7minor 1 
PHP Code:
# ls -l /dev/raw/raw1
crw------- 1 root root 1621 Feb 27 06:02 /dev/raw/raw1 
PHP Code:
# cat /etc/sysconfig/rawdevices 
/sbin/losetup /dev/loop1 /asmdisk/disk1 
PHP Code:
# init 6
ls -/dev/raw/raw*
ls: /dev/raw/raw*: No such file or directory 
Thanks

Last edited by Joy Stick; 02-26-2016 at 03:25 PM.
 
Old 02-27-2016, 05:59 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Linux Mint 17, Debian 8
Posts: 7,863

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
Did you put an entry in /etc/fstab to mount the loopback device when you boot?

-----------------------
Steve Stites
 
1 members found this post helpful.
Old 02-28-2016, 03:07 AM   #3
Joy Stick
Member
 
Registered: Dec 2015
Distribution: RHEL 4.7
Posts: 108

Original Poster
Rep: Reputation: Disabled
Small correction !

Now i do not want to use raw utility.

Anyhow once i reboot my machine,


Quote:
# /sbin/losetup /dev/loop1 /asmdisk/disk1
# losetup -a
Above setup will disappear.

Do i need an entry in /etc/rc.local or /etc/fstab ?
 
Old 02-28-2016, 09:20 AM   #4
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Linux Mint 17, Debian 8
Posts: 7,863

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
Quote:
Originally Posted by Joy Stick View Post
Do i need an entry in /etc/rc.local or /etc/fstab ?
Yes.

----------------------
Steve Stites
 
1 members found this post helpful.
Old 02-28-2016, 11:31 AM   #5
Joy Stick
Member
 
Registered: Dec 2015
Distribution: RHEL 4.7
Posts: 108

Original Poster
Rep: Reputation: Disabled
Can i get some more ?

Quote:
/etc/rc.local or /etc/fstab ?
1) Are they do same job ? or
2) How they are different from each other ?
 
Old 02-28-2016, 11:38 AM   #6
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Linux Mint 17, Debian 8
Posts: 7,863

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
When you boot you have to mount all of your partitions. You can mount them in /etc/fstab or rc.local or you can mount them from the command line. So you have to mount your loopback device one way or the other every time you boot.

----------------------
Steve Stites
 
1 members found this post helpful.
Old 02-28-2016, 02:44 PM   #7
Joy Stick
Member
 
Registered: Dec 2015
Distribution: RHEL 4.7
Posts: 108

Original Poster
Rep: Reputation: Disabled
Thnaks for all replies.

Quote:
Adding entries in rc.local is safe instead of /etc/fstab file - I think so.
Because linux must read /etc/rc.local at end of the booting process. No way to skip rc.local file.

Is my understanding right ??
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ext4 loopback device, Buffer I/O Error on reboot cvb Linux - Software 1 06-12-2012 04:13 AM
no loopback device jkobrien Linux From Scratch 5 01-13-2009 11:03 AM
Loopback Device FredGSanford Debian 3 12-25-2006 12:48 AM
LVM not visible after reboot lord_darkhelmet Linux - General 3 10-05-2006 12:48 AM
loopback device praveenv Linux - Newbie 2 08-23-2004 07:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:30 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration