Operating System - HP-UX
1833777 Members
2163 Online
110063 Solutions
New Discussion

Re: Creating raw filesystems

 
joe_91
Super Advisor

Creating raw filesystems

Team:

We have a requirement to create raw slices for oracle. I quite do not understand what that means and how you would create it. They want it to be created on vg02. Please let me know how to do it.

Thanks
Joe.
7 REPLIES 7
Sridhar Bhaskarla
Honored Contributor

Re: Creating raw filesystems

Hi Joe,

Create logical volumes with the normal procedure. Don't run newfs on them. Change permissions /dev/vg02/*lvol* to them so that they can access rlvol*.

Ex.,

#lvcreate -n lvol1 -L size_in_mb vg02

(no newfs here)

#chown oracle:dba /dev/vg02/*lvol*

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Iona B. Marley
New Member

Re: Creating raw filesystems

At our site we do one addition step and that is to link the raw partition to some 'logical' directory:

ln -s /dev/vg02/rFile /oracle/InstanceName/newdirname
Your never to old to have a happy childhood.
Jeff Schussele
Honored Contributor

Re: Creating raw filesystems

Hi Joe,

Creating a raw volume is identical to creating a cooked volume with the exception of leaving out the step of creating the FS.

pvcreate (-f) /dev/rdsk/cxtydz
mkdir /dev/vg02
mknod group -c 64 0x020000
vgcreate vg02 /dev/dsk/cxtydz
lvcreate -l #_extents -n lvol_name vg02
mkdir /mnt_poimt
mount /dev/vg02/rlvol_name /mnt_point


Note there's NO newfs command in there and that you mount the rlvol_name & not the cooked LV.
Also I'd recommend you put a commented note in /etc/fstab to indicate the existence of this raw volume.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Tim D Fulford
Honored Contributor

Re: Creating raw filesystems

1 - raw filesystem is an contradiction in terms!!! A raw device is one that is a character device, as seen from ls -l.

cd /dev/vg02
ls -l
crw-rw-r-- root sys 64 0x020000 group
brw-rw-r-- root sys 64 0x020001 lvol1
crw-rw-r-- root sys 64 0x020001 rlvol1

rlvol1 - raw or character device
lvol1 - block device

That said..... you do not need to "cook" (newfs or fsadm) the logical volume, just point the DB at the device (e.g. /dev/vg02/rlvol1). However I would use a layer of indirection so that the database is more "portable" (you may need to recover it onto another computer)

as an example
cd /opt/oracle/databaselinks/
ln -s /dev/vg02/rlvol1

I would choose something meaningfile for name like dbsdata1_chk1.

You will probably need to change the permissions of the device say
rw-rw---- oracle oracle
chmod 660 /dev/vg02/rlvol1
chown oracle:oracle /dev/vg02/rlvol1

good luck

Tim

-
Wodisch
Honored Contributor

Re: Creating raw filesystems

Hi,

like the other already said: "raw" means NO filesystem, no data structure known to UN*X.
And as the oracle DBA your just use the device file, where you usually would enter the data-file-name to be created.
But you have to be pretty careful with the size, as oracle needs a few MBs at the start of the raw-device for itself, so a 100MB raw-device would NOT give you 100MB of space...

FWIW,
Wodisch
suki
Frequent Advisor

Re: Creating raw filesystems

Hi Jeff,
If I am not wrong I think we cannot mount the raw file system. So the last 2 command what u have mentioned will not be applicable for raw FS. We can mount only if we have any FS(used by newfs) on the logical volume.
Correct me if there is any way to mount the Raw FS using mount command.


- Suki
Anil C. Sedha
Trusted Contributor

Re: Creating raw filesystems

Joe,

Follow what Sridhar and Jeff have mentioned.

I also have raw filesystems for oracle on my servers.

For raw filesystems you don't have to format the filesystem hence, you don't run the newfs command.

Just do an lvcreate and leave it at that.

Regards,
Anil
If you need to learn, now is the best opportunity