- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- REquired script for creating Mount Point
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2014 09:59 PM
06-26-2014 09:59 PM
REquired script for creating Mount Point
Dear Expert:
i was assigned 5 luns from the storage team. And i want to create the mount points for the same.
As we are testing the thigs in the devlopment servers, frequently we require to create the mountpoints for the testing purposes ( the count is 60 to 70 / day).In that concern , if i get one script wihch will creat the PV ,create the dir fot the VG ,the device file from the mknod command ,create the VG ,LV ,file system & also mount the file system on the respective mounts wichi will creat an entry in te /etc/fstab file.
I was asking this cause daily we have to do this on the regular basis ,wonderign if we can do this through script automation.
Request you to please help me out .
Below are the details :
LUN Mount
1)/dev/rdisk/disk10 : /oracle/DIT/sapdata1
2) /dev/rdisk/disk11: /oracle/DIT/sapdata2
3)/dev/rdisk/disk12 : /oracle/DIT/sapdata3
4)/dev/rdisk/disk13: /oraclle/DIT/sapdata4
5)/dev/rdisk/disk14: /oracle/DIT/sapdata5
Request you to please suggest on this.
Thanks & have a great day ahead.
Regards,
Vishal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2014 06:45 PM
06-27-2014 06:45 PM
Re: REquired script for creating Mount Point
There isn't enough detail.
Do you want 1 LUN in 1 VG with 1 mountpoint?
Or multiple LUNs in several VGs with several mountpoints?
Should the script be configurable on the command line (ie, VGname or VGcount, LUN list, lvol list and mounpoint list?
Should the script also remove mountpoints and VGs?
Need a lot more information...
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2014 01:00 AM
06-28-2014 01:00 AM
Re: REquired script for creating Mount Point
Hello Billsir,
Sorry that i didnt provide the details.Please find the below details for your reference.
1)Do you want 1 LUN in 1 VG with 1 mountpoint? Yes it should be 1 lun for 1 mountpoint.
2)Should the script be configurable on the command line (ie, VGname or VGcount, LUN list, lvol list and mounpoint list? -Yes
3) hould the script also remove mountpoints and VGs? -No as we have no fix time or duration whent the R&D guys will finifh their testing ,once we recieve the mail accordingly we have to remove it.
Please suggest me if i need to provide any additional information.
Thanks ,
Vishal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2014 09:02 PM
06-29-2014 09:02 PM
Re: REquired script for creating Mount Point
Waiting for you reply.....
With regards,
Vishal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2014 11:02 PM
07-01-2014 11:02 PM
Re: REquired script for creating Mount Point
Please provide me the solution on this.As this was the urgent requirement.Help will be much more appreciable.
Thanks & regards,
Vishal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2014 04:30 AM - edited 07-02-2014 04:33 AM
07-02-2014 04:30 AM - edited 07-02-2014 04:33 AM
Re: REquired script for creating Mount Point
Here is the script.
Usage: makevg.sh [-q] [-x] VGname LVOLname MNTpoint PVname [ more PVnames ] where: -q = quiet mode - default is to echo each command -x = run the commands - default is preview only VGname = name of VG (ie, vg03, vgora4, etc) LVOLname = lvol name (ie, lvol1, mylvol32, etc) MNTpoint = mount point name (ie, /test1, /mytestlvol, etc) PVname = physical volume or LUN (ie, /dev/disk/disk23, /dev/dsk/c2t3d0, etc) more PVs can be added to the end of the list makevg.sh will create a VG with one lvol and mount it to the name mountpoint. It will use the PVs or LUNs specified. It will also add the lvol and mounpoint to /etc/fstab. The default is preview only. Add -x to run the commands.
So a typical run (with no options) looks like this:
# makevg.sh vg19 lvol99 /mnt2a /dev/rdsk/c17t15d0 makevg.sh verbose = true preview = true VGname = vg19 LVname = lvol99 MNTpoint = /mnt2a PVnames = /dev/rdsk/c17t15d Commands (preview): pvcreate -f /dev/rdsk/c17t15d0 mkdir /dev/vg19 mknod /dev/vg19/group c 64 0x010000 vgcreate -s 8 vg19 /dev/dsk/c17t15d0 vgchange -a y vg19 lvcreate -l (preview) -n lvol99 vg19 newfs -F vxfs -o largefiles /dev/vg19/rlvol99 mkdir -p /mnt2a echo /dev/vg19/lvol99 /mnt2a vxfs delaylog 0 3 >> /etc/fstab mount /dev/vg19/lvol99 /mnt2a makevg.sh done.
Without the -x option, you get a preview of all the commands that will be run.
This will handle any size disk LUN or optionally, multiple LUNs. The lvol will be as large as the entire VG.
Just a note about the Community Forums. All of us are answering questions in our spare time. An urgent request should not be posted here but instead, you should hire a consultant to complete the task. We all have regular jobs and answer questions when time permits. This script could have been less than 20 lines of code with no error checking, but you probably don't have trained staff that will be very careful not to erase active disk LUNs due to a spelling error (or other mistakes). So this script has extensive error checking and reporting, including the preview mode where you can see what is being done. It is well documented and hopefully you and your staff will learn some scripting techniques from the code.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2014 02:25 AM
07-03-2014 02:25 AM
Re: REquired script for creating Mount Point
Thanks for the help provided by you.
Yes next time i will be cautious while posting any comments.
Sorry for the indiscipline by me.
Thanks & have a great day ahead.
Regards
Vishal