Re: raw devices - general questions
Posted in 1996
In article <328756A2.5249@transre.com>, "Juan R. Guzman" <jguzman@transre.com> writes >David Williams wrote: >> ... >> >> >each. Create (2) chuncks, each of which references the raw device file >> >for each partition (slices). The offsets will be zero for each. >> >> Each slice also contains a header. On Solaris 2.5 this is 8K. >> Also not all versions of UNIX support 'slices'. Again the mention of >> slices sounds like your operating system is SunOs/Solaris. >> >> >I havn't tried it, but I would think it should work. >> >> -- >> David Williams > >I know this is going on a tangent a little off of the newsgroup topic >but please bear with me. > >Each slice has a header of 8k? I've always used an offset of 0K in >informix (I start slice 0 on cylinder 1 and every other slice on the >first available cylinder). I'm doing this now under Sparc Solaris 2.4 >and did it under Solaris 2.3. When I first started to work with slices >and raw devices I would give Informix an offset of 0 for slice 0 >starting in cylinder 0, with this I would get a message but Informix >worked OK. Should I get a message without the 8k offset? Depends on not just the fact that you are running Solaris but also the version. Starting in cylinder 0 is a definate no no. The VTOC is stored on cylinder 0 and also sometimes manufacturer specfic info. (Only some older Western Digital drives you can't even write to some parts of cylinder 0, track 0, sector 0. Although no error is returned from the write certain bytes keep their original values! I actually tested this and found it to be be true. We have UNIX filesystems on the disks which we use for Informix. I know you should not do this but we only have 8 disks for 5Gb of data and a Word Processing application/mail also run on the machine and they create lots of files... If you use an offset of 0 for slice 0 then the initial reserved page of the chunk with in slice 0 overwrites the VTOC and you can not access any filesystems on the disk. Either that of the VTOC overwrites the first reserved page and you cannot access anything in that chunk. Which one gets written depends when the UNIX buffer cache gets flushed as Online does not use the UNIX buffer cache but updating the VTOC does use the UNIX buffer cache. NOTE: The VTOC may get written to disk then the machine is shutdown as somewhere a flag is stored to indicate that the filesystems on that disk are clean, one flag per filesystem. So in summary yes the first ??? K of slice 0 are definately used so you can not use an offset of 0 with slice 0 and when I spoke to Informix they recommended to also use an offset with the other slices. SOLARIS SPECFIC NOTE: slice 2 cover the whole disk (used to dump the whole disk for backup purposes so do not assume slice 2 following slice 1 it does not!. -- David Williams