Operating System - HP-UX
1827372 Members
4896 Online
109963 Solutions
New Discussion

Creating RAW Filesystem Using Command

 
SOLVED
Go to solution
Amit Dixit_2
Regular Advisor

Creating RAW Filesystem Using Command

Hi,
How can I create raw filesystem through
command

Eg: I want to create filesystem mydb with
size 2 GB

What command will i give ?

Thanks
Amit
5 REPLIES 5
Jeroen Peereboom
Honored Contributor

Re: Creating RAW Filesystem Using Command

Amit,

a RAW FILESYSTEM? I hope I'm not still sleeping, but isn't that a contradictio in terminis?
Can you explain a little more?

What program / application is going to have access to it? Does it have a utility to 'format' the LV?

In general: Create an LV (lvcreate).

JP.
Michael Tully
Honored Contributor
Solution

Re: Creating RAW Filesystem Using Command

There is no such thing as a raw filesystem. There is logical volume which is raw, but once a filesystem has been placed on it, and mounted it becomes a cooked filesystem.

To create what I think your after assuming you have a volume group with some space.

e.g.
# lvcreate -n mylvol /dev/myvg
# lvextend -L 2048 /dev/myvg/mylvol
# newfs -F vxfs -o largefiles /dev/myvg/rmylvol
# mkdir /myfs
# mount /dev/myvg/mylvol /myfs

You wish to have it automatically mounted at the next reboot, add an entry like this to the /etc/fstab file.

/dev/myvg/mylvol /myfs vxfs rw,suid,delaylog,datainlog,largefiles 0 2

If you don't want to create it as a filesystem dont do the steps after 'lvextend'
Anyone for a Mutiny ?
Sยภเl Kย๓คг
Respected Contributor

Re: Creating RAW Filesystem Using Command

Can you tell what exactly you neede.
regrads
SK
Your imagination is the preview of your life's coming attractions
Amit Dixit_2
Regular Advisor

Re: Creating RAW Filesystem Using Command

HI,
Sorry for puting wrong question ..
I wanted to know how to create a LVM using
lvcreate and it is a raw with no fs want to
use it for INFORMIX database.

Thanks,
Amit
Bharat Katkar
Honored Contributor

Re: Creating RAW Filesystem Using Command

HI Amit,
Attempt to explain what you want:

1. Normally we create VG's first. SO suppose you have three disk's c0t1d0,d1,d3.
2. You create a Vg using:
# vgcreate vgname c0t1d0 c0t1d1...so on
3. Then you create LV's into it using:
# lvcreate
Now when you do lvcreate it doesn't have filesystem by default for that you have to do newfs. Now that you are not interested in file system but need raw device then don't do newfs and use the raw device created by lvcreate.
4. lvcreate create two file one is character device and other one is block device.
for e.g. /dev/vgxx/lvol1 and /dev/vgxx/rlvol1
So at this stage simpy go ahead and use /dev/vgxx/rlvol1 device file which you can treat it as Raw File System for your Informix Database.

Hope that helps.
REgards,
You need to know a lot to actually know how little you know