1834026 Members
2235 Online
110063 Solutions
New Discussion

ncheck

 
Lai Nee Shyang_1
Frequent Advisor

ncheck

Hi There,

I'm doing a test on how blocks are allocated in a vxfs when a file is being written. What I did was, create a VG with 8Mb PE with 4 Open-9 LDEVs, on top of that I create a new filesysem of 8192 block size+largefiles. With the filesystem mounted I started populating it by copying a series of 2gb file to the filesystem until it is full. (testfile.tmp, testfile.tmp2,testfile.tmp3 and so on)
I did a ncheck and extract out the blocks range and sort them, I've save it in the attached file ncheck.txt.

I find that the blocks range allocated for each file is not purely contiguous. Example testfile.tmp appears in block range 387-511 and
3571712-3604479.

My Question is :
A. when a file is first created, does it use contiguous blocks, or in another words will it use the PE/LE in sequential order? Will there be a "jump" in block (PE/LE) number ?

B. Is there a way to correlate the ncheck block range with the running PE number ? Eg Block 1-100 resides on PE1, block 101-200 resides on PE2 ?

Appreciate if anyone can shed some light ...

Cheers

Lai

If it doesn't work, We'll make it work. If it works, We'll make it work better.
3 REPLIES 3
Peter Godron
Honored Contributor

Re: ncheck

Lai,
question 2:

e.g. where is /etc/passwd

1) get the inode number of that file:
# ls -i /etc/passwd
1700 /etc/passwd

2) get a list of sectors occupied by it:

# ncheck -F vxfs -S - /dev/vg00/lvol3 | awk '{if ($3==1700)print}'
UNNAMED 999 1700 11144 /etc/passwd
UNNAMED 999 1700 11010 /etc/passwd

So the file uses the sectors 11144 and 11010. A sector is 1KB... so it translates to offsets in KB.
(Thanks to Dietmar Konermann)

Regards
harry d brown jr
Honored Contributor

Re: ncheck

I'm not sure what question you are trying to answer but I would suggest you go to docs.hp.com and do some research.

live free or die
harry d brown jr
Live Free or Die
Lai Nee Shyang_1
Frequent Advisor

Re: ncheck

Hi There

Perhaps my question is not clear, my appologies.

What I'm testing is when a file is created , does it occupy consecutive blocks in a file system.

In my production system, I've 5 x 2Gb redo log files siting on a filesystem constructed from 8 Open9 LDEVs (Open9=6.8Gb). As the filesystem is not stripe, I imagine that all the 5 redo log files will occupy the first and second LDEVs (5x2Gb redo = 10Gb, 2xOpen9=13.6Gb) and the rest of the LDEVs basically has no activity. I'm trying to determine if I can spread all the 5 redo logs over as many LDEVs as possible by recreating the file system, restore the first redo log file, write a 4.8Gb dummy file repeat this until all redo logs are written. In this way, will the 5 redologs file sit on the first 5 LDEVs ?

Cheers

Lai
If it doesn't work, We'll make it work. If it works, We'll make it work better.