| Issue 128: | New feature | |
| 1 person starred this issue and may be notified of changes. | Back to list |
Hi fscops, I was just wondering that would it be beneficial to explicitly define tiers for existing files/directories that were not allocated through OHSM initially. I mean to say that i have certain folder named foo and i have some of my old project in it. Its not on a specific tier( home tid = 0). Now i want to start development work on it and want it to be in tier 1. So i just right click on folder foo and specify tier as 1. Now when i do this all the files in foo will be moved to tier1. Hows that?? We can do this. Comments/Suggestions.
Aug 12, 2009
Basically you are talking about directory based relocation. This feature will hardly take any time to get implemented. Start reading the directory using readdir() recursively or non recursively till the time there is no record in the directory. You get struct dirent, it has inode number. i think we have a function to relocate a particular inode from one tier to another in the ohsm kernel driver pass the inode number and the dest tier to that function using an ioctl on OHSM_KERNEL_DRIVER Go ahead and implement it using CLI. ohsm --relocate --dir [pathname of the directory] //something like this you can also relocate a single file in this manner. Just use stat() or lstat()(recommended) and get the inode number Its a userspace job with very few changes in the kernel/ohsm.c
Aug 12, 2009
Yes, yogesh .... You are right... we need to support this here. Its become a hot requirement now. 1. Remove the check to relocate only if ohsm_home_tid is NON ZERO. 2. To add relocation support based on file names. 3. Add supprt to relocate based on *.mp3 [ Names using wild cards] ... Not very imp. 4. RELOCATION BASED on DIRECTORY NAMES.
Cc:
-sandeepksinha -greg.freemyer -checkout.vineet -charles.drawin -mkatiyar -shyam.burkule -bharati.alatgi -ysobale
Aug 12, 2009
What about matching the policies RISHI... They are currently in kernel? In order to acoomplish what you are suggesting we would require to keep the OHSM metadata in userspace as well. Can we use /etc/ohsm/ohsm.conf for this purpose. I shall write a write up on the idea for /etc/ohsm/ohsm.conf. This is going to be done soon. Yogesh should take this forward. The idea is simple, dump the information while ohsm --enable into /etc/ohsm/ohsm.conf (A binary file). Any updates to devinfo, allocpol, relocpol should update this file as well. Also, state changes should also be captured. So, In case of relocation we can block and futher ioctls and use the data in /etc/ohsm/ohsm.conf about relocation and perform relocation using ohsm --debug --relocate. What say ????
Aug 12, 2009
@imreckless's idea: the user here is ready with the tier he wants to relocate the directory or file. We do not need any policy checking in this case. We just have to relocate to another tier. |
Hi , As far as , what I have understood. I think this feature is not supported up till now. Supporting this will be good idea. Sandeep do we are going to support this kind of feature ? -- Yogesh