Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

bash: losetup: command not found setting up Oracle ASM on Red Hat Linux

Posted on 2009-07-04
4
Medium Priority
?
1,868 Views
Last Modified: 2013-12-16
Hello,

I'm trying to setup oracle on linux red hat enterprise server 5 (running in vmware)

I have 4 10GB hard drives setup for this,

this is the script required to setup linux for asm that I'm having the error with

the error I get is bash: losetup: command not found

the only section of the script that generates an error is the "losetup" part

I'm executing as the root user
Run the following script as the root user. 
This sets up the loop devices to provide the multiple hard drives for ASM.
This is the script:
-------------------------------------------------------------------------------------------------
 
[ -d /u01/asmdisks ] || {
mkdir /u01/asmdisks
chown oracle:oinstall /u01/asmdisks
chmod 777  /u01/asmdisks
}
 
if [ ! -f /u01/asmdisks/data1.dsk ]
    then
        dd if=/dev/zero of=/u01/asmdisks/data1.dsk bs=1M count=3000
        dd if=/dev/zero of=/u01/asmdisks/data2.dsk bs=1M count=3000
        dd if=/dev/zero of=/u01/asmdisks/data3.dsk bs=1M count=3000
        dd if=/dev/zero of=/u01/asmdisks/data4.dsk bs=1M count=3000
        dd if=/dev/zero of=/u01/asmdisks/fra1.dsk bs=1M count=3000
        dd if=/dev/zero of=/u01/asmdisks/fra2.dsk bs=1M count=3000
        dd if=/dev/zero of=/u01/asmdisks/fra3.dsk bs=1M count=3000
        dd if=/dev/zero of=/u01/asmdisks/fra4.dsk bs=1M count=3000
        chown oracle:oinstall /u01/asmdisks/*.dsk
        chmod 666 /u01/asmdisks/*.dsk
    fi
losetup /dev/loop0 /u01/asmdisks/data1.dsk
losetup /dev/loop1 /u01/asmdisks/data2.dsk
losetup /dev/loop2 /u01/asmdisks/data3.dsk
losetup /dev/loop3 /u01/asmdisks/data4.dsk
losetup /dev/loop4 /u01/asmdisks/fra1.dsk
losetup /dev/loop5 /u01/asmdisks/fra2.dsk
losetup /dev/loop6 /u01/asmdisks/fra3.dsk
losetup /dev/loop7 /u01/asmdisks/fra4.dsk
# raw device names must start with 1.
# loop devices must start with 0.
# Unfortunate but true.
raw /dev/raw/raw1 /dev/loop0
raw /dev/raw/raw2 /dev/loop1
raw /dev/raw/raw3 /dev/loop2
raw /dev/raw/raw4 /dev/loop3
raw /dev/raw/raw5 /dev/loop4
raw /dev/raw/raw6 /dev/loop5
raw /dev/raw/raw7 /dev/loop6
raw /dev/raw/raw8 /dev/loop7
chown oracle:oinstall /dev/raw/raw[1-8]
chmod 666 /dev/raw/raw[1-8]

Open in new window

0
Comment
Question by:ora-what
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 40

Expert Comment

by:mrjoltcola
ID: 24777298
You may not have the package installed

losetup should be in /sbin

Verify that, and if not, I think the RPM is util-linux

On my Oracle RH 5.3 it is util-linux-2.13-0.50.el5
0
 

Author Comment

by:ora-what
ID: 24777322
in my /sbin directory I have (among many other) this line:

-rwxr-xr-x 1 root root   14476 Aug 21  2007 losetup
0
 
LVL 40

Accepted Solution

by:
mrjoltcola earned 2000 total points
ID: 24777331
Then apparently /sbin is not in your path. Change the script above to include the full path.

/sbin/losetup

0
 
LVL 40

Expert Comment

by:mrjoltcola
ID: 24777336
It could be due to how you logged in as root. Try "su - root" and see if /sbin is in your PATH.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question