- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- seeking scripts to create filesystem
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
05-19-2004 05:15 AM
05-19-2004 05:15 AM
seeking scripts to create filesystem
anybody has the script I can use?
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2004 05:24 AM
05-19-2004 05:24 AM
Re: seeking scripts to create filesystem
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2004 05:30 AM
05-19-2004 05:30 AM
Re: seeking scripts to create filesystem
There are so many options and different things you can do that this isn't going to be something you can take from something else.
The general structure would be this:
while read -r aa bb cc dd
do
# lvcreate
# lvextend
# mkdir
# newfs
# mount
done < youffile
aa bb cc dd are speace delimited varibales in your file.
lvm is a do it once and use for a long time task. In general iets best to do it by hand.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2004 05:33 AM
05-19-2004 05:33 AM
Re: seeking scripts to create filesystem
# cat vgcreate.vg31iqa
mkdir /dev/vg31iqa
mknod /dev/vg31iqa/group c 64 0x1f0000
vgcreate -s 8 -p 128 /dev/vg31iqa `cat vg31iqa.devs`
# cat lvcreate.vg31iqa
lvcreate -L 512 -n lvlogA /dev/vg31iqa
mkfs -F vxfs -o version=3 /dev/vg31iqa/rlvlogA
lvcreate -L 512 -n lvmirrlogB /dev/vg31iqa
mkfs -F vxfs -o version=3 /dev/vg31iqa/rlvmirrlogB
lvcreate -L 7680 -n lvtemp /dev/vg31iqa
lvcreate -L 512 -n lvlogB /dev/vg31iqa
mkfs -F vxfs -o version=3 /dev/vg31iqa/rlvlogB
lvcreate -L 512 -n lvmirrlogA /dev/vg31iqa
mkfs -F vxfs -o version=3 /dev/vg31iqa/rlvmirrlogA
The vg31iqa.devs is just a list of devices:
/dev/dsk/c52t6d4
/dev/dsk/c54t6d4
/dev/dsk/c56t6d4
/dev/dsk/c58t6d4
/dev/dsk/c52t6d5
/dev/dsk/c54t6d5
/dev/dsk/c56t6d5
/dev/dsk/c58t6d5
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2004 05:47 AM
05-19-2004 05:47 AM
Re: seeking scripts to create filesystem
Even if we have a script, you'll have to customize it to suit your needs. It is best to prepare your own script with all the commands pvcreate / vgcreate / vgextend / lvcreate / lvextend in the script. It will be much more easy.
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2004 07:58 AM
05-19-2004 07:58 AM
Re: seeking scripts to create filesystem
I normally create the volume groups first and then make a config.file and use it as an input to my script. For ex., my config file is
This is only an example script I just wrote on the fly. It may or may not work. You will need to verify or improve on it.
#cat config.txt
vg01:lv1:2048:/mount1
vg02:lv2:4096:/mount2
vg03:lv3:1024:/mount3
#cat create_lvs.sh
while read line
do
VG=$(echo $line|awk '{FS=":";print $1}')
LV=$(echo $line|awk '{FS=":";print $2}'
SZ=$(echo $line|awk '{FS=":";print $3}'
MOUNT=$(echo $line|awk '{FS=":";print $4}'
echo Working on $LV in $VG
lvcreate -n $LV -L $SZ -r N $VG
newfs -F vxfs /dev/${VG}/r${LV}
mkdir -p $MOUNT
mount /dev/${VG}/${LV}$MOUNT
echo "/dev/${VG}/${LV} $MOUNT vxfs delaylog 0 2" >> /tmp/fstab.delta
done < config.txt
Once you are done, verify /tmp/fstab.delta file and append it to /etc/fstab.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2004 08:24 AM
05-19-2004 08:24 AM
Re: seeking scripts to create filesystem
Another thing to keep in mind, is doing the lvm commands manually keeps you sharp!
My scripts for lvm commands are mostly for DR recollect, and to recreate my vg's in a DR scenerio.