Arjun YK
2011-Apr-06 13:59 UTC
[zfs-discuss] Best practice for boot partition layout in ZFS
Hi, I am trying to use ZFS for boot, and kind of confused about how the boot paritions like /var to be layed out. With old UFS, we create /var as sepearate filesystem to avoid various logs filling up the / filesystem With ZFS, during the OS install it gives the option to "Put /var on a separate dataset", but no option is given to set quota. May be, others set quota manually. So, I am trying to understand what''s the best practice for /var in ZFS. Is that exactly same as in UFS or is there anything different ? Could someone share some thoughts ? Thanks Arjun -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20110406/ee6d79ee/attachment.html>
Lori Alt
2011-Apr-06 14:50 UTC
[zfs-discuss] Best practice for boot partition layout in ZFS
On 04/ 6/11 07:59 AM, Arjun YK wrote:> Hi, > > I am trying to use ZFS for boot, and kind of confused about how the > boot paritions like /var to be layed out. > > With old UFS, we create /var as sepearate filesystem to avoid various > logs filling up the / filesystemI believe that creating /var as a separate file system was a common practice, but not a universal one. It really depended on the environment and local requirements.> > With ZFS, during the OS install it gives the option to "Put /var on a > separate dataset", but no option is given to set quota. May be, others > set quota manually.Having a separate /var dataset gives you the option of setting a quota on it later. That''s why we provided the option. It was a way of enabling administrators to get the same effect as having a separate /var slice did with ufs. Administrators can choose to use it or not, depending on local requirements.> > So, I am trying to understand what''s the best practice for /var in > ZFS. Is that exactly same as in UFS or is there anything different ?I''m not sure there''s a defined "best practice". Maybe someone else can answer that question. My guess is that in environments where, before, a separate ufs /var slice was used, a separate zfs /var dataset with a quota might now be appropriate. Lori> > Could someone share some thoughts ? > > > Thanks > Arjun > > > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20110406/969ad808/attachment.html>
Erik Trimble
2011-Apr-06 15:08 UTC
[zfs-discuss] Best practice for boot partition layout in ZFS
On 4/6/2011 7:50 AM, Lori Alt wrote:> On 04/ 6/11 07:59 AM, Arjun YK wrote: >> Hi, >> >> I am trying to use ZFS for boot, and kind of confused about how the >> boot paritions like /var to be layed out. >> >> With old UFS, we create /var as sepearate filesystem to avoid various >> logs filling up the / filesystem > > I believe that creating /var as a separate file system was a common > practice, but not a universal one. It really depended on the > environment and local requirements. > >> >> With ZFS, during the OS install it gives the option to "Put /var on a >> separate dataset", but no option is given to set quota. May be, >> others set quota manually. > > Having a separate /var dataset gives you the option of setting a quota > on it later. That''s why we provided the option. It was a way of > enabling administrators to get the same effect as having a separate > /var slice did with ufs. Administrators can choose to use it or not, > depending on local requirements. > >> >> So, I am trying to understand what''s the best practice for /var in >> ZFS. Is that exactly same as in UFS or is there anything different ? > > I''m not sure there''s a defined "best practice". Maybe someone else > can answer that question. My guess is that in environments where, > before, a separate ufs /var slice was used, a separate zfs /var > dataset with a quota might now be appropriate. > > Lori > > >> >> Could someone share some thoughts ? >> >> >> Thanks >> Arjun >>Traditionally, the reason for a separate /var was one of two major items: (a) /var was writable, and / wasn''t - this was typical of diskless or minimal local-disk configurations. Modern packaging systems are making this kind of configuration increasingly difficult. (b) /var held a substantial amount of data, which needed to be handled separately from / - mail and news servers are a classic example For typical machines nowdays, with large root disks, there is very little chance of /var suddenly exploding and filling / (the classic example of being screwed... <wink>). Outside of the above two cases, about the only other place I can see that having /var separate is a good idea is for certain test machines, where you expect frequent memory dumps (in /var/crash) - if you have a large amount of RAM, you''ll need a lot of disk space, so it might be good to limit /var in this case by making it a separate dataset. -- Erik Trimble Java System Support Mailstop: usca22-123 Phone: x17195 Santa Clara, CA -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20110406/2f8f33ad/attachment-0001.html>
Gary Mills
2011-Apr-06 15:29 UTC
[zfs-discuss] Best practice for boot partition layout in ZFS
On Wed, Apr 06, 2011 at 08:08:06AM -0700, Erik Trimble wrote:> On 4/6/2011 7:50 AM, Lori Alt wrote: > On 04/ 6/11 07:59 AM, Arjun YK wrote: > > I''m not sure there''s a defined "best practice". Maybe someone else > can answer that question. My guess is that in environments where, > before, a separate ufs /var slice was used, a separate zfs /var > dataset with a quota might now be appropriate. > Lori > > Traditionally, the reason for a separate /var was one of two major > items: > (a) /var was writable, and / wasn''t - this was typical of diskless or > minimal local-disk configurations. Modern packaging systems are making > this kind of configuration increasingly difficult. > (b) /var held a substantial amount of data, which needed to be handled > separately from / - mail and news servers are a classic example > For typical machines nowdays, with large root disks, there is very > little chance of /var suddenly exploding and filling / (the classic > example of being screwed... <wink>). Outside of the above two cases, > about the only other place I can see that having /var separate is a > good idea is for certain test machines, where you expect frequent > memory dumps (in /var/crash) - if you have a large amount of RAM, > you''ll need a lot of disk space, so it might be good to limit /var in > this case by making it a separate dataset.People forget (c), the ability to set different filesystem options on /var. You might want to have `setuid=off'' for improved security, for example. -- -Gary Mills- -Unix Group- -Computer and Network Services-
Torrey McMahon
2011-Apr-06 15:32 UTC
[zfs-discuss] Best practice for boot partition layout in ZFS
On 4/6/2011 11:08 AM, Erik Trimble wrote:> Traditionally, the reason for a separate /var was one of two major items: > > (a) /var was writable, and / wasn''t - this was typical of diskless or > minimal local-disk configurations. Modern packaging systems are making > this kind of configuration increasingly difficult. > > (b) /var held a substantial amount of data, which needed to be handled > separately from / - mail and news servers are a classic example > > > For typical machines nowdays, with large root disks, there is very > little chance of /var suddenly exploding and filling / (the classic > example of being screwed... <wink>). Outside of the above two cases, > about the only other place I can see that having /var separate is a > good idea is for certain test machines, where you expect frequent > memory dumps (in /var/crash) - if you have a large amount of RAM, > you''ll need a lot of disk space, so it might be good to limit /var in > this case by making it a separate dataset.Some more info ala (b) - The "something filled up the root fs and the box crashed" problem was fixed for awhile ago. It''s still a drag cleaning up an errant process that is filling up a file system but it shouldn''t crash/panic anymore. However, old habits die hard, especially at government sites where the rules require a papal bull to be changed, so I think the option was left to keep folks happy more than any practical reason. I''m sure someone has a really good reason to keep /var separated but those cases are fewer and far between than I saw 10 years ago.
David Magda
2011-Apr-06 16:29 UTC
[zfs-discuss] Best practice for boot partition layout in ZFS
On Wed, April 6, 2011 11:29, Gary Mills wrote:> People forget (c), the ability to set different filesystem options on > /var. You might want to have `setuid=off'' for improved security, for > example.Or better yet: exec=off,devices=off. Another handy one could be "compression=on" (or a even "gzip-[1-9]").
Linder, Doug
2011-Apr-06 19:01 UTC
[zfs-discuss] Best practice for boot partition layout in ZFS
Torrey Minton wrote:> I''m sure someone has a really good reason to keep /var separated but those cases are fewer and > far between than I saw 10 years ago.I agree that the causes and repercussions are less now than they were a long time ago. But /var still can and sometimes does fill up, and it is kind of handy to have quotas and separate filesystem settings and so on. I guess there''s no overall crying reason to use a separate /var, but there''s always this argument: it can''t hurt anything. Especially with ZFS. In the old days if /var was a separate partition then you risked making it too big or too small. But given the flexibility of ZFS, I think the question is really "is there any reason *not* to put /var on a separate ZFS filesystem?" Doug Linder ---------- Learn more about Merchant Link at www.merchantlink.com. THIS MESSAGE IS CONFIDENTIAL. This e-mail message and any attachments are proprietary and confidential information intended only for the use of the recipient(s) named above. If you are not the intended recipient, you may not print, distribute, or copy this message or any attachments. If you have received this communication in error, please notify the sender by return e-mail and delete this message and any attachments from your computer.
Richard Elling
2011-Apr-06 19:05 UTC
[zfs-discuss] Best practice for boot partition layout in ZFS
On Apr 6, 2011, at 12:01 PM, Linder, Doug wrote:> Torrey Minton wrote: > >> I''m sure someone has a really good reason to keep /var separated but those cases are fewer and > far between than I saw 10 years ago. > > I agree that the causes and repercussions are less now than they were a long time ago. But /var still can and sometimes does fill up, and it is kind of handy to have quotas and separate filesystem settings and so on. > > I guess there''s no overall crying reason to use a separate /var, but there''s always this argument: it can''t hurt anything. Especially with ZFS. In the old days if /var was a separate partition then you risked making it too big or too small. But given the flexibility of ZFS, I think the question is really "is there any reason *not* to put /var on a separate ZFS filesystem?"Yes. For backup/restore the unit of management is file system. More file systems results in more complicated backup/restore that increases RTO and costs. This was always the Achille''s heel of separate /var. -- richard
sanjay nadkarni
2011-Apr-07 06:51 UTC
[zfs-discuss] Best practice for boot partition layout in ZFS
On 04/ 6/11 01:05 PM, Richard Elling wrote:> On Apr 6, 2011, at 12:01 PM, Linder, Doug wrote: > >> Torrey Minton wrote: >> >>> I''m sure someone has a really good reason to keep /var separated but those cases are fewer and> far between than I saw 10 years ago. >> I agree that the causes and repercussions are less now than they were a long time ago. But /var still can and sometimes does fill up, and it is kind of handy to have quotas and separate filesystem settings and so on. >> >> I guess there''s no overall crying reason to use a separate /var, but there''s always this argument: it can''t hurt anything. Especially with ZFS. In the old days if /var was a separate partition then you risked making it too big or too small. But given the flexibility of ZFS, I think the question is really "is there any reason *not* to put /var on a separate ZFS filesystem?" > Yes. For backup/restore the unit of management is file system. More file systems > results in more complicated backup/restore that increases RTO and costs. This was > always the Achille''s heel of separate /var./var typically contains instance specific and instance shared data. Common examples of data that is shared between boot environments are mail and (if you have an install server), /var/ai. It may also be desirable for non-global zones to share portions of /var. I had posted a proposal to have a shared /var on caiman-discuss a while back. Many users responded and we are evaluating the feedback. -Sanjay> -- richard > > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss