Sponsored Content
Top Forums Shell Programming and Scripting File system creation script on AIX 6.1 using while loop Post 302857373 by arorap on Thursday 26th of September 2013 07:32:16 AM
Old 09-26-2013
Hi Scott,

thanks a lot, that worked.

i think the only problem now is...it is still giving below Error:

" crfs: /oracle/E6P/sapdata1 file system already exists "

when the file system doesnt exist at all...and i am creating a new one.
Code:
#!/bin/bash
echo "VG: "
+ echo VG:
VG:
read VG
+ read VG
utilvg
echo "LP: "
+ echo LP:
LP:
read LP
+ read LP
1
echo "SAP: "
+ echo SAP:
SAP:
read SAP
+ read SAP
sapdata
echo "NUM: "
+ echo NUM:
NUM:
read NUM
+ read NUM
3
echo "SID: "
+ echo SID:
SID:
read SID
+ read SID
E6P
echo "CUR: "
+ echo CUR:
CUR:
read CUR
+ read CUR
1
while [ $CUR -lt $NUM ]; do
  (mklv -y $SAP$CUR -t jfs2 -e x $VG $LP)
  crfs -v jfs2 -d /dev/$SAP$CUR -m /oracle/$SID/$SAP$CUR -A yes -p rw -a log=INLINE -a options=cio;
  mount /oracle/$SID/$SAP$CUR
  CUR=$((CUR + 1))
done
+ [ 1 -lt 3 ]
+ mklv -y sapdata1 -t jfs2 -e x utilvg 1
sapdata1
+ crfs -v jfs2 -d /dev/sapdata1 -m /oracle/E6P/sapdata1 -A yes -p rw -a log=INLINE -a options=cio
crfs: /oracle/E6P/sapdata1 file system already exists
+ mount /oracle/E6P/sapdata1
+ CUR=2
+ [ 2 -lt 3 ]
+ mklv -y sapdata2 -t jfs2 -e x utilvg 1
sapdata2
+ crfs -v jfs2 -d /dev/sapdata2 -m /oracle/E6P/sapdata2 -A yes -p rw -a log=INLINE -a options=cio
crfs: /oracle/E6P/sapdata2 file system already exists
+ mount /oracle/E6P/sapdata2
Replaying log for /dev/sapdata2.
mount: /dev/sapdata2 on /oracle/E6P/sapdata2: Unformatted or incompatible media
+ CUR=3
+ [ 3 -lt 3 ]


Last edited by Scott; 09-26-2013 at 08:36 AM.. Reason: Removed hideous green from text
 

10 More Discussions You Might Find Interesting

1. HP-UX

file system creation

I won't to remove a filesystem /dev/vg01/lvo1 and copy the same to different vg ex:- /dev/vg02. Pls give the required step to be followed to complete the said process (3 Replies)
Discussion started by: kamlesh_k
3 Replies

2. Shell Programming and Scripting

Creation of script,if the data file have more than one entry!!!

1.Daily there will be 14 files in the data directory 2.someday's the 14 files receive more than once r twice with different time stamps....we need to chk the count of the file and if the count of the file is two.we need to combine the both the files. 3. if any duplicate data is there just... (1 Reply)
Discussion started by: bobprabhu
1 Replies

3. AIX

how to loop through non-empty files with shell script on AIX

I have av script that loops through some statistic files to create a report. We would like to only loop through non-empty files as these files create an empty report-line. I have figured out how to find the non-empty files, but not how to loop through only those files. Here is the code that finds... (4 Replies)
Discussion started by: Tessa
4 Replies

4. Shell Programming and Scripting

file creation inside loop

i=1 while do touch TC$i.txt i=`expr $1 + 1` done echo "files created successfully" What is wrong with code...its running continuosly... (4 Replies)
Discussion started by: villain41
4 Replies

5. AIX

AIX Bunch of printers queue creation script - HELP

I'd seek for help on how to create a bunch of printers in AIX 6.x or equal or above in one go – say like I have 35 printers to create in 4 different AIX Nodes every month – I currently create it manually like below:- How can I automatic this creation on all the 4-5 Nodes – not actually automatic... (3 Replies)
Discussion started by: shiv2001in
3 Replies

6. Shell Programming and Scripting

Aix .ksh for loop script.

Hi, I'm trying to write a for loop to run through a list of servers and for each server copy a file to a backup file. But I can't seem to get it to run through my server list. It work for individual servers, please see below. #!/bin/ksh SSH_USERID=khcuser webservers="server1 server2" ... (2 Replies)
Discussion started by: elmesy
2 Replies

7. Solaris

Creation of zone based on zfs root file system

Hi all I want to know if suppose my global zone has UFS root file system & now I want to create non global zone with ZFS root file system. Is it possible.....If this is possible then how will I able to create zone based on ZFS root file system in global zone having UFS based root file system (5 Replies)
Discussion started by: sb200
5 Replies

8. Shell Programming and Scripting

CSV File Creation Within Shell Script

Hi All, I am trying to create a CSV file within a shell script test.ksh and the code snippet is something like below: #!/usr/bin/ksh # Set required variables. . $HOME/.prof # Output file path Group1=/tmp/G1.csv Group2=/tmp/G2.csv Group3=/tmp/G3.csv $ORACLE_HOME/bin/sqlplus -s... (2 Replies)
Discussion started by: swasid
2 Replies

9. Solaris

Solaris 10 luupgrade flash archive file system creation failed

Hey guys, I'm attempting to migrate us to a new box. First problem I had was the change in architecture going from sun4u to sun4v, we have a Sun M5000 and are moving to a Fujitsu M10-4. I figured out how to make the flash archive work between architectures. Now I appear to be running into an... (2 Replies)
Discussion started by: kaledragule
2 Replies

10. Shell Programming and Scripting

Read file input in while loop does not work on AIX system

I'm working on Aix 6.1 and using ksh shell. The below works fine on Linux bash or ksh shell . while IFS= read -r dirpath ; do echo "Hi" done <<<"$var" However, any such while loop that reads the input from file or variable using <<< fails on Aix system with the below error: Below... (2 Replies)
Discussion started by: mohtashims
2 Replies
mxfe(7D)							      Devices								  mxfe(7D)

NAME
mxfe - MXFE Fast Ethernet device driver SYNOPSIS
/dev/mxfe* DESCRIPTION
The mxfe is a Solaris STREAMS hardware driver supporting the Data Link Provider Interface (dlpi(7P)) over the Macronix 98715 family (including the Lite-On PNIC-II) of Fast Ethernet controllers. DLPI SPECIFICATIONS
The mxfe driver supports both style 1 and style 2 modes of operation. Physical points of attachment (PPAs) are interpreted as the instance number of the mxfe controller as assigned by the operating system. The relevant fields returned as part of a DL_INFO_ACK response are: o Maximum SDU is 1500. o Minimum SDU is 0. o DLSAP address length is 8. o MAC type is DL_ETHER. o SAP length value is -2, meaning the physical address component is followed immediately by a 2-byte SAP component within the DLSAP address. o Service mode is DL_CLDLS. o Broadcast address value is the 6-byte Ethernet/IEEE broadcast address (ff:ff:ff:ff:ff:ff). If the SAP provided is zero, IEEE 802.3 mode is assumed and outbound frames will have the frame payload length written into the type field Likewise, inbound frames with a SAP between zero and 1500 are interpreted as IEEE 802.3 frames and delivered to streams that have bound to SAP zero (the 802.3 SAP). FILES
/dev/mxfe* Special character device /kernel/drv/mxfe 32-bit driver binary (x86). /kernel/drv/amd64/mxfe 64-bit ELF kernel module (x86). /kernel/drv/sparcv9/mxfe Driver binary (SPARC). ATTRIBUTES
See attributes(5) for a description of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Architecture |SPARC, x86 | +-----------------------------+-----------------------------+ |Availability |SUNWmxfe | +-----------------------------+-----------------------------+ SEE ALSO
ifconfig(1M), ndd(1M), attributes(5), dlpi(7P) IEEE 802.3 -- Institute of Electrical and Electronics Engineers, 2002 SunOS 5.11 31 Aug 2007 mxfe(7D)
All times are GMT -4. The time now is 10:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy