Operating System - HP-UX
1823921 Members
2928 Online
109667 Solutions
New Discussion юеВ

how to find the raw logical volume in all HPUX

 
unixguy_1
Regular Advisor

how to find the raw logical volume in all HPUX

i want to create the raw logical volume, and how to find the raw logical volume in all HPUX servers.
5 REPLIES 5
Kapil Jha
Honored Contributor

Re: how to find the raw logical volume in all HPUX

lvcreate -L sizeMB -n lvolname /dev/vgname

/dev/vgname/rlvolname
is the raw LV.

Raw LV is like the LV which does not have any file system.

BR,
Kapil+
I am in this small bowl, I wane see the real world......
unixguy_1
Regular Advisor

Re: how to find the raw logical volume in all HPUX

ok ,but i want to find the raw logical volume through in command line.
is there any commands to find that raw logical volume in the servers.

please give the details.

Thanks in Advance

Re: how to find the raw logical volume in all HPUX

Well even logical volumes with filesystems still have a "raw" volume... But if you want to identify all logical volumes that don't contain a filesystem, something like this might work for you:

vgdisplay -v | grep "LV Name" | awk '{ print $3 }' | while read lv
do
dir=$(dirname $lv)
lvname=$(basename $lv)
echo "${dir}/r${lvname} : \c"
fstyp ${dir}/r${lvname}
done

On a little demo system I have here it produces this output:

/dev/vg00/rlvol1 : vxfs
/dev/vg00/rlvol2 : unknown_fstyp (no matches)
/dev/vg00/rlvol3 : vxfs
/dev/vg01/rlvol10 : vxfs


So the only "raw" volume here (by your definition, i.e. one without a filesystem) is /dev/vg00/rlvol2 - which in fact is my swap volume)

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Bijeesh
Respected Contributor

Re: how to find the raw logical volume in all HPUX

Hi,
I think there is no direct command which will list the raw LVs.
Compare your #vgdisplay -v vgname with the #bdf output .
Check is there any LV which is not mounted.
Confirm with the entries in fstab.
Bill Hassell
Honored Contributor

Re: how to find the raw logical volume in all HPUX

Every logical volume has two device files pointing to the same space, raw (or character type), and block (for filesystem management such as LVM or VxVM). There are two primary uses for a raw lvol, swap space and special programs such as Oracle, Sybase, Informix, etc which read and write to the raw volume. There is no HP-UX filesystem on these raw lvols and this make it difficult to identify whether the lvol is unused or is used by a database or some other special usage.

As a system administrator, you'll have to identify and special programs that use raw volmes. Since /etc/fstab is a common place to look for mounted filesystems, I usually put the raw volumes into the file as a comment:

## /dev/vg03/rlvol3 - used by Oracle db41

Another technique is to name the raw lvols with a meaningful (not lvol##):

## /dev/vg03/rora27 - used by Oracle db6

/etc/fstab will also document raw volumes used for swap space.


Bill Hassell, sysadmin