GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Making a raw log file?
Operating System - HP-UX
1843935
Members
1758
Online
110226
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-17-2006 12:49 PM
10-17-2006 12:49 PM
My database suggests using a raw log file. The installation procedure set up two log files of 367MB, and the documantation says you can change them to raw files. But right after that, it says "just go ahead and create the raw devices - see your OS documentation".
The two created files are obviously mounted, and raw files don't seem to get mounted.
How do I create the raw device files? I have locations where they'll go (/dev/dsk/cNtNdN - or maybe rcNtNdN?).
The two created files are obviously mounted, and raw files don't seem to get mounted.
How do I create the raw device files? I have locations where they'll go (/dev/dsk/cNtNdN - or maybe rcNtNdN?).
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2006 01:07 PM
10-17-2006 01:07 PM
Solution
As a general rule, one does not use the raw disk device directly but rather a raw logical volume. That will allow one to mirror (if desired) and the extra overhead of the logical to physical disk translation is all but zero. Moreover, unlike actual disks, it is very easy to resize LVOL's.
You don't mention your database but the procedure is essentially the same.
Shutdown the database.
Create an additional LVOL using lvcreate and make sure that it is at least as large as your current cooked file. Use lvextebd to mirror it, if you like so that a disk failure will not cause a database failure.
Now copy your cooked file to the raw lvol. Let's pretend that your cooked file is /xxx/yyy/mydb.log and your new raw lvol is /dev/vg10/rlvol1
dd if=/xxx/yyy/mydb.log of=/dev/vg10/rlvol1 bs=256k
Next, do an ls -l /xxx/yyy/mydb.log and note the owner, group, and mode (permissions) of the file and do a chown and chmod /dev/vg10/rlvol1 to match those of the cooked file.
Now, we need to create a symbolic link because the database doesn't know about the raw LVOL (the symbolic link also serves as documentation so that one is somewhat less likely to overwrite what someone might mistake for an unused LVOL):
mv /xxx/yyy/mydb.log /xxx/yyy/mydb.log.save # just in case
ln -s /dev/vg10/rlvol1 /xxx/yyy/mydb.log
Start your database.
After you confirm that all is well, you can remove the original cooked files which has been renamed /xxx/yyy/mydb.log.save.
You don't mention your database but the procedure is essentially the same.
Shutdown the database.
Create an additional LVOL using lvcreate and make sure that it is at least as large as your current cooked file. Use lvextebd to mirror it, if you like so that a disk failure will not cause a database failure.
Now copy your cooked file to the raw lvol. Let's pretend that your cooked file is /xxx/yyy/mydb.log and your new raw lvol is /dev/vg10/rlvol1
dd if=/xxx/yyy/mydb.log of=/dev/vg10/rlvol1 bs=256k
Next, do an ls -l /xxx/yyy/mydb.log and note the owner, group, and mode (permissions) of the file and do a chown and chmod /dev/vg10/rlvol1 to match those of the cooked file.
Now, we need to create a symbolic link because the database doesn't know about the raw LVOL (the symbolic link also serves as documentation so that one is somewhat less likely to overwrite what someone might mistake for an unused LVOL):
mv /xxx/yyy/mydb.log /xxx/yyy/mydb.log.save # just in case
ln -s /dev/vg10/rlvol1 /xxx/yyy/mydb.log
Start your database.
After you confirm that all is well, you can remove the original cooked files which has been renamed /xxx/yyy/mydb.log.save.
If it ain't broke, I can fix that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2006 07:52 PM
10-17-2006 07:52 PM
Re: Making a raw log file?
Hi Michael,
The "raw" files are created with you use de "lvcreate" command.
Umount /dev/vgxx/lvyyy and use /dev/vgxx/rlvyyy
Create new controlfiles for use this devices.
Verify permission for raw devices. Sample:
crw-r----- 1 oracle dba 64 0x76000e Oct 18 01:01 /dev/vgxx/lvyyy
rgs
The "raw" files are created with you use de "lvcreate" command.
Umount /dev/vgxx/lvyyy and use /dev/vgxx/rlvyyy
Create new controlfiles for use this devices.
Verify permission for raw devices. Sample:
crw-r----- 1 oracle dba 64 0x76000e Oct 18 01:01 /dev/vgxx/lvyyy
rgs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2006 08:28 PM
10-17-2006 08:28 PM
Re: Making a raw log file?
Indeed raw files don't get mounted.
(Socalled cooked files do.)
You create the raw filesystem with
mknod , just like logical volume.
You need to specify in your db this path
as the location of your log.
The advantage is that even when you
inadvertently delete the raw device,
i.e. the logical volume, you will not
lose your data.
The device is just a pointer to a location on the disk. So you can just re-make your device with mknod. You need however need to document the major and minor number to be sure what is what.
(Socalled cooked files do.)
You create the raw filesystem with
mknod , just like logical volume.
You need to specify in your db this path
as the location of your log.
The advantage is that even when you
inadvertently delete the raw device,
i.e. the logical volume, you will not
lose your data.
The device is just a pointer to a location on the disk. So you can just re-make your device with mknod. You need however need to document the major and minor number to be sure what is what.
Look before you leap
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
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP