LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > AIX
User Name
Password
AIX This forum is for the discussion of IBM AIX.
eserver and other IBM related questions are also on topic.

Notices

Reply
 
Search this Thread
Old 10-01-2012, 01:58 PM   #1
walidsi
LQ Newbie
 
Registered: Oct 2012
Posts: 2

Rep: Reputation: Disabled
Shell Script - Need Help to Understand


I am new to Linux and I need to understand what the following script does in details please. I totally do not understand steps 5 to 8. Thanks a million!!


AIX Team:
2.) Login to server and switch to root

3.) Create a new lv

smitty lv -> Add a Logical Volume -> choose rootvg ; lv name: versatalib_lv ; lv type: jfs2 ; Number of
logical partitions: 1

4.) Create a new fs

smitty fs -> Add File Systems -> Enhanced Journaled File systems -> Add an Enhanced Journaled File System on a Previously Defined Logical Volume -> lv name choose: versatalib_lv ; mount point: /usr/Versata/VLSComponents/Classes/RDWWPRT.ear/RDWWPRT.war/WEB-INF/lib ; Mount automatically at system restart: yes ; Permissions: read/write

5.) mount the newly created filesystem to another directory (ex.: /tmp/versata_lib)

6.) Copy the content of the lib directory to the new filesystem

cp -R /usr/Versata/VLSComponents/Classes/RDWWPRT.ear/RDWWPRT.war/WEB-INF/lib /tmp/versata_lib

7.)smitty fs -> change file systems -> Enhanced Journaled File systems -> Change Characteristics of an Enhaced Journaled File systems : choose the newly created fs -> switch Permissions to read-only

8.) mount up /usr/Versata/VLSComponents/Classes/RDWWPRT.ear/RDWWPRT.war/WEB-INF/lib
 
Old 10-01-2012, 02:04 PM   #2
etech3
Senior Member
 
Registered: Jul 2009
Location: Virginia
Distribution: Debian Stable Testing Sid Slackware CentOS
Posts: 1,055
Blog Entries: 2

Rep: Reputation: 44
kinda looks like homework...

number five, you don't understand mount command?
 
Old 10-01-2012, 02:09 PM   #3
grail
Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 7,492

Rep: Reputation: 1892Reputation: 1892Reputation: 1892Reputation: 1892Reputation: 1892Reputation: 1892Reputation: 1892Reputation: 1892Reputation: 1892Reputation: 1892Reputation: 1892
I am with the previous poster, how is what you have presented a script?

You may need to be a lot clearer about your intention here?

Also, have you already done a man on each command to see what is being done?
 
Old 10-02-2012, 02:43 AM   #4
walidsi
LQ Newbie
 
Registered: Oct 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
It is not homework

It is just a question from someone who is not familiar with Linux and needs to understand what these commands will do to a server I own.

Sorry If I said it is a "script" when it isn't.

The "mount" concept is not applicable to Windows where all my experience is. That is why I do not understand what the different "mount" commands are ultimately trying to achieve.

What is the purpose of these steps? what are they trying to accomplish? and what is the purpose of steps 5 to 8?

Thanks for any help!
 
Old 10-02-2012, 03:55 AM   #5
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 4,658

Rep: Reputation: 1252Reputation: 1252Reputation: 1252Reputation: 1252Reputation: 1252Reputation: 1252Reputation: 1252Reputation: 1252Reputation: 1252
have you tried: man mount
or google on how to use and what is mount used for? (it is quite similar to windows' map drive function).
 
2 members found this post helpful.
Old 10-02-2012, 04:30 AM   #6
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
If you want to learn Linux, I don't understand trying to slog thru an exercise that starts with "AIX team". More generally, the stuff you list---if it is not something like a class assignment---does not seem like a good starting point.

I suggest backing up a few steps---tell us what kinds of things you already know---eg are you comfortable with moving around in the directory system, creating directories, copying and moving files, etc.?
 
1 members found this post helpful.
Old 10-11-2012, 03:28 PM   #7
crabboy
Moderator
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,823

Rep: Reputation: 120Reputation: 120
Quote:
5.) mount the newly created filesystem to another directory (ex.: /tmp/versata_lib)

6.) Copy the content of the lib directory to the new filesystem

cp -R /usr/Versata/VLSComponents/Classes/RDWWPRT.ear/RDWWPRT.war/WEB-INF/lib /tmp/versata_lib

7.)smitty fs -> change file systems -> Enhanced Journaled File systems -> Change Characteristics of an Enhaced Journaled File systems : choose the newly created fs -> switch Permissions to read-only

8.) mount up /usr/Versata/VLSComponents/Classes/RDWWPRT.ear/RDWWPRT.war/WEB-INF/lib
It looks to me like this is putting the lib directory on a separate partition, and from the looks of step 8, it is probably for security reasons, so that the lib folder is never modified.

5. Creating a new partition, mount it to a temporary location
6. Copy the contents of the existing lib folder to the new partition, you'd probably want to add the (p)reserve flag to retain the existing file time stamps.
7. Change the filesystem type to read-only on the new partition. This prevents anyone from modifying the files.
8. mount the new partition over the existing lib directory for this web application. The old lib directory will still continue to consume disk space if the contents are not removed prior to mounting. (but that may be ok).
 
  


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
how to understand this shell code? nillgump Linux From Scratch 1 10-10-2008 04:19 AM
Help needed to understand a bit of shell script yogeshm02 Programming 8 02-03-2008 12:05 PM
Help me understand this shell script dwhitney67 Linux - Software 2 10-18-2007 09:02 AM
understand variable type in shell script qrshat Programming 5 09-09-2006 02:12 AM


All times are GMT -5. The time now is 09:41 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