You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by Indra Pramana <in...@sg.or.id> on 2013/08/04 08:11:39 UTC

DATA-DISK not mounted automatically?

Dear all,

I just realised that when users create Unix virtual machines through
CloudStack, the DATA-DISK is not mounted by default. Only the ROOT-DISK is
available when doing "df".

The users will need to fdisk/format and then mount the DATA-DISK manually.
Is that the case?

How can we configure CloudStack to automatically format and mount the
DATA-DISK during the provisioning of the virtual machine?

Looking forward to your reply, thank you.

Cheers.

RE: DATA-DISK not mounted automatically?

Posted by "Musayev, Ilya" <im...@webmd.net>.
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:dportiz@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: david@gnsa.us
> > Date: Sun, 4 Aug 2013 15:35:45 -0400
> > Subject: Re: DATA-DISK not mounted automatically?
> > To: users@cloudstack.apache.org
> > CC: aemneina@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
> 


RE: DATA-DISK not mounted automatically?

Posted by David Ortiz <dp...@outlook.com>.
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: david@gnsa.us
> Date: Sun, 4 Aug 2013 15:35:45 -0400
> Subject: Re: DATA-DISK not mounted automatically?
> To: users@cloudstack.apache.org
> CC: aemneina@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
 		 	   		  

Re: DATA-DISK not mounted automatically?

Posted by David Nalley <da...@gnsa.us>.
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

Re: DATA-DISK not mounted automatically?

Posted by Indra Pramana <in...@sg.or.id>.
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?

Thank you.



On Sun, Aug 4, 2013 at 2:31 PM, Ahmad Emneina <ae...@gmail.com> wrote:

> I use fstab to automatically mount data disks. I think the auto format and
> mount should contain logic to see if a partition and filesystem exist, if
> not format and mount. I personally don't go that far...
> On Aug 3, 2013 11:12 PM, "Indra Pramana" <in...@sg.or.id> wrote:
>
> > Dear all,
> >
> > I just realised that when users create Unix virtual machines through
> > CloudStack, the DATA-DISK is not mounted by default. Only the ROOT-DISK
> is
> > available when doing "df".
> >
> > The users will need to fdisk/format and then mount the DATA-DISK
> manually.
> > Is that the case?
> >
> > How can we configure CloudStack to automatically format and mount the
> > DATA-DISK during the provisioning of the virtual machine?
> >
> > Looking forward to your reply, thank you.
> >
> > Cheers.
> >
>

Re: DATA-DISK not mounted automatically?

Posted by Ahmad Emneina <ae...@gmail.com>.
I use fstab to automatically mount data disks. I think the auto format and
mount should contain logic to see if a partition and filesystem exist, if
not format and mount. I personally don't go that far...
On Aug 3, 2013 11:12 PM, "Indra Pramana" <in...@sg.or.id> wrote:

> Dear all,
>
> I just realised that when users create Unix virtual machines through
> CloudStack, the DATA-DISK is not mounted by default. Only the ROOT-DISK is
> available when doing "df".
>
> The users will need to fdisk/format and then mount the DATA-DISK manually.
> Is that the case?
>
> How can we configure CloudStack to automatically format and mount the
> DATA-DISK during the provisioning of the virtual machine?
>
> Looking forward to your reply, thank you.
>
> Cheers.
>