Sponsored Content
Operating Systems Linux Red Hat Create volume using LVM over 2 physical disks Post 302728263 by Scott on Wednesday 7th of November 2012 02:15:02 PM
Old 11-07-2012
Ah, OK. Think I've got it.

Code:
[root@RH631d ~]# fdisk /dev/sdd
--- created primary partition 1 --- now /dev/sdd1
--- created primary partition 2 --- now /dev/sdd2

[root@RH631d ~]# pvcreate /dev/sdd1
  Physical volume "/dev/sdd1" successfully created
[root@RH631d ~]# pvcreate /dev/sdd2
  Physical volume "/dev/sdd2" successfully created
[root@RH631d ~]# lvmdiskscan
  /dev/ramdisk       [       16.00 MB] 
  /dev/myvg01/mylv01 [       10.00 GB] 
  /dev/ram           [       16.00 MB] 
  /dev/sda1          [       47.03 MB] 
  /dev/myvg01/mylv02 [       10.00 GB] 
  /dev/ram2          [       16.00 MB] 
  /dev/root          [        3.90 GB] 
  /dev/ram3          [       16.00 MB] 
  /dev/sda3          [        1.97 GB] 
  /dev/ram4          [       16.00 MB] 
  /dev/ram5          [       16.00 MB] 
  /dev/sda5          [       14.08 GB] 
  /dev/ram6          [       16.00 MB] 
  /dev/ram7          [       16.00 MB] 
  /dev/ram8          [       16.00 MB] 
  /dev/ram9          [       16.00 MB] 
  /dev/ram10         [       16.00 MB] 
  /dev/ram11         [       16.00 MB] 
  /dev/ram12         [       16.00 MB] 
  /dev/ram13         [       16.00 MB] 
  /dev/ram14         [       16.00 MB] 
  /dev/ram15         [       16.00 MB] 
  /dev/sdb           [       50.00 GB] LVM physical volume
  /dev/sdc           [       50.00 GB] LVM physical volume
  /dev/sdd1          [        2.30 GB] LVM physical volume
  /dev/sdd2          [        1.53 GB] LVM physical volume
  3 disks
  19 partitions
  2 LVM physical volume whole disks
  2 LVM physical volumes
[root@RH631d ~]# vgcreate myvg02 /dev/sdd1 /dev/sdd2
  Volume group "myvg02" successfully created

That's not really what you asked, but it was useful for me Smilie

It looks to me like your sdb1 is using up the whole disk. That doesn't help you if you want sdb1 to be 110GB and sdb2 60GB. If sdb1 is using all the space, you can't create an sdb2 on that disk.

You never said what pvs showed. And while you're there, what does lvmdiskscan show? It's only for information, nothing else.

I would suggest, if you know that sdb1 is not being used, you remove it and repartition the disk with the sizes you want.

Over that, I would recommend this:
  • Remove "sdb1" using "fdisk" - actually I would remove the PV and rescan
  • Create a volume group called "oraclevg", or whatever it's for, using both sdb, and another for sdc - i.e. let LVM handle it.
  • Create logical volumes for u02 as 60 GB as whatever is left (100%FREE) from sdb
  • Create another logical volume using sdc for u03
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

physical volume and physical disk.

Hello, I need explanations about physical disks and physical volumes. What is the difference between these 2 things? In fact, i am trying to understand what the AIX lspv2command does. Thank you in advance. (2 Replies)
Discussion started by: VeroL
2 Replies

2. UNIX for Dummies Questions & Answers

Physical volume- no free physical partitions

I was in smit, checking on disc space, etc. and it appears that one of our physical volumes that is part of a large volume group, has no free physical partitions. The server is running AIX 5.1. What would be the advisable step to take in this instance? (9 Replies)
Discussion started by: markper
9 Replies

3. HP-UX

How Can I Create A Volume Group With Two Hard Disks On Hp-ux C-3750

Hello All, I Am A New Member To This Group. I Want To Know How Can We Create Single Volume Group Using 2 Hard Disks. As We Require More Data To Be Stored We Need To Add A Hard Disk,but I Have A Doubt Whether We Can Increase The Size Of A Logical Volume Mounted On A Volume Group By Adding A... (5 Replies)
Discussion started by: bala_mes
5 Replies

4. UNIX for Advanced & Expert Users

LVM - Extending Logical Volume within Volume Group

Hello, I have logical volume group of 50GB, in which I have 2 logical volumes, LogVol01 and LogVol02, both are of 10GB. If I extend LogVol01 further by 10GB, then it keeps the extended copy after logical volume 2. I want to know where it keeps this information Regards Himanshu (3 Replies)
Discussion started by: ghimanshu
3 Replies

5. AIX

Basic Filesystem / Physical Volume / Logical Volume Check

Hi! Can anyone help me on how I can do a basic check on the Unix filesystems / physical volumes and logical volumes? What items should I check, like where do I look at in smit? Or are there commands that I should execute? I need to do this as I was informed by IBM that there seems to be... (1 Reply)
Discussion started by: chipahoys
1 Replies

6. Linux

LVM (volume manager) and virtual disks

:eek: Hi guys, I'm pulling my hair out over this one. I am trying to set up a virtual server environment. ( I am using VirtualBox, but I think this is irrelevant to this problem.) I have downloaded a pre-packaged Linux virtual disk, with which I have successfully started a virtual instance of a... (4 Replies)
Discussion started by: otheus
4 Replies

7. AIX

How to determine the physical volume fo the disks

This is the report I got running the comand rptconf, but I would like to know what is the capacity of the disks installed into our server power 6 with AIX System Model: IBM,7778-23X Machine Serial Number: 1066D5A Processor Type: PowerPC_POWER6 Processor Implementation Mode: POWER 6... (6 Replies)
Discussion started by: cucosss
6 Replies

8. UNIX for Dummies Questions & Answers

Confusion Regarding Physical Volume,Volume Group,Logical Volume,Physical partition

Hi, I am new to unix. I am working on Red Hat Linux and side by side on AIX also. After reading the concepts of Storage, I am now really confused regarding the terminologies 1)Physical Volume 2)Volume Group 3)Logical Volume 4)Physical Partition Please help me to understand these concepts. (6 Replies)
Discussion started by: kashifsd17
6 Replies

9. AIX

Position of the logical volume on the physical volume

Hello everyone, I just read that while creating a logical volume(LV) we can choose the region of the physical volume (PV) in which the LV should be created. When I say region I mean: outer edge - outer middle - center - inner middle and inner edge. Can anyone help me understand the utility... (11 Replies)
Discussion started by: adilyos
11 Replies

10. Red Hat

Physical Volume Create Conundrum

I want to start by saying I already resolved my issue but I want to understand why I am seeing what I am seeing. I have a server with a RAID controller two 500GB drives and six 600GB drives. The two 500GB drives are mirrored and have the OS installed on them. The six 600GB they wanted set as... (4 Replies)
Discussion started by: scotbuff
4 Replies
VGEXTEND(8)                                                   System Manager's Manual                                                  VGEXTEND(8)

NAME
vgextend - add physical volumes to a volume group SYNOPSIS
vgextend [-A|--autobackup y|n] [-d|--debug] [-h|-?|--help] [--restoremissing] [-f|--force] [-t|--test] [-v|--verbose] [ PHYSICAL DEVICE OPTIONS ] VolumeGroupName PhysicalDevicePath [PhysicalDevicePath...] DESCRIPTION
vgextend allows you to add one or more initialized physical volumes ( see pvcreate(8) ) to an existing volume group to extend it in size. Moreover, it allows you to re-add a physical volume that has gone missing previously, due to a transient device failure, without re-ini- tialising it. Use vgextend --restoremissing to that effect. If PhysicalDevicePath was not previously configured for LVM with pvcreate (8), the device will be initialized with the same default values used with pvcreate. If non-default pvcreate values are are desired, they may be given on the commandline with the same options as pvcre- ate. See PHYSICAL DEVICE OPTIONS for available options. Note that the restore-related options such as --restorefile, --uuid, and --physi- calvolumesize are not available. If a restore operation is needed, use pvcreate (8) and vgcfgrestore (8). OPTIONS
See lvm for common options. PHYSICAL DEVICE OPTIONS
The following options are available for initializing physical devices in the volume group. These options are further described in the pvcreate man page. -f, --force -y, --yes -Z, --zero y|n --labelsector sector --metadatasize size [--metadataignorey|n] --pvmetadatacopies copies --dataalignment alignment --dataalignmentoffset alignment_offset Examples "vgextend vg00 /dev/sda4 /dev/sdn1" tries to extend the existing volume group "vg00" by the new physical volumes (see pvcreate(8) ) "/dev/sdn1" and /dev/sda4". SEE ALSO
lvm(8), vgcreate(8), vgreduce(8), pvcreate(8) Sistina Software UK LVM TOOLS 2.02.95(2) (2012-03-06) VGEXTEND(8)
All times are GMT -4. The time now is 01:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy