Reputation: 13
i am developing an MVC application where users store files and folders online in my servers. i was thinking to use a NAS for storing user data but i got a simple question. what if the amount of user data exceed my NAS storage space ? and what if it happens again and again and when users want to download their stored files how could i know the place (specific NAS) where is located a file ? .. i have many questions about that because i am new in this area, i don't know if there is a way i can have "a main NAS" with the responsability of do the job of put a file where it find available space instead of doing by myself and then be able to get any file without matter where the file is saved. i don't know if i am being clear in my question but i need somebody give an idea. thanks in advance.
Upvotes: 0
Views: 721
Reputation: 366
This doesn't seem a popular question, and it's very old, by I'll leave an answer here anyway in case someone comes accross this. First a simple approach. If your application scales you can have multiple NAS and for each user you can store the id of the NAS where his files are stored. If that NAS fills up just move some users to a new one and update the id of the NAS associated to each user. An intermidiate(advanced solution is using something like Gluster, which allows you to create a distributed volume by combining multiple storage solutions. Another, more complex, approach would be using a SAN and resort to volume groups and logical volumes, but I wouldn't do a good job at explaining this in a stack overflow answer. If anyone wants to undertstand how it works I recommend doing a bit of studying. The TLDR is that you can group multiple storage servers in a volume group (VG). You can compare a VG to a big HDD that's distributed through multiple servers. Then you have to take that VG and create Logical Volumes (LV), which are essentially partitions, and mount them on a folder on your web servers.
Upvotes: 0
Reputation: 140
Could you? Yes. Is it a good idea? Probably not. You could build our own sort of file allocation table which would keep track of each file's location. For example, a simple database table that says a specific file is located on NAS #23. But you probably shouldn't, because there are much better options.
You're massively overcomplicating your network architecture without reason. A single NAS device can be expanded to handle multiple petabytes of data.
If you're talking about using commercial consumer-grade NAS devices, that's not an economical choice for any website that involves that much data. A cheap server running NAS4Free (or FreeNAS) could be expanded as needed to provide many terabytes of data storage, and if you surpass that you should be looking at running an enterprise-class NAS/SAN instead of hundreds of consumer NAS devices.
Upvotes: 1