On Thu, Feb 25, 2010 at 06:13:12PM +0100, Daniel wrote: > On Thu, Feb 25, 2010 at 6:05 PM, Luke Kanies <[email protected]> wrote: > > On Feb 25, 2010, at 12:13 AM, Marcin Owsiany wrote: > > > >> On Wed, Feb 24, 2010 at 09:24:55AM -0800, Luke Kanies wrote: > >>> > >>> Or should we maybe skip the filesystem type entirely and just initialize > >>> the volume as a given filesystem when the volume itself is created? > >>> E.g., something like: > >>> > >>> logical_volume { foo: vg => bar, fs => ext3, ensure => present } > >>> > >>> So when you create the lv, you initialize the fs, but otherwise you > >>> don't mess with it. > >> > >> Makes sense, although you should not get rid of the FS type. It will > >> still be useful for changing filesystem type (including online migration > >> between compatible filesystems like ext2->ext3). > > > > Is there, then, a consistent, safe way to determine the filesystem type? > > Maybe file i another option can help. > > # file -s /dev/mapper/rootvg-tmplv > /dev/mapper/rootvg-tmplv: ReiserFS V3.6 block size 4096 (mounted or > unclean) num blocks 128000 r5 hash
That's also approximately the method I used in my provider for the filesystem type. > I'm not sure if this works when the superblock is corrupt. Maybe i can > do some testing on this subject I'm not sure it matters. There could always be a situation where your filesystem is broken enough for file/mount/kernel to not be able to recognize it, but for the data to still be in a recoverable state (at least partially). The point is that we don't want puppet to do anything harmful (like recreate the filesystem) in that case. Then again I don't know if there is anything that you can do to a filesystem without potentially harming it.. -- Marcin Owsiany <[email protected]> http://marcin.owsiany.pl/ GnuPG: 1024D/60F41216 FE67 DA2D 0ACA FC5E 3F75 D6F6 3A0D 8AA0 60F4 1216 "Every program in development at MIT expands until it can read mail." -- Unknown -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.
