- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- pvcreate help
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-21-2003 07:26 AM
05-21-2003 07:26 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2003 07:28 AM
05-21-2003 07:28 AM
Re: pvcreate help
/dev/dsk/c#t#d#
/dev/dsk/c#t#d#
Put all the disks in a file called x in this example and execute the following
for i in `cat x`
do
pvcreate -f $i
done
enjoy.
RZ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2003 07:31 AM
05-21-2003 07:31 AM
Re: pvcreate help
How about:
# for DISK in `ls /dev/rdsk`
> do
> pvcreate -f /dev/rdsk/${DISK}
> done
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2003 07:31 AM
05-21-2003 07:31 AM
Re: pvcreate help
How about:
# for DISK in `ls /dev/rdsk`
> do
> pvcreate -f /dev/rdsk/${DISK}
> done
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2003 07:34 AM
05-21-2003 07:34 AM
Re: pvcreate help
RZ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2003 07:36 AM
05-21-2003 07:36 AM
Re: pvcreate help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2003 07:36 AM
05-21-2003 07:36 AM
Re: pvcreate help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2003 07:38 AM
05-21-2003 07:38 AM
Re: pvcreate help
for i in $(cat /tmp/diskfile)
do
export j=`echo $i |sed 's/rdsk/dsk/g'`
export LNCOUNT=`strings /etc/lvmtab |grep $j |wc -l`
if (( $LNCOUNT < 1 ))
then
pvcreate -f $i
fi
done
This way, you do not trash your boot disk or any other existing disk (Just a thought)
NOTE: Will not work on system that can view disks from other systems (SAN, FC10, etc)
Share and Enjoy! Ian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2003 07:38 AM
05-21-2003 07:38 AM
Re: pvcreate help
for i in $(ls /dev/rdsk)
Sorry, rehashed the thing halfway through. Ian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2003 07:38 AM
05-21-2003 07:38 AM
Re: pvcreate help
for i in $(ls /dev/rdsk)
Sorry, rehashed the thing halfway through. Ian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2003 07:39 AM
05-21-2003 07:39 AM
Re: pvcreate help
Ooops, you want to exclude your boot disk! Therefore, once you know its disk (e.g. c0t6d0) do:
#!/usr/bin/sh
for DISK in `ls dev/rdsk`
do
[ "${DISK}" != c0t6d0 ] && pvcreate -f /dev/rdsk/${DISK}
done
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2003 07:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2003 07:39 AM
05-21-2003 07:39 AM
Re: pvcreate help
Regards.
RZ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2003 07:41 AM
05-21-2003 07:41 AM
Re: pvcreate help
Regards,
RZ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2003 07:45 AM
05-21-2003 07:45 AM
Re: pvcreate help
not good at scripting but does this statement mean, "do NOT include disk c0t6d0" ???? Just need to verify.
All these disks will be on an EMC Sym with only one internal used for vg00.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2003 07:46 AM
05-21-2003 07:46 AM
Re: pvcreate help
# for i in 1 2 3
> do
> for j in 0 1 2 3 4
> do
> for k in 0 1 2
> do
> pvcreate -f /dev/rdsk/c${i}t${j}d${k}
> done
> done
> done
Any devices not found in the range will just come back with any error "couldn;t open physical volume", no harm done.
Just any idea ..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2003 07:47 AM
05-21-2003 07:47 AM
Re: pvcreate help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2003 07:48 AM
05-21-2003 07:48 AM
Re: pvcreate help
[ "${DISK}" != c0t6d0 ] && ppvcreate -f "/dev/rdsk/${DISK}"
...is shorthand for test the variable ${DISK} to be not equal c0t6d0. If that is true then execute the next statement, which in this case is 'pvcreate'.
See the man pages for 'test' for more information.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2003 08:06 AM
05-21-2003 08:06 AM
Re: pvcreate help
I am trying to assign points but the ITRC isn't working real well for me today. I will keep trying the rest of the day to get the points out to you guys. thanks again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2003 08:44 AM
05-21-2003 08:44 AM
Re: pvcreate help
cat emc.out | awk '{print "pvcreate -f " $1}' > pvemc.sh
chmod +x pvemc.sh
./pvemc.sh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2003 08:46 AM
05-21-2003 08:46 AM