Just want to verify, if I have say, 1 160GB disk, can I format it so that the first say 40GB is my main UFS parition with the base OS install, and then make the rest of the disk zfs? Or even better yet, for testing purposes make two 60GB partitions out of the rest of it and make them a *mirror*? Or do I have to give zfs the entire disk? This message posted from opensolaris.org
On 1/25/07, Tim Cook <tcook at datalink.com> wrote:> Just want to verify, if I have say, 1 160GB disk, can I format it so that the first say 40GB is my main UFS parition with the base OS install, and then make the rest of the disk zfs? Or even better yet, for testing purposes make two 60GB partitions out of the rest of it and make them a *mirror*? Or do I have to give zfs the entire disk?If you''re talking about slices, yes. (partitions). You can give zfs just a slice of the disk, while giving UFS another slice. You can mirror across slices (though performance will be sub optimal). Take note though, that giving zfs the entire disk gives a possible performance win, as zfs will only enable the write cache for the disk if it is given the entire disk. A caveat: giving the whole disk to a zfs zpool results in an EFI label being assigned: some motherboard BIOSes refuse to boot with a hard disk that has an EFI label. -- Regards, Jeremy
On 25/1/07 3:16, "Jeremy Teo" <white.wristband at gmail.com> wrote:> On 1/25/07, Tim Cook <tcook at datalink.com> wrote: >> Just want to verify, if I have say, 1 160GB disk, can I format it so that the >> first say 40GB is my main UFS parition with the base OS install, and then >> make the rest of the disk zfs? Or even better yet, for testing purposes make >> two 60GB partitions out of the rest of it and make them a *mirror*? Or do I >> have to give zfs the entire disk? > > If you''re talking about slices, yes. (partitions). You can give zfs > just a slice of the disk, while giving UFS another slice. You can > mirror across slices (though performance will be sub optimal).The zpool man page suggests that you can use a regular file as a backing store, though this is only really intended for experimental purposes. Cheers, Chris
Well, the system can only have one disk, so giving it the full disk isn''t really an option unless they''ve finally gotten the whole boot from a zfs disk figured out. This message posted from opensolaris.org
Tim Cook wrote:> Just want to verify, if I have say, 1 160GB disk, can I format it so that the first say 40GB is my main UFS parition with the base OS install, and then make the rest of the disk zfs? Or even better yet, for testing purposes make two 60GB partitions out of the rest of it and make them a *mirror*? Or do I have to give zfs the entire disk?yes you can do that and many of us do exactly that on our laptops. I have even done the two slices in the VTOC as sides of the ZFS mirror. Though on a 4200rpm disk that is REALLY bad for performance of writes :-) -- Darren J Moffat
I guess I should clarify what I''m doing. Essentially I''d like to have the / and swap on the first 60GB of the disk. Then use the remaining 100GB as a zfs partition to setup zones on. Obviously the snapshots are extremely useful in such a setup :) Does my plan sound feasible from both a usability and performance standpoint? This message posted from opensolaris.org
On 1/25/07, Tim Cook <tcook at datalink.com> wrote:> I guess I should clarify what I''m doing. > > Essentially I''d like to have the / and swap on the first 60GB of the disk. Then use the remaining 100GB as a zfs partition to setup zones on. Obviously the snapshots are extremely useful in such a setup :) > > Does my plan sound feasible from both a usability and performance standpoint?Yes, however 60GB for root/swap is probably overkill. My notebook''s setup: s0: 10GB -> root s1: 2GB -> swap s3: 10GB -> root s4: <the rest> -> ZFS (I use s0 and s3 for Live Upgrade) -- Eric Enright
Constantin Gonzalez Schmitz
2007-Jan-25 17:01 UTC
[zfs-discuss] Re: can I use zfs on just a partition?
Hi Tim,> Essentially I''d like to have the / and swap on the first 60GB of the disk. Then use the remaining 100GB as a zfs partition to setup zones on. Obviously the snapshots are extremely useful in such a setup :) > > Does my plan sound feasible from both a usability and performance standpoint?yes, it works, I do it on my laptop all the time: # format Searching for disks...done AVAILABLE DISK SELECTIONS: 0. c0d0 <DEFAULT cyl 48451 alt 2 hd 64 sec 63> /pci at 0,0/pci-ide at 14,1/ide at 0/cmdk at 0,0 Specify disk (enter its number): 0 selecting c0d0 Controller working list found [disk formatted, defect list found] Warning: Current Disk has mounted partitions. /dev/dsk/c0d0s0 is currently mounted on /. Please see umount(1M). /dev/dsk/c0d0s1 is currently used by swap. Please see swap(1M). /dev/dsk/c0d0s3 is part of active ZFS pool poolchen. Please see zpool(1M). /dev/dsk/c0d0s4 is in use for live upgrade /. Please see ludelete(1M). c0d0s5 is also free and can be used as a third live upgrade partition. My recommendation: Use at least 2 slices for the OS so you can enjoy live upgrade, one for swap and the rest for ZFS. Performance-wise, this is of course not optimal, but perfectly feasible. I have an Acer Ferrari 4000 which is known to have a slow disk, but it still works great for what I do (email, web, Solaris demos, presentations, occasional video). More complicated things are possible as well. The following blog entry: http://blogs.sun.com/solarium/entry/tetris_spielen_mit_zfs (sorry it''s german) ilustrates how my 4 disks at home are sliced in order to get OS partitions on multiple disks, Swap and as much ZFS space as possible at acceptable redundancy despite differently-sized disks. Check out the graphic in the above entry to see what I mean. Works great (but I had to use -f to zpool create :) ) and gives me enough performance for all my home-serving needs. Hope this helps, Constantin -- Constantin Gonzalez Sun Microsystems GmbH, Germany Platform Technology Group, Client Solutions http://www.sun.de/ Tel.: +49 89/4 60 08-25 91 http://blogs.sun.com/constantin/
Tim Cook wrote:> I guess I should clarify what I''m doing. > > Essentially I''d like to have the / and swap on the first 60GB of the disk. Then use the remaining 100GB as a zfs partition to setup zones on. Obviously the snapshots are extremely useful in such a setup :) > > Does my plan sound feasible from both a usability and performance standpoint? >That''s exactly how I''m running my ferrari laptop. Works like a charm. - Bart -- Bart Smaalders Solaris Kernel Performance barts at cyber.eng.sun.com http://blogs.sun.com/barts
Darren J Moffat
2007-Jan-25 17:46 UTC
[zfs-discuss] Re: can I use zfs on just a partition?
Tim Cook wrote:> I guess I should clarify what I''m doing. > > Essentially I''d like to have the / and swap on the first 60GB of the disk. Then use the remaining 100GB as a zfs partition to setup zones on. Obviously the snapshots are extremely useful in such a setup :) > > Does my plan sound feasible from both a usability and performance standpoint?That is exactly what I do on my laptop, with one exception. For me it isn''t just my zones on ZFS but also my home directory and my builds area (using zfs clones to quickly get a new mercurial repository is great!). -- Darren J Moffat
Brian Hechinger
2007-Jan-25 17:50 UTC
[zfs-discuss] Re: can I use zfs on just a partition?
On Thu, Jan 25, 2007 at 05:46:09PM +0000, Darren J Moffat wrote:> > > >Does my plan sound feasible from both a usability and performance > >standpoint? > > That is exactly what I do on my laptop, with one exception. For me it > isn''t just my zones on ZFS but also my home directory and my builds area > (using zfs clones to quickly get a new mercurial repository is great!).for me, /usr/local is on the ZFS portion of my desktop''s disk. I always do a snapshot before installing new software to it. It''s *great*. ;) -brian -- "The reason I don''t use Gnome: every single other window manager I know of is very powerfully extensible, where you can switch actions to different mouse buttons. Guess which one is not, because it might confuse the poor users? Here''s a hint: it''s not the small and fast one." --Linus
On Thu, 25 Jan 2007, Darren J Moffat wrote:> Tim Cook wrote: > > I guess I should clarify what I''m doing. > > > > Essentially I''d like to have the / and swap on the first 60GB of the > > disk. Then use the remaining 100GB as a zfs partition to setup zones > > on. Obviously the snapshots are extremely useful in such a setup :) > > > > Does my plan sound feasible from both a usability and performance standpoint?For a laptop scenario, where you don''t have any option to add a 2nd drive, I agree with Darren and others. But in any other usage scenario, I don''t think its a good idea. Perhaps you could post some details about your hardware environment and why its limited to a single disk drive? You understand that if ZFS detects any data corruption and you don''t have any designed-in data redundancy, ZFS will make the pool unavailable and you are SOL.> That is exactly what I do on my laptop, with one exception. For me it > isn''t just my zones on ZFS but also my home directory and my builds area > (using zfs clones to quickly get a new mercurial repository is great!). > > --Regards, Al Hopper Logical Approach Inc, Plano, TX. al at logical-approach.com Voice: 972.379.2133 Fax: 972.379.2134 Timezone: US CDT OpenSolaris.Org Community Advisory Board (CAB) Member - Apr 2005 OpenSolaris Governing Board (OGB) Member - Feb 2006
When you do the initial install, how do you do the slicing? Just create like: / 10G swap 2G /altroot 10G /zfs restofdisk Or do you just create the first three slices and leave the rest of the disk untouched? I understand the concept at this point, just trying to explain to a third party exactly what they need to do to prep the system disk for me :) This message posted from opensolaris.org
It''s a third party host, and I''ve been informed the cases they use only have room available for one hard drive. It''s definitely not my first choice, but it''s the only option I have at this point. Tim Cook -----Original Message----- From: Al Hopper [mailto:al at logical-approach.com] Sent: Thursday, January 25, 2007 11:53 AM To: Tim Cook Cc: zfs-discuss at opensolaris.org Subject: Re: [zfs-discuss] Re: can I use zfs on just a partition? On Thu, 25 Jan 2007, Darren J Moffat wrote:> Tim Cook wrote: > > I guess I should clarify what I''m doing. > > > > Essentially I''d like to have the / and swap on the first 60GB of the > > disk. Then use the remaining 100GB as a zfs partition to setupzones> > on. Obviously the snapshots are extremely useful in such a setup :) > > > > Does my plan sound feasible from both a usability and performancestandpoint? For a laptop scenario, where you don''t have any option to add a 2nd drive, I agree with Darren and others. But in any other usage scenario, I don''t think its a good idea. Perhaps you could post some details about your hardware environment and why its limited to a single disk drive? You understand that if ZFS detects any data corruption and you don''t have any designed-in data redundancy, ZFS will make the pool unavailable and you are SOL.> That is exactly what I do on my laptop, with one exception. For me it > isn''t just my zones on ZFS but also my home directory and my buildsarea> (using zfs clones to quickly get a new mercurial repository isgreat!).> > --Regards, Al Hopper Logical Approach Inc, Plano, TX. al at logical-approach.com Voice: 972.379.2133 Fax: 972.379.2134 Timezone: US CDT OpenSolaris.Org Community Advisory Board (CAB) Member - Apr 2005 OpenSolaris Governing Board (OGB) Member - Feb 2006
Robert Milkowski
2007-Jan-25 17:56 UTC
[zfs-discuss] Re: can I use zfs on just a partition?
Hello Tim, Thursday, January 25, 2007, 4:44:34 PM, you wrote: TC> I guess I should clarify what I''m doing. TC> Essentially I''d like to have the / and swap on the first 60GB of TC> the disk. Then use the remaining 100GB as a zfs partition to TC> setup zones on. Obviously the snapshots are extremely useful in such a setup :) TC> Does my plan sound feasible from both a usability and performance standpoint? Well, I''m doing very similar config in a production (to complete other responses about their laptop usage). It works great, no problems and usability... well, that''s probably most important reason in such configs. -- Best regards, Robert mailto:rmilkowski at task.gda.pl http://milek.blogspot.com
I''m thinking that if that is the case I''ll just be dd''ing to a new disk and continuing on with it. Obviously this is not the preferred solution, but unless they''re willing to let me send my own hardware, I don''t have much of a choice. This message posted from opensolaris.org
Robert Milkowski
2007-Jan-25 18:30 UTC
[zfs-discuss] Re: can I use zfs on just a partition?
Hello Al, Thursday, January 25, 2007, 6:52:58 PM, you wrote: AH> On Thu, 25 Jan 2007, Darren J Moffat wrote:>> Tim Cook wrote: >> > I guess I should clarify what I''m doing. >> > >> > Essentially I''d like to have the / and swap on the first 60GB of the >> > disk. Then use the remaining 100GB as a zfs partition to setup zones >> > on. Obviously the snapshots are extremely useful in such a setup :) >> > >> > Does my plan sound feasible from both a usability and performance standpoint?AH> For a laptop scenario, where you don''t have any option to add a 2nd drive, AH> I agree with Darren and others. But in any other usage scenario, I don''t AH> think its a good idea. Perhaps you could post some details about your AH> hardware environment and why its limited to a single disk drive? AH> You understand that if ZFS detects any data corruption and you don''t have AH> any designed-in data redundancy, ZFS will make the pool unavailable and AH> you are SOL. It''s not true. Metadata will still be in 2 and 3 copies (2 for fs metadata and 3 for pool metadata) spread on disks with checksums. So when he will enocunter any problems to only part of a disk he should be ok when it comes to pool/fs consistency and only user data will be affected. However he should be able to determine which files are affected (with zpool status) and just delete them. Few days ago a fix was integrated so zpool status should show actual file names instead of just inode. -- Best regards, Robert mailto:rmilkowski at task.gda.pl http://milek.blogspot.com
Tim Cook wrote:> I guess I should clarify what I''m doing. > > Essentially I''d like to have the / and swap on the first 60GB of the disk. Then use the remaining 100GB as a zfs partition to setup zones on. Obviously the snapshots are extremely useful in such a setup :) > > Does my plan sound feasible from both a usability and performance standpoint? >Yes, but depending on what you intend to do with zones, you might get bit by this: 6356600 - zfs datasets can''t be used to provide space for zone roots However, you actually CAN use zfs datasets for zone roots. Works fine. The reason for the bug is that patching and upgrade don''t work yet on zone roots that are in zfs datasets, so we don''t recommend them for production use. However, since it sounds like you''re just setting this up for testing, this shouldn''t be a problem for you. - Lori Alt
On Thu, 25 Jan 2007, Robert Milkowski wrote:> Hello Al, > > Thursday, January 25, 2007, 6:52:58 PM, you wrote: > > AH> On Thu, 25 Jan 2007, Darren J Moffat wrote: > > >> Tim Cook wrote: > >> > I guess I should clarify what I''m doing. > >> > > >> > Essentially I''d like to have the / and swap on the first 60GB of the > >> > disk. Then use the remaining 100GB as a zfs partition to setup zones > >> > on. Obviously the snapshots are extremely useful in such a setup :) > >> > > >> > Does my plan sound feasible from both a usability and performance standpoint? > > AH> For a laptop scenario, where you don''t have any option to add a 2nd drive, > AH> I agree with Darren and others. But in any other usage scenario, I don''t > AH> think its a good idea. Perhaps you could post some details about your > AH> hardware environment and why its limited to a single disk drive? > > AH> You understand that if ZFS detects any data corruption and you don''t have > AH> any designed-in data redundancy, ZFS will make the pool unavailable and > AH> you are SOL. > > It''s not true. Metadata will still be in 2 and 3 copies (2 for fs > metadata and 3 for pool metadata) spread on disks with checksums. So > when he will enocunter any problems to only part of a disk he should > be ok when it comes to pool/fs consistency and only user data will be > affected. However he should be able to determine which files are > affected (with zpool status) and just delete them. Few days ago a fix > was integrated so zpool status should show actual file names instead > of just inode.Thanks for the correction Robert. Regards, Al Hopper Logical Approach Inc, Plano, TX. al at logical-approach.com Voice: 972.379.2133 Fax: 972.379.2134 Timezone: US CDT OpenSolaris.Org Community Advisory Board (CAB) Member - Apr 2005 OpenSolaris Governing Board (OGB) Member - Feb 2006
does liveupgrade work fine if the zones are on a UFS partition? This message posted from opensolaris.org
Tim Cook wrote:> does liveupgrade work fine if the zones are on a UFS partition? > > >Starting with build 53 (or was it 54?), yes. Liveupgrade of systems with zones is now supported. Lori
Tim Cook
2007-Jan-25 20:52 UTC
[zfs-discuss] Re: Re: Re: can I use zfs on just a partition?
Thank you lori! Guess I''ll take that route :) The final solution is actually a production environment. For now I was going to stage, but it looks like it''s not possible at this point in time. This message posted from opensolaris.org
On 25-Jan-07, at 3:56 PM, Robert Milkowski wrote:> Hello Tim, > > Thursday, January 25, 2007, 4:44:34 PM, you wrote: > > TC> I guess I should clarify what I''m doing. > > TC> Essentially I''d like to have the / and swap on the first 60GB of > TC> the disk. Then use the remaining 100GB as a zfs partition to > TC> setup zones on. Obviously the snapshots are extremely useful > in such a setup :) > > TC> Does my plan sound feasible from both a usability and > performance standpoint? > > > Well, I''m doing very similar config in a production (to complete other > responses about their laptop usage).Works fine for me on a production system too (root + swap slices SVM, big slice ZFS) but mirrored to 2nd disk with same layout. --Toby> > It works great, no problems and usability... well, that''s probably > most important reason in such configs. > > > -- > Best regards, > Robert mailto:rmilkowski at task.gda.pl > http://milek.blogspot.com > > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Robert Milkowski
2007-Jan-25 22:01 UTC
[zfs-discuss] Re: can I use zfs on just a partition?
Hello Toby, Thursday, January 25, 2007, 10:38:16 PM, you wrote: TT> On 25-Jan-07, at 3:56 PM, Robert Milkowski wrote:>> Hello Tim, >> >> Thursday, January 25, 2007, 4:44:34 PM, you wrote: >> >> TC> I guess I should clarify what I''m doing. >> >> TC> Essentially I''d like to have the / and swap on the first 60GB of >> TC> the disk. Then use the remaining 100GB as a zfs partition to >> TC> setup zones on. Obviously the snapshots are extremely useful >> in such a setup :) >> >> TC> Does my plan sound feasible from both a usability and >> performance standpoint? >> >> >> Well, I''m doing very similar config in a production (to complete other >> responses about their laptop usage).TT> Works fine for me on a production system too (root + swap slices SVM, TT> big slice ZFS) but mirrored to 2nd disk with same layout. TT> --Toby>> >> It works great, no problems and usability... well, that''s probably >> most important reason in such configs.Of course mirrors :) -- Best regards, Robert mailto:rmilkowski at task.gda.pl http://milek.blogspot.com
Constantin Gonzalez Schmitz
2007-Jan-26 09:06 UTC
[zfs-discuss] Re: Re: can I use zfs on just a partition?
Hi,> When you do the initial install, how do you do the slicing? > > Just create like: > / 10G > swap 2G > /altroot 10G > /zfs restofdiskyes.> Or do you just create the first three slices and leave the rest of the > disk untouched? I understand the concept at this point, just trying to > explain to a third party exactly what they need to do to prep the system > disk for me :)No. You need to be able to tell ZFS what to use. Hence, if your pool is created at the slice level, you need to create a slice for it. So the above is the way to go. And yes, you only should do this on laptos and other machines where you only have 1 disk or are otherwise very disk-limited :). Best regards, Constantin -- Constantin Gonzalez Sun Microsystems GmbH, Germany Platform Technology Group, Client Solutions http://www.sun.de/ Tel.: +49 89/4 60 08-25 91 http://blogs.sun.com/constantin/
> Take note though, that giving zfs the entire disk gives a possible > performance win, as zfs will only enable the write cache for the disk > if it is given the entire disk.really? why this? is this tuneable somehow/somewhere? can i enabyle writecache if only using a dedicated partition ? This message posted from opensolaris.org
Casper.Dik at Sun.COM
2007-Jan-28 12:53 UTC
[zfs-discuss] Re: can I use zfs on just a partition?
>> Take note though, that giving zfs the entire disk gives a possible >> performance win, as zfs will only enable the write cache for the disk >> if it is given the entire disk. > >really? >why this?In the old days, Sun never enabled the write cache on devices because of reliability issues. (Sun SCSI disks were shipped with caches disabled; but the OS never bothered to change the caching behaviour; the behaviour on SCSI drives is persistent. On ata drives, the drive cache was specifically disabled (the behaviour is not persistent and drives default to write cache on) This behaviour was changed under competetive pressure for sata disks; they now default to write cache on; set using the "sata:sata_write_cache" variable The change came about with ZFS and the addition of a mechanism to flush the write cache (ZFS needs this to guarantee transactional safety)(>is this tuneable somehow/somewhere? can i enabyle writecache if only using a dedicated partition ?If does put the additional data at some what of a risk; not really for swap but perhaps not nice for UFS. Casper
Brian Hechinger
2007-Jan-29 14:04 UTC
[zfs-discuss] Re: can I use zfs on just a partition?
On Sun, Jan 28, 2007 at 01:53:04PM +0100, Casper.Dik at Sun.COM wrote:> > >is this tuneable somehow/somewhere? can i enabyle writecache if only using a dedicated partition ? > > If does put the additional data at some what of a risk; not really > for swap but perhaps not nice for UFS.How about two partitions used in two different ZPOOLs? once ZFS boot comes along, I''m sure RAIDZ(2) won''t be supported as a boot device? If that''s the case, I wouldn''t mind splitting the disks into a mirrored OS portion and a RAIDZ data portion (think system with 3 or 4 disks). -brian -- "The reason I don''t use Gnome: every single other window manager I know of is very powerfully extensible, where you can switch actions to different mouse buttons. Guess which one is not, because it might confuse the poor users? Here''s a hint: it''s not the small and fast one." --Linus