# How do I build a tiered storage NAS?  Is it even possible?

## DingbatCA

I have a bunch of VM's running under Xen, all using my NAS as their local storage.  Each VM's root disk is mounted over NFS. When ever I try to perform a large operation, like `emerge -uDN world`across all VM's,  the NAS slows to a crawl.  Watching the performance on the NAS, it is VERY clear the disks are the bottle neck.  CPU and network never go above 10%.  The hard drive access light is on, solid.  The NAS has 4, 1.5TB 5900RPM disks, ya, I know they are slow. I am using software raid 6 with an XFS file system on top.  The NAS's other hardware is good, AMD dual core 5050e, and 4GB ram. 

Would it be possible to setup tiered storage inside the NAS?  Something like a Ram drive --> SSD RAID --> HDD RAID? All presented as a single unified NFS export?  Or am I way off the deep end?

----------

## NeddySeagoon

DingbatCA,

Build on one VM and make it save binary packages. 

Share the packages folder across all VMs then do emerge -K <whatever> on the other VMs.

This emerge will fail if the binaries can't be found.  Your NAS problem is all the HDD seeks as the VMs all try to get a lot of disk bandwith.

How much RAM does each VM have?

Putting /var/tmp/portage into shmfs will take the pressure off the NAS and the network, provide you have enough RAM.

----------

## DingbatCA

The binary packages is great, and will be easy to setup.

I have lots of RAM, 4GB per guest, and shmfs is easy.

It there no way to do tiered storage at a home price tag?

----------

## Ant P.

/usr/src/linux/Documentation/filesystems/caching/cachefiles.txt is probably what you want.

----------

## DingbatCA

cache looks good, it will take me some time to set that up. Thanks!

----------

