- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- LVM cookbook
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-15-2004 06:24 PM
02-15-2004 06:24 PM
I have used SAM and a number of commands like pvcreate, vgcreate, lvcreate etc. etc. but cannot get the logical volume created.
Is there any simple step by step guide or information that could assist me here?
Many thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2004 06:32 PM
02-15-2004 06:32 PM
Solution# ioscan -fnC disk
Class I H/W Path Driver S/W State H/W Type Description
==========================================================================
disk 0 1/0/0/3/0.6.0 sdisk CLAIMED DEVICE HP 73.4GATLAS10K3_73_SCA
/dev/dsk/c0t6d0 /dev/rdsk/c0t6d0
disk 1 1/0/0/3/1.2.0 sdisk CLAIMED DEVICE HP DVD-ROM 305
/dev/dsk/c1t2d0 /dev/rdsk/c1t2d0
disk 2 1/0/1/0/0/1/1.6.0 sdisk CLAIMED DEVICE HP 73.4GATLAS10K3_73_SCA
/dev/dsk/c3t6d0 /dev/rdsk/c3t6d0
To view the existing Volume Groups in the system
# strings /etc/lvmtab
/dev/vg00
/dev/dsk/c0t6d0
Select a free disk and create physical volume
# pvcreate /dev/rdsk/c3t6d0
Physical volume "/dev/rdsk/c3t6d0" has been successfully created.
Create a directory and group file for the VG (make sure the minor number is unique by checking other VGs)
# cd /dev
# ll /dev/vg00/group
crw-r----- 1 root sys 64 0x000000 Feb 12 20:37 /dev/vg00/group
#
# mkdir vg01
# cd vg01
# mknod group c 64 0x010000
Create a Volume Group
# vgcreate vg01 /dev/dsk/c3t6d0
Increased the number of physical extents per physical volume to 17501.
Volume group "/dev/vg01" has been successfully created.
Volume Group configuration for /dev/vg01 has been saved in /etc/lvmconf/vg01.conf
To review the VG that you have created
# vgdisplay vg01
--- Volume groups ---
VG Name /dev/vg01
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 0
Open LV 0
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 17501
VGDA 2
PE Size (Mbytes) 4
Total PE 17499
Alloc PE 0
Free PE 17499
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
Create a logical volume and filesystem
# lvcreate -l 17499 vg01
Logical volume "/dev/vg01/lvol1" has been successfully created with
character device "/dev/vg01/rlvol1".
Logical volume "/dev/vg01/lvol1" has been successfully extended.
Volume Group configuration for /dev/vg01 has been saved in /etc/lvmconf/vg01.conf
# newfs /dev/vg01/rlvol1
newfs: /etc/default/fs is used for determining the file system type
version 4 layout
71675904 sectors, 8959488 blocks of size 8192, log size 256 blocks
unlimited inodes, largefiles not supported
8959488 data blocks, 8958864 free data blocks
274 allocation units of 32768 blocks, 32768 data blocks
last allocation unit has 13824 data blocks
Mount the filesystem and make it persistent by adding an entry to /etc/fstab
# mkdir /vg01
# mount /dev/vg01/lvol1 /vg01
# bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 67158016 1793808 64854248 3% /
/dev/vg00/lvol1 298928 28376 240656 11% /stand
/dev/vg01/lvol1 71675904 4472 71111512 0% /vg01
#
# cat /etc/fstab
# System /etc/fstab file. Static information about the file systems
# See fstab(4) and sam(1M) for further details on configuring devices.
/dev/vg00/lvol3 / vxfs delaylog 0 1
/dev/vg00/lvol1 /stand hfs defaults 0 1
/dev/vg01/lvol1 /vg01 vxfs defaults 0 1
#
-Karthik S S
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2004 06:37 PM
02-15-2004 06:37 PM
Re: LVM cookbook
In general, the steps are as folloes.
1) Make disk available to lvm
"pvcreate /dev/rdsk/cXtXdX
2a)Create a volume group (assuming you are not adding this to an existing cvolume group)
"mkdir /dev/vgnewvg" (call it what you fancy)
"mknod group c 64 0x010000" (that last number needs to be unique for your system/cluster where ls /dev/vg*/group will show you what you already have)
"vgcreate vgnewvg /dev/dsk/cXtXdX"
2b) If adding disk to existing volume group
"vgextend vgexisting /dev/dsk/cXtXdX"
3) Create a logical volume on it
"lvcreate -LXXX /dev/vgnewvg" (XXX is the size in megabytes)
4) Make a filesystem on your shiny neew logical volume
"newfs -F vxfs /dev/vgnewvg/rlvol1"
5) Mount it somewhere
"mount /dev/vgnewvg/lvol1 /somedirectory"
6) Add the above to /etc/fstab
7) Make a cup of coffee and get all your managers to pat you on the back for a job well done (yeah right!)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2004 08:07 PM
02-15-2004 08:07 PM
Re: LVM cookbook
http://strc.comet.ucar.edu/unix/right.htm
http://strc.comet.ucar.edu/unix/textfiles/device_manipulation_hpux1020.htm
Will help
Steve Steel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2004 09:11 PM
02-15-2004 09:11 PM
Re: LVM cookbook
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2004 02:47 PM
02-17-2004 02:47 PM
Re: LVM cookbook
The problem was that the disk was faulty. Once I used a new disk, it all worked easily, and I found SAM the easiest way to create the new logical volume and volume group etc.