02-12-2010 05:58 AM
Hi,
I have 5 hdd (A,B,C,D,E) total hdd size is 5 TeraByte .My question is that firstly i wrote datas A HDD and if A HDD is full and user dont close the datas file, i can write other hdd device for example B device. How can solve this problem for Labview. By the way I use raid 0 for hdd configuration.
Basically,
İf A (1 TB) is full, go ohter HDD. For instance;go B HDD how can i do this with labView GPL.....
Solved! Go to Solution.
02-12-2010 06:30 AM
kacco wrote:Hi,
I have 5 hdd (A,B,C,D,E) total hdd size is 5 TeraByte .My question is that firstly i wrote datas A HDD and if A HDD is full and user dont close the datas file, i can write other hdd device for example B device. How can solve this problem for Labview. By the way I use raid 0 for hdd configuration.
If you have 5 HDDs 1GB each and all of them configured as RAID 0, then you should have just one Volume (5GB). In RAID 0 you can't select physical Drive for writing. The information stripped over all HDDs.
Refer to Wikipedia: http://en.wikipedia.org/wiki/RAID
Andrey.
02-12-2010 06:42 AM - edited 02-12-2010 06:49 AM
In RAID0, do the HD pair not show up as a single drive by the OS? For instance, if you stripe the disks, they both contain bits of data, however, the OS shows them as a single drive. (side note... Is it a good idea to do this? Do you need the speed? With that many HD's, you could have gone for RAID6 (expensive), but at lease RAID1 or 3/4 or even 5 to make sure you don't loose the data)
If you simply want to see the free space left of the (do we call it a virtual drive at this point?) drive as denoted by the OS, there is a function within the File Io > Advanced to get the volume information from the drives.
It's called "Get Volume Info.vi".
Simply wire the drive letter (ie: C:\) to the path and it will give you the size and the free space (remaining memory) for the drive.
You could monitor the remaining size at a given interval and decide to switch to another drive. You can even get the free space on the other drive and decide which one to select based on which has the most free space left.
02-12-2010 07:09 AM
Thank you for answers
Mr. Andrey Dimitrev my raid configuration is an example it can be raid 0 or raid 5 or etc.The real question or problem is that if C:\ is full, automatically change hdd directory for example D:\ this operation is possible or not with LabVIEW.
Mr. RAY R your answer can be correct solution for me with "get volume info" function.İf you have any example about this function you can share me? I didnt find any example from find example section.
Again thank you to yours interest and i want to give kudos both of yours.:) Accept your solution:)
02-12-2010 07:16 AM
Actually, it is very simple. Simply look in the functions palette under File IO / Advanced.
I can do a quick example where it looks for the drives and provides info on all of them. (I'll be back soon)
02-12-2010 07:18 AM
02-12-2010 07:29 AM - edited 02-12-2010 07:34 AM
Try the code snippet below.
Leaving the path empty to the list folders will get you all the drive letters.
Since it is the drive letter and not in the path format, you build a path and it converts it for you.
The in the loop, you get the size and free space. I placed the info in a cluster for easy retrieval later and you can look at the contents of the array.
Enjoy.
R
02-12-2010 08:18 AM
What you could do is make a subvi that determines the size of the currently used drive and which drive would be selected based on your own algorithm. It could be as simple as choosing the drive that has the most free space.
Sub-VI:
Your inputs would then be:
Currently Used Drive
Error In
Your Outputs could be:
Space left on Current Drive
Next Drive
or you could also output the cluster with all the information on all drives.
Just tossing a few more ideas... 😉