- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: mounting file systems
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
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
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
тАО08-21-2009 12:42 PM
тАО08-21-2009 12:42 PM
i am doing a DR activity. and i have built 80 lvols in it. Now, i have to mount all of them using
mount -F vxfs
Please help me in writing a script doing this for all 80 lvols.
lvols have their specific names like /dev/vg01/dbdata, /dev/vg01/dbhome, /dev/vg02/oracle etc.
and mount points also has the names like /home1, /home2, /data1, /tempdbdev, etc. Just writing these as you won't consider the lv names as standard like lvol1,2,3, and so on.
i have noted down all the LVs in a file and tried making for loop, but no luck.
Please suggest.
Solved! Go to Solution.
- Tags:
- mount
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2009 02:22 PM
тАО08-21-2009 02:22 PM
Solution# cat mountdata
/dev/vg01/dbdata:/home1
/dev/vg01/dbhome:/data1
/dev/vg02/oracle:/temp
# for i in `cat mountdata`
> do
> lvol=$(echo $i|cut -d":" -f1)
> mpoint=$(echo $i|cut -d":" -f2)
> echo mount -F vxfs $lvol $mpoint
> done
mount -F vxfs /dev/vg01/dbdata /home1
mount -F vxfs /dev/vg01/dbhome /data1
mount -F vxfs /dev/vg02/oracle /temp
#
Please remove the echo command once you review the output.
Regards
Vijay Chinnasamy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2009 02:24 PM
тАО08-21-2009 02:24 PM
Re: mounting file systems
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2009 02:41 PM
тАО08-21-2009 02:41 PM
Re: mounting file systems
You have two choices. The first is to add your required mounts to '/etc/fstab' and to simply issue:
# mount -a
This is the simplest way and means that any time you reboot, everything will be automatically mounted again.
The second choice is to create a text file with the logical volume name followed by whitespace followed by the mountpoint, like:
# cat ./mountpts
/dev/vg01/dbdata /data1
/dev/vg01/dbhome /home1
/dev/vg02/oracle /home2
The script to use is simply:
# cat ./mymounts
#!/usr/bin/sh
while read MNTPT DIR X
do
mount ${MNTPT} ${DIR}
done < ./mymounts
...
Add any mount options you need to the 'mount' command.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2009 02:50 PM
тАО08-21-2009 02:50 PM
Re: mounting file systems
I got the solution from your replies. Closing the thread.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2009 05:15 PM
тАО08-21-2009 05:15 PM