LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how can i see hardisk size (HDD) capacity from labview

Solved!
Go to solution

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.....

0 Kudos
Message 1 of 8
(5,128 Views)

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.

 

0 Kudos
Message 2 of 8
(5,114 Views)

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.

 

 

 

Message Edited by Ray.R on 02-12-2010 07:44 AM
Message Edited by Ray.R on 02-12-2010 07:49 AM
0 Kudos
Message 3 of 8
(5,105 Views)

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:)

 

0 Kudos
Message 4 of 8
(5,092 Views)

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)

0 Kudos
Message 5 of 8
(5,087 Views)
Actually what is the meaning of volume path (get volume info)? how can i use this you can send simple example about this function.
0 Kudos
Message 6 of 8
(5,085 Views)
Solution
Accepted by kacco

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

 

 

 

Message Edited by Ray.R on 02-12-2010 08:34 AM
Message 7 of 8
(5,079 Views)

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...  😉

0 Kudos
Message 8 of 8
(5,061 Views)