Check disks not in a volume group?

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Check disks not in a volume group?
# 1  
Old 02-24-2011
Check disks not in a volume group?

Hello,

How can I obtain a lists of disks with their size (anytype: SAN LUNs, internal disks, etc.) attached to the system and not being extended inside a volume group?

The purpose of this list is to be part of a function of a script that I'm doing in order to resize filesystems and in the case the vg attached to the lvol attached to the filesystem has no free PE's available, I want to display the list of disks susceptible of not being used (not in an VG).

So how can I obtain this list?

The other question is if it is possible that a filesystem type is vxfs and if possible how do I know if that filesystem type can be resized online.

Thank you.
# 2  
Old 02-24-2011
lspv

Hello.

The lspv command shows all disks in use. Also at clustering.
# 3  
Old 02-24-2011
But the lspv wasn't an AIX command? I need native RHEL commands to solve my questions.

Thank you anyway!
# 4  
Old 02-24-2011
You can get a list of all initialized PVs known to the system (regardless of being used) by running pvdisplay or pvs.
# 5  
Old 02-24-2011
pludi I know that
Code:
pvdisplay

or
Code:
pvs

will display all disks that have been initialized via pvcreate and they can be part/or not of an VG.

But I'm also asking how can I list disks that are not initialized via pvcreate and, in consequence, not inside any volume group.

Can I get this information via
Code:
fdisk -l

and checking if the System column there is no 'Linux LVM'?

My first post also asked about the vxfs question.

Thank you.

Last edited by asanchez; 02-24-2011 at 12:56 PM..
# 6  
Old 02-24-2011
Quote:
But I'm also asking how can I list disks that are not initialized via pvcreate and, in consequence, not inside any volume group.

My first post also asked about the vxfs question.
You need to write a script to do this. First gather information about all your disks and partitions into a list. Then remove swap devices (or partitions) from this list. Then remove devices (or partitions) which are currently assigned to LVM or VxFS.
# 7  
Old 02-24-2011
Quote:
Quote:
But I'm also asking how can I list disks that are not initialized via pvcreate and, in consequence, not inside any volume group.

My first post also asked about the vxfs question.
You need to write a script to do this. First gather information about all your disks and partitions into a list. Then remove swap devices (or partitions) from this list. Then remove devices (or partitions) which are currently assigned to LVM or VxFS.
I know that I have to write a script, that's my goal.

To do what you mention, is that correct?:

Code:
fdisk -l | grep -v "swap" | grep -v "Linux LVM" | grep -vi "vxfs" | grep -v "*" | grep "Linux"

fdisk -l -> list all disk partitions
grep -v "swap" -> remove swap partitions from the list
grep -v "Linux LVM" -> remove partitions that have been "pvcreated" and "vgextended" from the list?!?!
grep -vi "vxfs" -> remove partitions that have been englobed inside VxVM ?!?!
grep -v "*" -> remove boot partitions
grep "Linux" -> remove rest of partition types not being Linux like from the list. For example with this I ensure removing "Extended" like partitions that cannot be "pvcreated"

And what about being aware of /dev/dm-X type partitions? I need it to be generic enough to list:

"Disk partitions/entire disks of any type capable of doing to them "pvcreate" + "vgextend" "

Thank you again

Last edited by asanchez; 02-24-2011 at 01:34 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

No space in volume group. How to create a file system using existing logical volume

Hello Guys, I want to create a file system dedicated for an application installation. But there is no space in volume group to create a new logical volume. There is enough space in other logical volume which is being mounted on /var. I know we can use that logical volume and create a virtual... (2 Replies)
Discussion started by: vamshigvk475
2 Replies

2. AIX

Check status of a volume group

Hi huys, Sorry for my bad english, i'm french :o . I've got a little question : is there a way to check status of a VG on aix 6.1 ? I want to know if a VG is locked or not... I can do a "lsvg -Ll rootvg" for example, but if this VG is already locked, the process waits without gives me the... (2 Replies)
Discussion started by: akorx
2 Replies

3. UNIX for Dummies Questions & Answers

How to create a volume group, logical volume group and file system?

hi, I want to create a volume group of 200 GB and then create different file systems on that. please help me out. Its becomes confusing when the PP calculating PP. I don't understand this concept. (2 Replies)
Discussion started by: kamaldev
2 Replies

4. 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

5. AIX

Logical volume name conflict in two volume group

Hello, I am a french computer technician, and i speak English just a little. On Aix 5.3, I encounter a name conflict logical volume on two volume group. The first volume lvnode01 is OK in rootvg and mounted. It is also consistent in the ODM root # lsvg -l rootvg |grep lvnode01 ... (10 Replies)
Discussion started by: dantares
10 Replies

6. AIX

Moving a Logical Volume from one Volume Group to Another

Does anyone have any simple methods for moving a current logical volume from one volume group to another? I do not wish to move the data from one physical volume to another. Basically, I want to "relink" the logical volume to exist in a different volume group. Any ideas? (2 Replies)
Discussion started by: krisw
2 Replies

7. AIX

Check quorum for volume group

Hi all, I would like to ensure that a volume group has an effective quorum setting of 1 (or off). I know you can change the quorum setting using the chvg -Q command but want to know if the setting has been changed before the vg was varied on or a reboot. In other words how can I ensure that... (3 Replies)
Discussion started by: backslash
3 Replies

8. 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

9. 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

10. UNIX for Advanced & Expert Users

How to check size of Volume Group

Did anyone knows how to check size/usage of a Volume Group in AIX 4.3.3? (4 Replies)
Discussion started by: s_aamir
4 Replies
Login or Register to Ask a Question