PDA

View Full Version : failed to alloc application: one or more resources in use


jonesy
01-10-2008, 02:28 PM
Hi,

I got the error message in the title this morning while trying to restart my application (provisioned from LampCluster_1_1_1_1). The last thing I did before this failure to start was I added a LINUX5 appliance, branched the class, added a placeholder volume and marked it as 'shared', but *not* read-only, created a User Volume and mapped that volume to an app volume, and connected the PS8 switch to the new appliance.

The volume is also mounted read-only by all of the web servers in the application. The intent was to make the LINUX5 appliance one that could be more tightly secured, but that developers could use to gain write access to the content volume mounted by the web servers. It also keeps them off of the web servers proper :)

What I've done so far to troubleshoot is I marked the LINUX5 appliance as 'standby', started the app (it started just fine with LINUX5 on standby), and then tried to do a 'component start main.adm' (which is the name of my LINUX5 appliance). Here's the error I got:

Jan 10 08:37:32 BRZ-VPDC-BLAH-BLAH applogic: [66583:error s:70]: myapp: vol.srv4.myapp.main.adm:myapp.user.content: failed to create mount
Jan 10 08:37:32 BRZ-VPDC-BLAH-BLAH applogic: [66568:error s:70]: myapp:main.adm: failed to allocate resource for component

So, the last time I went through the process of creating placeholder volumes, I was told that I needed to create a mount point on the machine that would mount the volume, and then edit /etc/fstab as appropriate. When I got the above message, I shut everything back down, removed any notion of the volume mount, started everything back up, logged into main.adm, created the mount point and edited /etc/fstab, and tried to start back up, but got the same exact issue.

Am I doing something wrong? Why is it failing to "create mount"? What exactly does that mean? The mount is already created and mounted on 4 other machines, so it's clearly not corrupted or something. Is it illegal to mount a volume read-write on one machine and read-only on another?

Thanks for any clues.

jonesy
01-10-2008, 02:34 PM
Crap. I just read this in the docs:

"don't make a volume shared unless it is also read-only (shared r/w access will corrupt the filesystem) "

So my question is different then. How do I create a content directory that is read-only by the web servers, but read-write by a single administrative box, *WITHOUT* using a network mount (NFS/CIFS)? I'd like to remove the NAS as a possible point of failure in the application.

If the volume can only be written from a single place, how is it being corrupted?
Thanks again.

Jsmart
01-15-2008, 01:19 AM
This is really not supported in the way you are asking by the LINUX operating system, this is not just a limitation in AppLogic.

Lets start with talking about operating systems and filesystems. When an operating system mounts a filesystem it reads the partition or file allocation table to determine what is there. When the operating system makes a change to that filesystem it updates that table and refreshes.

If you mount that same block level device by multiple operating systems there is nothing to tell all of the operating systems a change has occurred. therefore as your "master" appliance writes new files to that block device none of the other operating systems that have it mounted will even see any changes unless you reboot or remount the block device.

This is why you need a network protocol such as NFS or CIFS instead of mounting this as a block device on multiple operating systems, the operating system can get updates from the network stack so that is sees the changed file structure.

You can very easily see this if you create an NBD device and mount it to 2 different servers on the network and write to it from one and you will clearly see that the other does not see the change.

--Jessie

jonesy
01-15-2008, 01:23 AM
Got it. Thanks, Jessie.

JeremySuo
01-15-2008, 04:44 AM
You could use some sort of filesystem replication service, FAM, IMON, rsync, rdiff, svn, cvs etc to manage the content on the web servers from the admin server. Create scripts that automatically update the web hosts via svn + ssh keys whenever a change is found. This would allow you to eliminate the NAS and have one master host that controls all changes and then 'pushes' them out to the other nodes.

Keeping the content in a SVN / CVS repo also allows you to revert to earlier copies if needed.

Thanks,

Jeremy