View Full Version : Best practices for mounting placeholder volumes
Dmitry@Rivermine
08-01-2007, 10:15 AM
Hi, does anyone have any advice on how to be able to mount placeholder volumes on the appliances. Since the placeholder volumes do not specify filesystem type I see that it would be unwise to hardcode the mount commands to /etc/fstab.
So for example my class defines a placeholder volume of "data" that will be mounted on /data. The class will write the datafiles to that volume so that when I upgrade the class the data is not lost. But since the application volume can be created with ext3 or reiserfs my class has be able to dynamically figure out which filesystem the application defined.
The reason for this of course is that I'm currently working with ext3 filesystems but would like to switch to reiserfs in the future using the same appliance classes.
LeoKalev
08-01-2007, 10:55 AM
I see two possible approaches here:
(A) you can set the filesystem type to 'auto' in /etc/fstab. Although 'man mount' recommends against this, it appears to work reliably for most filesystem types.
(B) you can define a property on your appliance that specifies the file system type for the data volume. To have AppLogic automatically edit /etc/fstab and write the file system type into the correct place in the file, you have to 'instrument' the /etc/fstab file - see this page in the documentation: http://doc.3tera.net/AppLogic2/AdvADLPropertyMarkup.html
You also have to list /etc/fstab in the class definition as being an editable configuration file (you do this with the GUI editor, in Edit Class).
one word of warning on modifying /etc/fstab this way: there are programs that edit this file also (e.g. fstab-sync in RedHat); disable them to avoid interference.
PeterNic
08-01-2007, 05:18 PM
... and (C) mount the data volume explicitly in the startup scripts of the appliance.
I think (A) will work best; (B) and (C) are workarounds in case the distro in a particular appliance class is unable to autodetect the file system.
Version note: keep in mind full support for reiserfs was added in AppLogic 2.0.2; appliances in prior versions have used it but some additional steps -- like installing the reiserfs modules and utilities -- may be required to use reiserfs in appliances under AppLogic 1.2.14.
Pending bug report: we got a report that 'vol resize' does not work on reiserfs volumes in 2.0.2 beta. We are checking it; it will be resolved in the upcoming 2.0 production version of AppLogic. Update: the bug is now confirmed, referenced as "[Bug 1568] Product: Reiserfs is reported as a RAW volume", to be fixed in AppLogic 2.0 production release.
Regards,
-- Peter
vBulletin® v3.7.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.