Operating System - HP-UX
1833883 Members
1485 Online
110063 Solutions
New Discussion

split a raw logical device file

 
SOLVED
Go to solution
Jack_126
Frequent Advisor

split a raw logical device file

Hi All,

I have hp-ux11i on one of my hp box. I want to split a raw logical. volume /dev/emc4_vg08/rms_data24 which is of 2048mb into 10 files of 256mb. Is it possible? if yes how it can be done, your help will be apprecited.

Thanks
Jack
6 REPLIES 6
IT_2007
Honored Contributor

Re: split a raw logical device file

Do you want move raw data to 10 raw volumes? Didn't understand your question.

Bill Hassell
Honored Contributor

Re: split a raw logical device file

You'll have to be more exact in your description. A raw logical volume has no files whatsoever. That's why it is referred to as a raw data volume. Only your application knows how the data is stored on this disk. Raw filesystem is meaningless because there is no such entity. If you want to destroy the data on the volume, just use lvremove for data24, then use lvcreate the new volumes.


Bill Hassell, sysadmin
Jack_126
Frequent Advisor

Re: split a raw logical device file

Hi,

Yes I want to split the raw logical volume of 2048mb into small no of (256mb) of raw volumes. is it possible?

Thanks
Jack
Jack_126
Frequent Advisor

Re: split a raw logical device file

Bill,
I dont want to destroy the raw volume, you are right that there is no file system on it but data is there as sybase application is using it to store the data.
I want to split this volume into smaller volumes.
Bill Hassell
Honored Contributor

Re: split a raw logical device file

Ahhh, then this is a question for Sybase. Since Sybase knows where the indexes, data, etc are located, only Sybase can reduce and split out the data.


Bill Hassell, sysadmin
Hein van den Heuvel
Honored Contributor
Solution

Re: split a raw logical device file


Hmm, one way of reading the question is that you want to carve up a 2048mb space into 10 'files' of 256mb. Well, methinks that shy of a minor miracle you can only get 8 times 256 out of 2048, so i guess that is not what you mean.

If you did, is would go something like
lvchange -a n /dev/emc4_vg08/rms_data24
lvremove /dev/emc4_vg08/rms_data24
lvcreate -n f1 -L 256 /dev/emc4_vg08
lvcreate -n f1 -L 256 /dev/emc4_vg08
:
lvchange -a y /dev/emc4_vg08/f1
lvchange -a y /dev/emc4_vg08/f2
:

So maybe you want to take the raw data an plunk it into real files? Easy!

dd iseek=0 bs=1024k count=256 if=rms_data24 of=/mnt/f1
dd iseek=256 bs=1024k count=256 if=rms_data24 of=/mnt/f2
dd iseek=512 bs=1024k count=256 if=rms_data24 of=/mnt/f3
:

But somehow i think you want to isolate real, usefull, data from the container that is ms_data24. Only the software which organize the data in the container, in this case sybase, know how to make sense out of it and can perhpas relocate/extract tables.

>>> I want to split this volume into smaller volumes.

May be ask WHY? What do you intent to achieve by the split? Functionality? Performance? Availability? There may be better ways to get there, but they likely involve sybase skills.

Hope this helps some,
Hein.