- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to script to round robin LV onto separate disk...
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
Forums
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
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
07-06-2005 07:58 AM
07-06-2005 07:58 AM
How do I do that.?
LV's- /dev/vgprod/app1 200mb
/dev/vgprod/app2 1000mb
/dev/vgprod/app3 6000mb
...
(about 50 lvs)
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2005 08:26 AM
07-06-2005 08:26 AM
Solutionapp1 200
app2 1000
app3 6000
app4 500
app5 600
app6 700
then create the following script to read in the sizes and create the VG's
#! /bin/ksh
DSKDEV[1]="/dev/dsk/c8t0d0"
DSKDEV[2]="/dev/dsk/c8t0d1"
DSKDEV[3]="/dev/dsk/c8t0d3"
CURDSK=1
cat LV.dat |awk '{print $1, $2}' |while read LV SIZE ;do
lvcreate -n $LV vgprod
lvextend -L $SIZE /dev/vgprod/$LV ${DSKDEV[$CURDSK]}
newfs -F vxfs /dev/vgprod/r$LV
(( CURDSK = CURDSK + 1 ))
[ $CURDSK -eq 4 ] && CURDSK=1
done
You may also want to add lines to echo the proper lines to the fstab file in the loop as well as create the mount points too.
Also, be sure that the 3 disks have enough space on them to contain the space configuration you've laid out in LV.dat.
-Alan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2005 08:33 AM
07-06-2005 08:33 AM
Re: How to script to round robin LV onto separate disks ?
Thanks a bunch.Allen 10pt answer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2005 08:36 AM
07-06-2005 08:36 AM
Re: How to script to round robin LV onto separate disks ?
Although above steps are perfect for what you are trying to achive but it will be better for performance that you put these LV's stripped across all disks. This can be achived by using -D option in lvcreate.
HTH,
Devender
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2005 12:53 AM
07-07-2005 12:53 AM
Re: How to script to round robin LV onto separate disks ?
These are actually SAN EMC disks and so I assume striping is done at the h/w level. I dont have to do it. I just want to put lvs in 3 separate disks for DBA's satisfaction.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2005 02:06 AM
07-07-2005 02:06 AM
Re: How to script to round robin LV onto separate disks ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2005 03:50 AM
07-12-2005 03:50 AM
Re: How to script to round robin LV onto separate disks ?
your solution is a time saver script. Will save that script for further use. THANKS.
It works.