I currently have a server with 500GB storage (2 physical disks, raid 0) and its already full. I've asked my provider for an upgrade of additional 1TB storage (2 physical, raid 0). These are all hardware based raid.

Almost all files from /usr/local/nginx/html are videos and have consumed the first hard disk raid. Now I wanna know that if I purchased this additional hard disk, would any file saved into the same directory be automatically saved into the newly added hard disk?

Because what Im doing is Im hosting video files on that directory, and I want to continue saving on that particular directory only.

  • RAID 0? In production?
    – MDMarra
    Dec 20 '11 at 2:51
  • Yes. The hard disk(s) to be added will be 1TB raid 0 (2 physical disks).
    – Ansell
    Dec 20 '11 at 2:56
  • That seems like a pretty terrible idea. Using RAID 0 is like asking to lose data.
    – MDMarra
    Dec 20 '11 at 2:58
  • The server is used for video streaming, and I can only afford raid 0 or single hard disk while maintaining high capacity of storage
    – Ansell
    Dec 20 '11 at 3:22
  • 1
    Well, I hope you're taking regular backups and testing them, because it's not going to end well.
    – MDMarra
    Dec 20 '11 at 3:34

You'd be better served by backing up your data, and having your host re-provision (meaning re-install the OS) the server with (4) 1TB drives in RAID10 for fault-tolerance and speed. This usually doesn't add much to the bottom-line monthly price of the server but if your host doesn't have an inventory of 1TB drives, picking them up at current market prices of 250%+ of what they were just 6 months ago might be costly.

If that isn't an option and you're well aware of the real potential for data-loss with RAID0 in production, then what I would suggest is carving your new RAID0 into an LVM (the RAID0 unit will be one physical volume, 1 volume group, and 1 logical volume).

pv0 - Use the RAID0 device (md0 if software RAID, or probably sdX if hardware RAID)
vg0 - Use all of the space (the entire 1TB of the RAID device)
lv0 - Do not use all of the space in the volume group. Allocate maybe 500GB of 1TB and format it as an ext3 filesystem. Mount it to a temporary location (/mnt/temp for instance), and move your video file data to it. Then remount the device at the existing location of the video data:

mount /dev/mapper/vg0/lv0 /usr/local/nginx/html

Create the appropriate fstab entry (man fstab). Now having left extra space on vg0 you have the option to use that space elsewhere on the server should another directory fill the 500GB partition, or the ability to add more space to vg0 as needed.

  • Hi gman, Thank you for your answer. If I opt to reprovision the server with 4 1TB disks, will the OS need to be re-installed along with the nginx setup and 500gb videos I have?
    – Ansell
    Dec 20 '11 at 4:13
  • Yes unfortunately so, but RAID10 is the ideal setup for a four-drive RAID array for both speed and fault tolerance. Two RAID0 arrays are doubling your already high chances of data loss. Also, unlike RAID5, it can be reliably be run with software RAID without the additional (although some may argue minor) parity calculation overhead. With a hardware controller + BBU it just gets even better as you can increase your write speeds further with write caching.
    – Garrett
    Dec 20 '11 at 4:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.