Move chunk from one disk to another disk
Posted in 2007
Topics: Storage & Space Management, Cloud, Docker & Containers
Hi all,
I really hope someone can give me some pointer to proceed.
Version:
$ uname -aSunOS xxxxxxx 5.8 Generic_117350-31 sun4u sparc SUNW,Sun-Fire-880
$ onstat -VIBM Informix Dynamic Server Version 9.30.FC6X1 Software Serial Number xxxx
Here the story. We had a customer set up the database in following manner.
1. 99% of the chunk setting is set using softlink to a device file. The device
files will point to the raw device that sited on the disk array.
2. There are 3 chunks created directly poiting to device file. (Off caused it
will then point to the raw device).
After a while customer decided to move all the data out to a new device, so
those chunks that using softlink were successfully moved to the new disk
without problem. But the 3 chunks that setup directly using device file is
suffuring serious problem.
What my customer did is delete the device file and point it to new raw device.
The simple step seem to be so simple, but problem arise when reboot happen.
The OS kernal detected that changed had happen to the device file and it
automatically 'force' the device file point to it's original location. These
caused database corruption (both index and data).
I am looking for a solution that can.
1. Alter the chunk setting at location of the fname field in
sysmaster.syschunks table so that it can point to a softlink instead.
2. Move the chunks to new location in the new disk [ This can be done using
UNIX command dd, but i need to briing down informix ]. This only valid if i
use softlink not for chunk that setup directly using device file.
I really need HELP !!!!!!!!
Thanks, Patrick.
Sample of the setup:
$ onstat -d | pg
IBM Informix Dynamic Server Version 9.30.FC6X1 -- On-Line -- Up 3 days
00:23:42 -- 6632448 Kbytes
Dbspaces
address number flags fchunk nchunks flags owner name
2199afe58 1 0x1 1 1 N informix rootdbs
21b8ac1b0 2 0x1 2 211 N informix dbspace
21b8ac330 3 0x8001 105 5 N S informix sbspace
21b8ac4b0 4 0x2001 106 5 N T informix tempdbspace
21b8ac630 5 0x1 117 1 N informix physdbspace
21b8ac7b0 6 0x1 118 1 N informix logspace
21b8ac930 7 0x1 119 27 N informix dbindex
21b8acab0 8 0x1 237 1 N informix logicallogdbspace
8 active, 2047 maximum
Chunks
address chk/dbs offset size free bpages flags pathname
2199b0028 1 1 50 1047525 1044334 PO- /apps/IDS/ids.93/databases/Root
21b8790c8 2 2 50 1048025 290 PO- /apps/IDS/ids.93/databases/rawspace102
21b879250 3 2 50 1048025 1 PO- /apps/IDS/ids.93/databases/rawspace103
21b8793d8 4 2 50 1048025 1 PO- /apps/IDS/ids.93/databases/rawspace104
21b879560 5 2 50 1048025 2 PO- /apps/IDS/ids.93/databases/rawspace105
21b8796e8 6 2 50 1048025 0 PO- /apps/IDS/ids.93/databases/rawspace106
21b879870 7 2 50 1048025 2 PO- /apps/IDS/ids.93/databases/rawspace107
21b8799f8 8 2 50 1048025 1 PO- /apps/IDS/ids.93/databases/rawspace108
21b8931b0 153 7 50 1048500 177850 PO- /dev/md/rdsk/d261
21b893338 154 2 50 1048500 1847 PO- /dev/md/rdsk/d262
21b8934c0 155 7 50 1048500 1048497 PO- /apps/IDS/ids.93/databases/rawspace263
21b895958 178 2 50 1048500 33313 PO- /apps/IDS/ids.93/databases/rawspace286
21b895ae0 179 2 50 1048500 21247 PO- /dev/md/rdsk/d287
21b895c68 180 2 50 1048500 47122 PO- /apps/IDS/ids.93/databases/rawspace289
$ pwd
/apps/IDS/ids.93/databases
$ ls -tl | head -10total 534
lrwxrwxrwx 1 informix informix 17 Apr 26 13:53 rawspace856 -> /dev/md/rdsk/d856
lrwxrwxrwx 1 informix informix 17 Apr 26 13:53 rawspace855 -> /dev/md/rdsk/d855
lrwxrwxrwx 1 informix informix 17 Apr 26 13:53 rawspace854 -> /dev/md/rdsk/d854
lrwxrwxrwx 1 informix informix 17 Apr 26 13:52 rawspace853 -> /dev/md/rdsk/d853
lrwxrwxrwx 1 informix informix 17 Apr 26 13:52 rawspace852 -> /dev/md/rdsk/d852
lrwxrwxrwx 1 informix informix 17 Apr 26 13:51 rawspace851 -> /dev/md/rdsk/d851
lrwxrwxrwx 1 informix informix 17 Apr 26 13:51 rawspace850 -> /dev/md/rdsk/d850
lrwxrwxrwx 1 informix informix 17 Apr 26 13:51 rawspace849 -> /dev/md/rdsk/d849
lrwxrwxrwx 1 informix informix 17 Apr 26 13:51 rawspace848 -> /dev/md/rdsk/d848
$ pwd
/dev/md/rdsk
$ ls -tl | head -10total 2100
lrwxrwxrwx 1 root root 39 Mar 8 12:15 d1043 ->
../../../devices/pseudo/md@0:0,1043,raw
lrwxrwxrwx 1 root root 39 Mar 8 12:15 d1044 ->
../../../devices/pseudo/md@0:0,1044,raw
lrwxrwxrwx 1 root root 39 Mar 8 12:15 d1045 ->
../../../devices/pseudo/md@0:0,1045,raw
lrwxrwxrwx 1 root root 39 Mar 8 12:15 d1046 ->
../../../devices/pseudo/md@0:0,1046,raw
lrwxrwxrwx 1 root root 39 Mar 8 12:15 d1047 ->
../../../devices/pseudo/md@0:0,1047,raw
lrwxrwxrwx 1 root root 39 Mar 8 12:15 d1048 ->
../../../devices/pseudo/md@0:0,1048,raw
lrwxrwxrwx 1 root root 39 Mar 8 12:15 d1049 ->
../../../devices/pseudo/md@0:0,1049,raw
lrwxrwxrwx 1 root root 39 Mar 8 12:15 d1040 ->
../../../devices/pseudo/md@0:0,1040,raw
lrwxrwxrwx 1 root root 39 Mar 8 12:15 d1041 ->
../../../devices/pseudo/md@0:0,1041,raw
Hi,
This seems to be a md device setup by metatool.
You could just redefine the device by using metatool, since it is not
really a physical device.
Is it a mirror/RAID 1/5 ?
In this case, remove one device from the meta device and reattach a new
one on the destination disk.
After this is successfully mirrored (metastat), remove the other device
and attach a new one on the secondary destination disk.
If it is a stripe device, shutdown informix, copy the data with dd to
the new device and reassign the device in md.
It all depends on the meta information (which you did not supply).
Marcus
-----Original Message-----
From: PATRICK LEY [mailto:patrickley@excite.com]
Sent: Friday, May 11, 2007 3:52 PM
To: ids@iiug.org
Subject: Move chunk from one disk to another disk [9128]
Hi all,
I really hope someone can give me some pointer to proceed.
Version:
$ uname -a
SunOS xxxxxxx 5.8 Generic_117350-31 sun4u sparc SUNW,Sun-Fire-880 $
onstat -V IBM Informix Dynamic Server Version 9.30.FC6X1 Software SerialNumber xxxx
Here the story. We had a customer set up the database in following
manner.
1. 99% of the chunk setting is set using softlink to a device file. The
device files will point to the raw device that sited on the disk array.
2. There are 3 chunks created directly poiting to device file. (Off
caused it will then point to the raw device).
After a while customer decided to move all the data out to a new device,
so those chunks that using softlink were successfully moved to the new
disk without problem. But the 3 chunks that setup directly using device
file is suffuring serious problem.
What my customer did is delete the device file and point it to new raw
device.
The simple step seem to be so simple, but problem arise when reboot
happen.
The OS kernal detected that changed had happen to the device file and it
automatically 'force' the device file point to it's original location.
These caused database corruption (both index and data).
I am looking for a solution that can.
1. Alter the chunk setting at location of the fname field in
sysmaster.syschunks table so that it can point to a softlink instead.
2. Move the chunks to new location in the new disk [ This can be done
using UNIX command dd, but i need to briing down informix ]. This only
valid if i use softlink not for chunk that setup directly using device
file.
I really need HELP !!!!!!!!
Thanks, Patrick.
Sample of the setup:
$ onstat -d | pg
IBM Informix Dynamic Server Version 9.30.FC6X1 -- On-Line -- Up 3 days
00:23:42 -- 6632448 Kbytes
Dbspaces
address number flags fchunk nchunks flags owner name
2199afe58 1 0x1 1 1 N informix rootdbs
21b8ac1b0 2 0x1 2 211 N informix dbspace 21b8ac330 3 0x8001 105 5 N S
informix sbspace 21b8ac4b0 4 0x2001 106 5 N T informix tempdbspace
21b8ac630 5 0x1 117 1 N informix physdbspace 21b8ac7b0 6 0x1 118 1 N
informix logspace 21b8ac930 7 0x1 119 27 N informix dbindex 21b8acab0 8
0x1 237 1 N informix logicallogdbspace
8 active, 2047 maximum
Chunks
address chk/dbs offset size free bpages flags pathname
2199b0028 1 1 50 1047525 1044334 PO- /apps/IDS/ids.93/databases/Root
21b8790c8 2 2 50 1048025 290 PO- /apps/IDS/ids.93/databases/rawspace102
21b879250 3 2 50 1048025 1 PO- /apps/IDS/ids.93/databases/rawspace103
21b8793d8 4 2 50 1048025 1 PO- /apps/IDS/ids.93/databases/rawspace104
21b879560 5 2 50 1048025 2 PO- /apps/IDS/ids.93/databases/rawspace105
21b8796e8 6 2 50 1048025 0 PO- /apps/IDS/ids.93/databases/rawspace106
21b879870 7 2 50 1048025 2 PO- /apps/IDS/ids.93/databases/rawspace107
21b8799f8 8 2 50 1048025 1 PO- /apps/IDS/ids.93/databases/rawspace108
21b8931b0 153 7 50 1048500 177850 PO- /dev/md/rdsk/d261
21b893338 154 2 50 1048500 1847 PO- /dev/md/rdsk/d262 21b8934c0 155 7 50
1048500 1048497 PO- /apps/IDS/ids.93/databases/rawspace263
21b895958 178 2 50 1048500 33313 PO-
/apps/IDS/ids.93/databases/rawspace286
21b895ae0 179 2 50 1048500 21247 PO- /dev/md/rdsk/d287
21b895c68 180 2 50 1048500 47122 PO-
/apps/IDS/ids.93/databases/rawspace289
$ pwd
/apps/IDS/ids.93/databases
$ ls -tl | head -10total 534
lrwxrwxrwx 1 informix informix 17 Apr 26 13:53 rawspace856 ->
/dev/md/rdsk/d856
lrwxrwxrwx 1 informix informix 17 Apr 26 13:53 rawspace855 ->
/dev/md/rdsk/d855
lrwxrwxrwx 1 informix informix 17 Apr 26 13:53 rawspace854 ->
/dev/md/rdsk/d854
lrwxrwxrwx 1 informix informix 17 Apr 26 13:52 rawspace853 ->
/dev/md/rdsk/d853
lrwxrwxrwx 1 informix informix 17 Apr 26 13:52 rawspace852 ->
/dev/md/rdsk/d852
lrwxrwxrwx 1 informix informix 17 Apr 26 13:51 rawspace851 ->
/dev/md/rdsk/d851
lrwxrwxrwx 1 informix informix 17 Apr 26 13:51 rawspace850 ->
/dev/md/rdsk/d850 lrwxrwxrwx 1 informix informix 17 Apr 26 13:51
rawspace849 ->
/dev/md/rdsk/d849
lrwxrwxrwx 1 informix informix 17 Apr 26 13:51 rawspace848 ->
/dev/md/rdsk/d848
$ pwd
/dev/md/rdsk
$ ls -tl | head -10total 2100
lrwxrwxrwx 1 root root 39 Mar 8 12:15 d1043 ->
.../../../devices/pseudo/md@0:0,1043,raw
lrwxrwxrwx 1 root root 39 Mar 8 12:15 d1044 ->
.../../../devices/pseudo/md@0:0,1044,raw
lrwxrwxrwx 1 root root 39 Mar 8 12:15 d1045 ->
.../../../devices/pseudo/md@0:0,1045,raw
lrwxrwxrwx 1 root root 39 Mar 8 12:15 d1046 ->
.../../../devices/pseudo/md@0:0,1046,raw
lrwxrwxrwx 1 root root 39 Mar 8 12:15 d1047 ->
.../../../devices/pseudo/md@0:0,1047,raw
lrwxrwxrwx 1 root root 39 Mar 8 12:15 d1048 ->
.../../../devices/pseudo/md@0:0,1048,raw
lrwxrwxrwx 1 root root 39 Mar 8 12:15 d1049 ->
.../../../devices/pseudo/md@0:0,1049,raw
lrwxrwxrwx 1 root root 39 Mar 8 12:15 d1040 ->
.../../../devices/pseudo/md@0:0,1040,raw
lrwxrwxrwx 1 root root 39 Mar 8 12:15 d1041 ->
.../../../devices/pseudo/md@0:0,1041,raw
************************************************************************
*******
Forum Note: Use "Reply" to post a response in the discussion forum.
Hi Marcus, thanks for your respond. I am not sure whether the customer is using metatool or not but will check with them. Your questions: 1. Is it a mirror/RAID 1/5 ? YES, it is on RAID 1 + 0 2. If it is a stripe device? The new disk is stripe with size 512K, the old one is not Thanks, Patrick
On 15/05/07, PATRICK LEY <patrickley@excite.com> wrote: > Hi Marcus, > > thanks for your respond. > > I am not sure whether the customer is using metatool or not but will check > with them. > > Your questions: > 1. Is it a mirror/RAID 1/5 ? > > YES, it is on RAID 1 + 0 > > 2. If it is a stripe device? > > The new disk is stripe with size 512K, the old one is not > > Thanks, Patrick > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > Patrick I've not really followed this thread, however, do you have mirroring enabled in your onconfig file? If so you could use the Informix mirroring mechanism to mirror the chunks to the new disk and then delete the old mirror. Avoids any 'messiness' with stripes and such-like and enables transfer from cooked to raw or vice-versa Keith