HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: explanations wanted: raw devices, mapping, siz...
Operating System - HP-UX
1825759
Members
2216
Online
109687
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2000 11:10 AM
10-10-2000 11:10 AM
OK, once again I'll ask one of those "there are no stupid questions" which we all know is false...but speaking as a dba who is also acting sysadmin...
I have created several raw dev for our database, but from a high level and technical perspective, what is a raw device, how does unix treat it, how is it different than normal disk/file space the OS manages?
When I execute a bdf or du, the raw devices are not listed. How do I know it's true size except to use the database tools or to subtract the disk size from the total used from SAM?
Last, when I need to increase the database spaces that map to a specific raw device, and the db engine wants contigious space, how do I know it is contigious?
tia
p.s. I've posted a couple times and the responses have been great, I regret to say that every other time I have been unable to assign points. Sorry 'bout that.
I have created several raw dev for our database, but from a high level and technical perspective, what is a raw device, how does unix treat it, how is it different than normal disk/file space the OS manages?
When I execute a bdf or du, the raw devices are not listed. How do I know it's true size except to use the database tools or to subtract the disk size from the total used from SAM?
Last, when I need to increase the database spaces that map to a specific raw device, and the db engine wants contigious space, how do I know it is contigious?
tia
p.s. I've posted a couple times and the responses have been great, I regret to say that every other time I have been unable to assign points. Sorry 'bout that.
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2000 11:35 AM
10-10-2000 11:35 AM
Re: explanations wanted: raw devices, mapping, size
Doug:
The term "raw" logical volume refers to a logical volume that is NOT used to store file system or swap space data. Typically, it is used by a database manager, to store its data and overhead structures.
Device files, represent the PHYSICAL device
(the actual disk drive space, in the case of a logical volume). There are two types of device files: block or character (also known as raw). The block file, in the case of logical volume device files, is used to mount and unmount physical volumes, while the character (raw) device file is used to
create physical volumes.
Using the /dev/dsk/cXtXdX type device files will require that the entire disk be used as a filesystem or as raw data. if pvcreate(1M) is mistakenly used on the disk to prepare for LVM usage, then the filesystem or data that was present on the disk will be corrupted. The largest filesystem or raw database space that can be created is limited to the size of the physical disk.
Choosing to use the /dev/vgXX/lvolX or /dev/vgXX/rlvolX style device files assumes that the LVM structure is in place for this disk partition that is being allocated. This format does not require one to use the entire physical disk nor does it limit one to using just one disk per filesystem or raw data space.
There is no easy way to convert a ?Whole Disk? into LVM, or vice-versa, without wiping
it clean and starting anew.
...JRF...
The term "raw" logical volume refers to a logical volume that is NOT used to store file system or swap space data. Typically, it is used by a database manager, to store its data and overhead structures.
Device files, represent the PHYSICAL device
(the actual disk drive space, in the case of a logical volume). There are two types of device files: block or character (also known as raw). The block file, in the case of logical volume device files, is used to mount and unmount physical volumes, while the character (raw) device file is used to
create physical volumes.
Using the /dev/dsk/cXtXdX type device files will require that the entire disk be used as a filesystem or as raw data. if pvcreate(1M) is mistakenly used on the disk to prepare for LVM usage, then the filesystem or data that was present on the disk will be corrupted. The largest filesystem or raw database space that can be created is limited to the size of the physical disk.
Choosing to use the /dev/vgXX/lvolX or /dev/vgXX/rlvolX style device files assumes that the LVM structure is in place for this disk partition that is being allocated. This format does not require one to use the entire physical disk nor does it limit one to using just one disk per filesystem or raw data space.
There is no easy way to convert a ?Whole Disk? into LVM, or vice-versa, without wiping
it clean and starting anew.
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2000 11:45 AM
10-10-2000 11:45 AM
Re: explanations wanted: raw devices, mapping, size
I teach inhouse class on the Informix database. The first question that is always askes is 'What is RAW space'. Basically RAW space is a logical volume that is not being used by UNIX. It's like the perverbial they. You know they are there but you can not see them.
By not assigning the LV to a file system or swap space you have RAW space. As such you can not see the space with any UNIX tools except lvdisplay. To find the size of the RAW space use lvdisplay and multiply the LV Size by 1024. This will give you the number of Kbytes.
For a LV to be contigious you will need to lvcreate or lvmodify the LV with these switches.
-s y -C y
This will force the LV and its' mirrors to be contigious. This way if you need to inlarge the space the space will only inlarge if contigious space is available.
Special Note: Being that the operation system is controling the mapping of a LV you can usually have a noncontigious LV that looks contigious to the database. This way I have been able to stripe a RAW space over several physical volumes and use it as a single dbspace for the database. I know this is true for Informix. I do not know about Oracle or other databases.
By not assigning the LV to a file system or swap space you have RAW space. As such you can not see the space with any UNIX tools except lvdisplay. To find the size of the RAW space use lvdisplay and multiply the LV Size by 1024. This will give you the number of Kbytes.
For a LV to be contigious you will need to lvcreate or lvmodify the LV with these switches.
-s y -C y
This will force the LV and its' mirrors to be contigious. This way if you need to inlarge the space the space will only inlarge if contigious space is available.
Special Note: Being that the operation system is controling the mapping of a LV you can usually have a noncontigious LV that looks contigious to the database. This way I have been able to stripe a RAW space over several physical volumes and use it as a single dbspace for the database. I know this is true for Informix. I do not know about Oracle or other databases.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2000 11:58 AM
10-10-2000 11:58 AM
Solution
Hi Doug,
It's probably easier these days to forget about whole disks and just consider LVM.
Each 'raw device' that you have created is a 'volume' in LVM terms and as such is purely an area of disk space. A filesystem is simply a raw device that has been formatted in a special way.
UNIX treats it as a contiguous area of disk - it doesn't have to be contiguous on 'real disks' but LVM makes it appear so to whatever application is accessing it.
The management of it is up to the application that is using it, typically a database engine such as Oracle. Instead of a single file within a filesystem, the application treats the 'raw device file' as a single file.
One important thing to note is that UNIX does pretty much all (there are special vxfs mount options) filesystem I/O via its in-memory buffer cache. Raw disk devices do not use the buffer cache so raw I/O does not carry that OS overhead.
The only way to determine the size of the raw device is to use LVM commands such as vgdisplay and lvdisplay. As you are aware, bdf and du only display mounted filesystems.
It may be worth considering adopting a naming convention for raw volumes such that relevant information can be easily 'grepped' from a vgdisplay listing. Another idea is to include raw volume names as comments in /etc/fstab as a reminder.
You can extend a logical volume by using the lvextend command. LVM volumes will always be contiguous as far as an application is concerned. The procdure for Oracle would be:-
- lvextend the volume as appropriate
- alter database datafile '...' resize xxxM;
Hope this helps,
John
It's probably easier these days to forget about whole disks and just consider LVM.
Each 'raw device' that you have created is a 'volume' in LVM terms and as such is purely an area of disk space. A filesystem is simply a raw device that has been formatted in a special way.
UNIX treats it as a contiguous area of disk - it doesn't have to be contiguous on 'real disks' but LVM makes it appear so to whatever application is accessing it.
The management of it is up to the application that is using it, typically a database engine such as Oracle. Instead of a single file within a filesystem, the application treats the 'raw device file' as a single file.
One important thing to note is that UNIX does pretty much all (there are special vxfs mount options) filesystem I/O via its in-memory buffer cache. Raw disk devices do not use the buffer cache so raw I/O does not carry that OS overhead.
The only way to determine the size of the raw device is to use LVM commands such as vgdisplay and lvdisplay. As you are aware, bdf and du only display mounted filesystems.
It may be worth considering adopting a naming convention for raw volumes such that relevant information can be easily 'grepped' from a vgdisplay listing. Another idea is to include raw volume names as comments in /etc/fstab as a reminder.
You can extend a logical volume by using the lvextend command. LVM volumes will always be contiguous as far as an application is concerned. The procdure for Oracle would be:-
- lvextend the volume as appropriate
- alter database datafile '...' resize xxxM;
Hope this helps,
John
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP