- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- mknods with volume with another name besides vg0?
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
02-16-2005 02:08 AM
02-16-2005 02:08 AM
for i in `cat $source_dir/vg_nums`
do
cd /dev
rm -r $i
mkdir $i
mknod /dev/$i/group c 64 0x`grep $i $source_dir/vg_nums|cut -c 3-4`0000
echo
done
vg_nums contains the following: vg02 vg03 vg04.
But, if vg_nums contains EMC or something other than vg01-09, how would I use a script file to create the major number for these volume groups. I am using this as part of a DR recreation..
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2005 02:28 AM
02-16-2005 02:28 AM
Solution# cat vgnames
vg01 0x010000
vg02 0x020000
vgemc 0x030000
And then do the script like
while read VGNAME MINOR
do
cd /dev
rm -rf ${VGNAME}
mkdir ${VGNAME}
mknod /dev/${VGNAME}/group c 64 ${MINOR}
ll /dev/${VGNAME}/group
echo ""
done
This way it will work no matter what your VG names are.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2005 02:30 AM
02-16-2005 02:30 AM
Re: mknods with volume with another name besides vg0?
The very last line of the script should be:
done < vgnames
so that it can read in the vgnames file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2005 02:31 AM
02-16-2005 02:31 AM
Re: mknods with volume with another name besides vg0?
Usually it's called ox, but I didn't find it on hp-ux, so either You include a function for the conversion (better), or You have to ensure it's made available on every system.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2005 02:33 AM
02-16-2005 02:33 AM
Re: mknods with volume with another name besides vg0?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2005 02:37 AM
02-16-2005 02:37 AM