So 2 ways of addressing this issue 1) if you definitely always need secondary disk - which should be a typical cloud scenario, then I would create a script on init to do what David mentioned. Check if disk is partitioned and if not, partition and mount - add entry in fstab (I would also use LVM). 2) if you don't think secondary disk is a must to have and you would rely on root disk for the most part, then I would do the same as above, but except of defining it in fstab, I would use automount daemon instead - where partition is mounted on demand and if idle for predefined interval, unmounts.
Inject this script into your linux images and you should be good to go. Regards ilya > -----Original Message----- > From: David Ortiz [mailto:dpor...@outlook.com] > Sent: Monday, August 05, 2013 2:51 PM > To: users@cloudstack.apache.org > Subject: RE: DATA-DISK not mounted automatically? > > You could probably create a shell script that will check if the disk is > partitioned, and then partition and format if it is not. After that add the > script > to your template and set it to run on boot. Does that seem like a workable > solution to others on the list? > Thanks, Dave > > > From: da...@gnsa.us > > Date: Sun, 4 Aug 2013 15:35:45 -0400 > > Subject: Re: DATA-DISK not mounted automatically? > > To: users@cloudstack.apache.org > > CC: aemne...@gmail.com > > > > On Sun, Aug 4, 2013 at 2:49 AM, Indra Pramana <in...@sg.or.id> wrote: > > > Hi Ahmad, > > > > > > I am referring to newly created virtual machines. Not all end users > > > know how to use fdisk and modify fstab. Can I confirm that data-disk > > > not auto-mounted upon VM provisioning is the default behaviour of > CloudStack? > > > > > > > That is expected behavior. > > The additional data-disk will not yet be partioned or formatted any > > more than you sliding a new SATA/SAS disk into a machine would be > > formatted or partioned. > > > > Partion and create a filesystem on the disk first and then use the > > native operating system tools to tell it to mount on boot if need be. > > > > --David >