Operating System - HP-UX
1829737 Members
1550 Online
109992 Solutions
New Discussion

Raw file system in logical volume

 
M.sureshkumar
Regular Advisor

Raw file system in logical volume

Hi All,
How to create logical volume in hp unix system without file system i.e raw file system for some oracle based application.
Pls give me the correct command syntax for this one.

regards,
Suresh.
9 REPLIES 9
Robert-Jan Goossens
Honored Contributor

Re: Raw file system in logical volume

Hi,

The same as a normal filesystem, just skip the newfs command.

# lvcreate -L size_mb -n lvolx /dev/vgXX

Regards,
Robert-Jan
Ravi_8
Honored Contributor

Re: Raw file system in logical volume

Hi

Don't use newfs command while creating a file system.

#lvcreate -L /dev/vgxx

the lvol created now is an raw file system.
never give up
Peter Godron
Honored Contributor

Re: Raw file system in logical volume

Suresh,
if you then want to create dbs files for oracle you can use:
ln -s /dev/vgx/rlvolx /oradir/tablespace.dbs
Cem Tugrul
Esteemed Contributor

Re: Raw file system in logical volume

Suresh,

II) How to create a Logical Volume (LV) and mount the filesystem.
1) Create the Logical Volume (LV)
lvcreate -L 120 -n lvhome /dev/vg01
Note: this will create a logical volume of 120 meg.
2) Create the filesystem
newfs -F vxfs /dev/vg01/rlvhome
Note: to create an hfs filesystem change vxfs to
hfs in the previous command.
3) Mount the Logical Volume:
a) mkdir /home
b) mount /dev/vg01/lvhome /home

Just skip the step 2 and 3...

Good Luck,
Our greatest duty in this life is to help others. And please, if you can't
M.sureshkumar
Regular Advisor

Re: Raw file system in logical volume

HI Goossens,

How to remove the raw file system.

regards,
Suresh.
Robert-Jan Goossens
Honored Contributor

Re: Raw file system in logical volume

Hi Suresh,

-- creation of a raw logical volume --
# lvcreate -L size_mb -n lvolx /dev/vgXX

-- remove of a raw logical volume --
# lvremove -f /dev/vgXX/lvolx

Regards,
Robert-Jan
Henk Pilon
Trusted Contributor

Re: Raw file system in logical volume

Suresh,

Use the opposite command of lvcreate :

lvremove -f /dev/vg01/lvol1

But first make sure this is no longer in use by some database application.

Regards
Cem Tugrul
Esteemed Contributor

Re: Raw file system in logical volume

Hi Suresh,

V) How to remove a Logical Volume
Note: the following example is using the volume group vg01 and the
logical volume lvhome
1) Backup all user data
2) Umount the filesystem
umount /home
3) remove the Logical volume
lvremove /dev/vg01/lvhome

According to my previous mail;
just skip step 1&2 so the commad is;

lvremove /dev/vg01/lvhome

Using with "-f" option means;
Remove a logical volume without requiring user confirmation.

Good Luck,


Our greatest duty in this life is to help others. And please, if you can't
Trond Haugen
Honored Contributor

Re: Raw file system in logical volume

For lvols that will not contain a filesystem and be mounted I would reccomend using a non-standard name. This is to avoid that someone mistakes it for a lvol not in use.
E.g. lvcreate -n lvOra1 vg02

Regards,
Trond
Regards,
Trond Haugen
LinkedIn