Jay Anderson
2008-Dec-10 16:51 UTC
[zfs-discuss] Changing casesensitivity for existing filesystems?
I tried this question in the CIFS forum and didn''t get any responses, but maybe it is more appropriate for this forum. I have many large zfs filesystems on Solaris 10 servers that I would like to upgrade to OpenSolaris so the filesystems can be shared using the CIFS Service (I''m currently using Samba). ZFS on the Solaris 10 installations don''t have some of the newer features such as the casesensitivity option. I would like to set casesensitivity to mixed, but I can''t see any way to do it without creating new filesystems and copying the data. Considering the amount of data and all the supporting snapshots this could become a major task. Any ideas or shortcuts to accomplish this would be very welcome. Thank you. -- This message posted from opensolaris.org
Tim
2008-Dec-10 17:40 UTC
[zfs-discuss] Changing casesensitivity for existing filesystems?
On Wed, Dec 10, 2008 at 10:51 AM, Jay Anderson <Jay.Anderson00 at gmail.com>wrote:> I tried this question in the CIFS forum and didn''t get any responses, but > maybe it is more appropriate for this forum. > > I have many large zfs filesystems on Solaris 10 servers that I would like > to upgrade to OpenSolaris so the filesystems can be shared using the CIFS > Service (I''m currently using Samba). ZFS on the Solaris 10 installations > don''t have some of the newer features such as the casesensitivity option. > > I would like to set casesensitivity to mixed, but I can''t see any way to do > it without creating new filesystems and copying the data. Considering the > amount of data and all the supporting snapshots this could become a major > task. > > Any ideas or shortcuts to accomplish this would be very welcome. > > Thank you. > -- >Why can''t you just upgrade zfs and change the pool setting? Why would you need to copy the data? --Tim -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20081210/a521a187/attachment.html>
Nicolas Williams
2008-Dec-10 17:46 UTC
[zfs-discuss] Changing casesensitivity for existing filesystems?
On Wed, Dec 10, 2008 at 11:40:16AM -0600, Tim wrote:> On Wed, Dec 10, 2008 at 10:51 AM, Jay Anderson <Jay.Anderson00 at gmail.com>wrote: > > I have many large zfs filesystems on Solaris 10 servers that I would like > > to upgrade to OpenSolaris so the filesystems can be shared using the CIFS > > Service (I''m currently using Samba). ZFS on the Solaris 10 installations > > don''t have some of the newer features such as the casesensitivity option.The casesensitivity ZFS dataset property, and everything else that''s associated with the Solaris SMB server, will NOT be backported to S10. That doesn''t mean you have to migrate your data though; see below.> > I would like to set casesensitivity to mixed, but I can''t see any way to do > > it without creating new filesystems and copying the data. Considering the > > amount of data and all the supporting snapshots this could become a major > > task.You don''t have to copy any data, just install OpenSolaris, upgrade your pools and set casesensitivity to your liking. Do note that some properties, like utf8only and normalization cannot be changed after a dataset is created.> Why can''t you just upgrade zfs and change the pool setting? Why would you > need to copy the data?Right, but keep in mind that Jay will have to move to OpenSolaris to get the casesensitivity property. Nico --
Jay Anderson
2008-Dec-10 19:13 UTC
[zfs-discuss] Changing casesensitivity for existing filesystems?
On Wed, Dec 10, 2008 at 11:46 AM, Nico wrote:> On Wed, Dec 10, 2008 at 10:51 AM, Jay Anderson wrote: > > I have many large zfs filesystems on Solaris 10 servers that I would like > > to upgrade to OpenSolaris so the filesystems can be shared using the CIFS > > Service (I''m currently using Samba). ZFS on the Solaris 10 installations > > don''t have some of the newer features such as the casesensitivity option. > > The casesensitivity ZFS dataset property, and everything else that''s > associated with the Solaris SMB server, will NOT be backported to S10. > That doesn''t mean you have to migrate your data though; see below.Yep, that''s why I''m planning to upgrade to OpenSolaris.> > I would like to set casesensitivity to mixed, but I can''t see any way to do > > it without creating new filesystems and copying the data. Considering the > > amount of data and all the supporting snapshots this could become a major > > task. > > You don''t have to copy any data, just install OpenSolaris, upgrade your > pools and set casesensitivity to your liking. Do note that some > properties, like utf8only and normalization cannot be changed after a > dataset is created.The casesensitivity option is just like utf8only and normalization, it can only be set at creation time. The result from attempting to change it on an existing filesystem: # zfs set casesensitivity=mixed pool0/data1 cannot set property for ''pool0/data1'': ''casesensitivity'' is readonly>From the ZFS Administration Guide (http://docs.sun.com/app/docs/doc/817-2271/6mhupg6lc?a=view#indexterm-319):Regardless of the casesensitivity property setting, the file system preserves the case of the name specified to create a file. This property cannot be changed after the file system is created. Thanks for any suggestions to help get around having to migrate the data. -- This message posted from opensolaris.org
Nicolas Williams
2008-Dec-10 19:49 UTC
[zfs-discuss] Changing casesensitivity for existing filesystems?
On Wed, Dec 10, 2008 at 11:13:21AM -0800, Jay Anderson wrote:> The casesensitivity option is just like utf8only and normalization, it > can only be set at creation time. The result from attempting to change > it on an existing filesystem: > > # zfs set casesensitivity=mixed pool0/data1 > cannot set property for ''pool0/data1'': ''casesensitivity'' is readonly > > >From the ZFS Administration Guide (http://docs.sun.com/app/docs/doc/817-2271/6mhupg6lc?a=view#indexterm-319):The manpage I looked at didn''t mention that, though it did for normalization and utf8only, so I foolishly stopped there. Sounds like a manpage bug. My apologies for the confusion. I would think only the casesensitivity=mixed should have to be set at creation time, that casesensitivity=insensitive could be set at any time. Hmmm. Nico --
dick hoogendijk
2008-Dec-10 20:48 UTC
[zfs-discuss] Changing casesensitivity for existing filesystems?
On Wed, 10 Dec 2008 11:13:21 PST Jay Anderson <Jay.Anderson00 at gmail.com> wrote:> Yep, that''s why I''m planning to upgrade to OpenSolaris.And do you think it really is stable/secure enough for a production server replacing S10? -- Dick Hoogendijk -- PGP/GnuPG key: 01D2433D + http://nagual.nl/ | SunOS sxce snv103 ++ + All that''s really worth doing is what we do for others (Lewis Carrol)
Tim Haley
2008-Dec-11 11:08 UTC
[zfs-discuss] Changing casesensitivity for existing filesystems?
Nicolas Williams wrote:> On Wed, Dec 10, 2008 at 11:13:21AM -0800, Jay Anderson wrote: >> The casesensitivity option is just like utf8only and normalization, it >> can only be set at creation time. The result from attempting to change >> it on an existing filesystem: >> >> # zfs set casesensitivity=mixed pool0/data1 >> cannot set property for ''pool0/data1'': ''casesensitivity'' is readonly >> >> >From the ZFS Administration Guide (http://docs.sun.com/app/docs/doc/817-2271/6mhupg6lc?a=view#indexterm-319): > > The manpage I looked at didn''t mention that, though it did for > normalization and utf8only, so I foolishly stopped there. Sounds like a > manpage bug. My apologies for the confusion. >The manpage reads: The following three properties cannot be changed after the file system is created, and therefore, should be set when the file system is created. If the properties are not set with the "zfs create" or "zpool create" commands, these pro- perties are inherited from the parent dataset. If the parent dataset lacks these properties due to having been created prior to these features being supported, the new file system will have the default values for these properties. casesensitivity = sensitive | insensitive | mixed ... normalization =none | formD | formKCf ... utf8only =on | off ... We reiterate that the property cannot be changed in the paragraphs describing the second two, perhaps we should do so for the first as well.> I would think only the casesensitivity=mixed should have to be set at > creation time, that casesensitivity=insensitive could be set at any > time. Hmmm. >We don''t allow this for a couple of reasons. If the file system was case-sensitive or mixed and you suddenly make it insensitive, you potentially create name conflicts: % ls Readme README readme if we make this case-insensitive all of sudden you''ve got two files that can no longer be looked up. The other reason is performance. Knowing beforehand that we need to track or disallow case conflicts helps us to optimize to keep lookups fast. -tim> Nico
Jay Anderson
2008-Dec-11 15:23 UTC
[zfs-discuss] Changing casesensitivity for existing filesystems?
> > I would think only the casesensitivity=mixed should have to be set at > > creation time, that casesensitivity=insensitive could be set at any > > time. Hmmm. > > > > We don''t allow this for a couple of reasons. If the file system was > case-sensitive or mixed and you suddenly make it insensitive, you > potentially create name conflicts: > > % ls > Readme README readme > > if we make this case-insensitive all of sudden you''ve got two files that > can no longer be looked up. > > The other reason is performance. Knowing beforehand that we need to > track or disallow case conflicts helps us to optimize to keep lookups fast. > > -tim >Thank you for the clarification, and the explanation. I can see there are serious problems with ever being able to go from case-sensitive or mixed to case-insensitive. However, to aid with migration from existing ZFS filesystems that don''t have the casesensitivity option to newer ZFS versions with the option it would be very helpful to have some kind of an optimization routine to allow changing from case-insensitive to mixed. This would make it much easier to transition from Samba to CIFS Server. I would much prefer to wait several hours for an optimization routine to run in converting from case-sensitive to mixed on a newly imported filesystem than to have to migrate the data to a new filesystem. Thank you. -- This message posted from opensolaris.org