Reputation: 377
I have a PHP application, running on a centos box, that stores a large amount of user-uploaded files.
Right now I am storing the data in a folder /uploads, but I am running out of space on the server.
I have the option of adding storage drives of 100GB. For example, drives /dev/XXXX, /dev/YYYY, and /dev/ZZZZ each have 100 GB.
I would like to know the best way to store user-uploaded files across multiple drives. Is there a Centos directive that can join drives into one available space for PHP? Or should I just have PHP upload files to the first drive, and when fills up, have it save to the second, etc?
Thanks! Ben
Upvotes: 0
Views: 444
Reputation: 2473
Logical Volume Manager (LVM) is a tool to easily expand or combine multiple hard drives into a single pool of storage and makes it easy to dynamically resize and create new partitions, even without restarting the process or without removing the volume. You need to do following steps:
lvm2
.Here you can find complete procedure for it. For Live demo of procedure, watch here.
Upvotes: 2
Reputation: 484
You can use LVM (Logical Volume Manager) that enables you to create a logical volume from multiple physical volumes , but i would advise against it as if a hard drive fails, the whole logical volume might be compromised.
Have a look at AWS S3 storage, it might do the job for your project.
Upvotes: 1