Hi, I recently installed OpenSoalris 200906 on a 10GB primary partition on my laptop. I noticed there wasn''t any option for customizing the slices inside the solaris partition. After installation, there was only a single slice (0) occupying the entire partition. Now the problem is that I need to set up a UFS slice for my development. Is there a way to shrink slice 0 (backing storage for the zpool) and make room for a new slice to be used for UFS? I also tried to create UFS on another primary DOS partition, but apparently only one Solaris partition is allowed on one disk. So that failed... Thanks! Yi Zhang
Casper.Dik at Sun.COM
2010-Feb-15 18:48 UTC
[zfs-discuss] Shrink the slice used for zpool?
>Hi, > >I recently installed OpenSoalris 200906 on a 10GB primary partition on >my laptop. I noticed there wasn''t any option for customizing the >slices inside the solaris partition. After installation, there was >only a single slice (0) occupying the entire partition. Now the >problem is that I need to set up a UFS slice for my development. Is >there a way to shrink slice 0 (backing storage for the zpool) and make >room for a new slice to be used for UFS? > >I also tried to create UFS on another primary DOS partition, but >apparently only one Solaris partition is allowed on one disk. So that >failed...Can you create a zvol and use that for ufs? Slow, but ... Casper
On Mon, Feb 15, 2010 at 1:48 PM, <Casper.Dik at sun.com> wrote:> >>Hi, >> >>I recently installed OpenSoalris 200906 on a 10GB primary partition on >>my laptop. I noticed there wasn''t any option for customizing the >>slices inside the solaris partition. After installation, there was >>only a single slice (0) occupying the entire partition. Now the >>problem is that I need to set up a UFS slice for my development. Is >>there a way to shrink slice 0 (backing storage for the zpool) and make >>room for a new slice to be used for UFS? >> >>I also tried to create UFS on another primary DOS partition, but >>apparently only one Solaris partition is allowed on one disk. So that >>failed... > > > Can you create a zvol and use that for ufs? ?Slow, but ... > > Casper > >Casper, thanks for the tip! Actually I''m not sure if this would work for me. I wanted to use directio to bypass the file system cache when reading/writing files. That''s why I chose UFS instead of ZFS. Now if I create UFS on top of zvol, I''m not sure if a call to directio() would actually do its work... Yi
On Feb 15, 2010, at 11:15 AM, Yi Zhang wrote:> On Mon, Feb 15, 2010 at 1:48 PM, <Casper.Dik at sun.com> wrote: >> >>> Hi, >>> >>> I recently installed OpenSoalris 200906 on a 10GB primary partition on >>> my laptop. I noticed there wasn''t any option for customizing the >>> slices inside the solaris partition. After installation, there was >>> only a single slice (0) occupying the entire partition. Now the >>> problem is that I need to set up a UFS slice for my development. Is >>> there a way to shrink slice 0 (backing storage for the zpool) and make >>> room for a new slice to be used for UFS? >>> >>> I also tried to create UFS on another primary DOS partition, but >>> apparently only one Solaris partition is allowed on one disk. So that >>> failed... >> >> >> Can you create a zvol and use that for ufs? Slow, but ... >> >> Casper >> >> > > Casper, thanks for the tip! Actually I''m not sure if this would work > for me. I wanted to use directio to bypass the file system cache when > reading/writing files. That''s why I chose UFS instead of ZFS. Now if I > create UFS on top of zvol, I''m not sure if a call to directio() would > actually do its work...zfs set primarycache=metadata filesystem -- richard
On 15/02/2010 19:15, Yi Zhang wrote:>> Can you create a zvol and use that for ufs? Slow, but ... >> >> Casper >> >> > > Casper, thanks for the tip! Actually I''m not sure if this would work > for me. I wanted to use directio to bypass the file system cache when > reading/writing files. That''s why I chose UFS instead of ZFS. Now if I > create UFS on top of zvol, I''m not sure if a call to directio() would > actually do its work...Why not just use ZFS and set the similar options on the ZFS dataset: zfs set primarycache=metadata <datasetname> That is a close approximation to the UFS feature of directio() for bypassing storing the data in the filesystem cache. -- Darren J Moffat
Thank you, Darren and Richard. I think this gives what I wanted. Yi On Mon, Feb 15, 2010 at 3:13 PM, Darren J Moffat <Darren.Moffat at sun.com> wrote:> On 15/02/2010 19:15, Yi Zhang wrote: >>> >>> Can you create a zvol and use that for ufs? ?Slow, but ... >>> >>> Casper >>> >>> >> >> Casper, thanks for the tip! Actually I''m not sure if this would work >> for me. I wanted to use directio to bypass the file system cache when >> reading/writing files. That''s why I chose UFS instead of ZFS. Now if I >> create UFS on top of zvol, I''m not sure if a call to directio() would >> actually do its work... > > Why not just use ZFS and set the similar options on the ZFS dataset: > ? ? ? ?zfs set primarycache=metadata <datasetname> > > That is a close approximation to the UFS feature of directio() for bypassing > storing the data in the filesystem cache. > > -- > Darren J Moffat >