Hi, I have the following partions on my laptop, Inspiron 6000, from fdisk: 1 Other OS 0 11 12 0 2 EXT LBA 12 2561 2550 26 3 Active Solaris2 2562 9728 7167 74 First one is for Dell utilities. Second one is NTFS and the third is ZFS. I am currently using OpenSolaris 2009.06 installed on the partition 3#. When I installed OpenSolaris I kept the 2# just in case I wanted also to install Windows, but I have realized I don''t need it nevermore! So, I would like to merge 2# and 3# to get more disk space in OpenSolaris. Is it possible to eliminate the NTFS partition and add it to the ZFS partition? Thanks in advance and regards, Julio -- This message posted from opensolaris.org
Cindy Swearingen
2009-Oct-13 14:08 UTC
[zfs-discuss] How to resize ZFS partion or add a new one?
Hi-- Unfortunately, you cannot change the partitioning underneath your pool. I don''t see any way of resizing this partition except for backing up your data, repartitioning the disk, and reinstalling Opensolaris 2009.06. Maybe someone else has a better idea... Cindy On 10/13/09 06:32, Julio wrote:> Hi, > > I have the following partions on my laptop, Inspiron 6000, from fdisk: > > 1 Other OS 0 11 12 0 > 2 EXT LBA 12 2561 2550 26 > 3 Active Solaris2 2562 9728 7167 74 > > First one is for Dell utilities. Second one is NTFS and the third is ZFS. > I am currently using OpenSolaris 2009.06 installed on the partition 3#. > When I installed OpenSolaris I kept the 2# just in case I wanted also to install Windows, but I have realized I don''t need it nevermore! So, I would like to merge 2# and 3# to get more disk space in OpenSolaris. > > Is it possible to eliminate the NTFS partition and add it to the ZFS partition? > > Thanks in advance and regards, > Julio
dirk schelfhout
2009-Oct-13 16:34 UTC
[zfs-discuss] How to resize ZFS partion or add a new one?
I think zpool add should work for you google it zpool add rpool yourNTFSpartition -- This message posted from opensolaris.org
Cindy Swearingen
2009-Oct-13 16:47 UTC
[zfs-discuss] How to resize ZFS partion or add a new one?
Except that you can''t add a disk or partition to a root pool: # zpool add rpool c1t1d0s0 cannot add to ''rpool'': root pool can not have multiple vdevs or separate logs He could try to attach the partition to his existing pool, I''m not sure how, and this would only create a mirrored root pool, it would not expand the root pool partition space. cs On 10/13/09 10:34, dirk schelfhout wrote:> I think zpool add > should work for you > google it > > zpool add rpool yourNTFSpartition
Cindy Swearingen
2009-Oct-13 17:11 UTC
[zfs-discuss] How to resize ZFS partion or add a new one?
My answer is incomplete. You can use the zpool attach command to attach another disk slice to a root pool''s disk slice to expand the pool size after the smaller disk is detached. On Julio''s laptop, I don''t think think he can attach another fdisk partition to his root pool. I think he needs to backup his pool, reconfigure and expand the solaris2 partition, and then reinstall OpenSolaris. Cindy On 10/13/09 10:47, Cindy Swearingen wrote:> Except that you can''t add a disk or partition to a root pool: > > # zpool add rpool c1t1d0s0 > cannot add to ''rpool'': root pool can not have multiple vdevs or separate > logs > > He could try to attach the partition to his existing pool, I''m not sure > how, and this would only create a mirrored root pool, it would not > expand the root pool partition space. > > cs > > On 10/13/09 10:34, dirk schelfhout wrote: >> I think zpool add should work for you >> google it >> >> zpool add rpool yourNTFSpartition > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
A Darren Dunham
2009-Oct-13 18:25 UTC
[zfs-discuss] How to resize ZFS partion or add a new one?
On Tue, Oct 13, 2009 at 05:32:35AM -0700, Julio wrote:> Hi, > > I have the following partions on my laptop, Inspiron 6000, from fdisk: > > 1 Other OS 0 11 12 0 > 2 EXT LBA 12 2561 2550 26 > 3 Active Solaris2 2562 9728 7167 74 > > First one is for Dell utilities. Second one is NTFS and the third is ZFS. > I am currently using OpenSolaris 2009.06 installed on the partition 3#. > When I installed OpenSolaris I kept the 2# just in case I wanted also to install Windows, but I have realized I don''t need it nevermore! So, I would like to merge 2# and 3# to get more disk space in OpenSolaris. > > Is it possible to eliminate the NTFS partition and add it to the ZFS partition?Possible, but not easy. The Solaris partition must be continuous and at the beginning of the partition. You''d need a tool that could move the data in partition 3 to start at cylinder 12. Since the move distance is less than the size to be moved, you have to do it carefully. I''m not sure what tools are out there that would make that move easy (something like Partition Magic?) You could do it naively with ''dd'' (while booted from another disk), but if you crashed in the middle, you''d have problems knowing how to pick up. Better would be to do it in chunks and keep track. Assuming you did that, you could then go through all the hoops to expand the fdisk partition, then expand the VTOC label inside, then make use of the added space. Not something I''d want to attempt without a backup and some testing. -- Darren
Paul Gress
2009-Oct-14 17:20 UTC
[zfs-discuss] How to resize ZFS partion or add a new one?
Julio wrote:> Hi, > > I have the following partions on my laptop, Inspiron 6000, from fdisk: > > 1 Other OS 0 11 12 0 > 2 EXT LBA 12 2561 2550 26 > 3 Active Solaris2 2562 9728 7167 74 > > First one is for Dell utilities. Second one is NTFS and the third is ZFS. > I am currently using OpenSolaris 2009.06 installed on the partition 3#. > When I installed OpenSolaris I kept the 2# just in case I wanted also to install Windows, but I have realized I don''t need it nevermore! So, I would like to merge 2# and 3# to get more disk space in OpenSolaris. > > Is it possible to eliminate the NTFS partition and add it to the ZFS partition? > > Thanks in advance and regards, > Julio >Why don''t you just format partition 2 to zfs, then add it to pool Solaris2 or rpool, whatever it''s named. Paul
Thanks to all for the replies. I got a lot of stuff configured and running fine, so I am not willing to reinstall for now :-). I also thought in Partition Magic but it seems not to manage ZFS. So, I think I will try to format the NTFS partition to ZFS and then add it to the pool. I will let you know the results. Regards, Julio. -- This message posted from opensolaris.org
Darren J Moffat
2009-Oct-15 11:59 UTC
[zfs-discuss] How to resize ZFS partion or add a new one?
Julio wrote:> Thanks to all for the replies. > > I got a lot of stuff configured and running fine, so I am not willing to reinstall for now :-). > I also thought in Partition Magic but it seems not to manage ZFS. So, I think I will try to format the NTFS partition to ZFS and then add it to the pool.If this is your root pool you can''t make anything other than a mirror. If the free space at the start of the disk before the existing ZFS fdisk partition is the same size or larger than the ZFS one you should able to get the following to work: 1. Add the current NFS partition as a mirror of the existing ZFS one: eg zpool attach rpool c0d0s0 c0d0p1 1.1 Add a boot block with installgrub to the old NTFS side of the mirror 1.2 For good measure run bootadm update-archive (shouldn''t be needed but worth doing just to be sure) 2. Wait until ''zpool status'' tells you that the resilver is complete. 3. Now detach the original ZFS fdisk partition leaving the one that was the old NTFS partition eg zpool deatch rpool c0d0s0 4. Now boot from LiveCD and repartition (just fdisk alone should be enough) to delete the old ZFS partition and make the old NTFS one the size of the old NTFS one and the ZFS one together. Making very sure it starts in exactly the same place the old NTFS one did. Making sure it is tagged Solaris2 not NTFS. 5. Reboot the system and the ZFS pool should have expanded to the size of the original two partitions. If it hasn''t run ''zpool autoexpand=on rpool'' Note that this will only work if the original NTFS partition that is before the ZFS partition in the fdisk layout is at least the same size as the current ZFS fdisk partition for rpool. If it is smaller then this won''t work and shouldn''t be attempted (though step 1 will fail). -- Darren J Moffat
Mārcis Lielturks
2009-Oct-15 12:27 UTC
[zfs-discuss] How to resize ZFS partion or add a new one?
2009/10/15 Darren J Moffat <darrenm at opensolaris.org>> Julio wrote: > >> Thanks to all for the replies. >> >> I got a lot of stuff configured and running fine, so I am not willing to >> reinstall for now :-). >> I also thought in Partition Magic but it seems not to manage ZFS. So, I >> think I will try to format the NTFS partition to ZFS and then add it to the >> pool. >> > > If this is your root pool you can''t make anything other than a mirror. > > If the free space at the start of the disk before the existing ZFS fdisk > partition is the same size or larger than the ZFS one you should able to get > the following to work: >I''m newbie, but doesn''t provided output from fdisk (see below) show that the NTFS partition is smaller (26% vs 74%)? In the worst case... isn''t there another option? Something like - create new pool, "zfs send R...|zfs recv.." old root pool to new pool then "installgrub" and "bootadm update-archive -R". See the link below... http://www.solarisinternals.com/wiki/index.php/ZFS_Troubleshooting_Guide#ZFS_Root_Pool_Recovery> 1. Add the current NFS partition as a mirror of the existing ZFS one: > eg zpool attach rpool c0d0s0 c0d0p1 > 1.1 Add a boot block with installgrub to the old NTFS side of the mirror > 1.2 For good measure run bootadm update-archive (shouldn''t be needed but > worth doing just to be sure) > > 2. Wait until ''zpool status'' tells you that the resilver is complete. > > 3. Now detach the original ZFS fdisk partition leaving the one that > was the old NTFS partition > eg zpool deatch rpool c0d0s0 > > 4. Now boot from LiveCD and repartition (just fdisk alone should be enough) > to delete the old ZFS partition and make the old NTFS one the size of the > old NTFS one and the ZFS one together. Making very sure it starts in > exactly the same place the old NTFS one did. Making sure it is tagged > Solaris2 not NTFS. > > 5. Reboot the system and the ZFS pool should have expanded to the size of > the original two partitions. > > If it hasn''t run ''zpool autoexpand=on rpool'' > > Note that this will only work if the original NTFS partition that is before > the ZFS partition in the fdisk layout is at least the same size as the > current ZFS fdisk partition for rpool. If it is smaller then this won''t > work and shouldn''t be attempted (though step 1 will fail). > > -- > Darren J Moffat > > _______________________________________________ > 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/20091015/f31c8231/attachment.html>
Julio Pérez
2009-Oct-15 12:31 UTC
[zfs-discuss] How to resize ZFS partion or add a new one?
I am afraid I won''t able to do that because the ZFS partition is around 50 GB and the NTFS one is 20 GB... I am thinking in another possibility. Format the current NTFS partition to ZFS and then I would be able to use this space like another disk, to store the user home for example, or other stuff. Would it be possible? Julio -- This message posted from opensolaris.org
A Darren Dunham
2009-Oct-15 15:52 UTC
[zfs-discuss] How to resize ZFS partion or add a new one?
On Thu, Oct 15, 2009 at 05:31:42AM -0700, Julio P?rez wrote:> I am thinking in another possibility. Format the current NTFS > partition to ZFS and then I would be able to use this space like > another disk, to store the user home for example, or other > stuff. Would it be possible?Not easily. Solaris x86 will only access the contents of one "Solaris" partition at a time. Maybe you could format the other partition FAT32 and run ZFS on a file in there, but I can''t imagine the peformance would be good doing that. -- Darren
Frank Thieme
2010-Feb-18 19:40 UTC
[zfs-discuss] How to resize ZFS partion or add a new one?
Hi! I tried this guide as my setup was similar. I had a Linux installation (extended partitions) followed by a OpenSolaris (snv_132) installation.> 1. Add the current NFS partition as a mirror of the existing ZFS one: > eg zpool attach rpool c0d0s0 c0d0p1 >This worked,> 1.1 Add a boot block with installgrub to the old NTFS side of the mirror >I couldn''t do this, because installgrub doesn''t want to do anything to a partition or slice that is numbered differently than 0> 2. Wait until ''zpool status'' tells you that the resilver is complete. > > 3. Now detach the original ZFS fdisk partition leaving the one that > was the old NTFS partition > eg zpool deatch rpool c0d0s0 >worked, too. now I have: NAME STATE READ WRITE CKSUM rpool ONLINE 0 0 0 c4t0d0p2 ONLINE 0 0 0> 4. Now boot from LiveCD and repartition (just fdisk alone should be > enough) to delete the old ZFS partition and make the old NTFS one the > size of the old NTFS one and the ZFS one together. Making very sure it > starts in exactly the same place the old NTFS one did. Making sure it > is tagged Solaris2 not NTFS. >this wasn''t a problem either...> 5. Reboot the system and the ZFS pool should have expanded to the size > of the original two partitions. >rebooting the system didn''t work - as expected - because of the missing grub. Interestingly I could boot from the OpenSolaris live/install cd, selecting "boot from hd", finding myself in the boot menu of my hard disk. After modifying the findroot command I could even boot snv_132> If it hasn''t run ''zpool autoexpand=on rpool'' >That was the real fun part. Worked instantly... Now I have two problems: getting grub to work without CD and getting rpool back to a slice instead of a partition. I didn''t print out my original disk label and have now this label: Current partition table (original): Total disk cylinders available: 32866 + 2 (reserved cylinders) Part Tag Flag Cylinders Size Blocks 0 root wm 1 - 32865 251.76GB (32865/0/0) 527976225 1 unassigned wm 0 0 (0/0/0) 0 2 backup wu 0 - 32865 251.77GB (32866/0/0) 527992290 3 unassigned wm 0 0 (0/0/0) 0 4 unassigned wm 0 0 (0/0/0) 0 5 unassigned wm 0 0 (0/0/0) 0 6 unassigned wm 0 0 (0/0/0) 0 7 unassigned wm 0 0 (0/0/0) 0 8 boot wu 0 - 0 7.84MB (1/0/0) 16065 9 unassigned wm 0 0 (0/0/0) 0 0 was unassigned and these values are guessed by me after reading a couple of web pages. "installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c4t0d0s0" wasn''t the solution to all my problems. Before doing this I had a black screen, now I have "GRUB" in the upper left corner and nothing else... I can boot via CD and "boot from harddisk" tough... I had to modify findroot in /rpool/boot/grub/menu.lst from "findroot (pool_rpool,3,a)" to "findroot (pool_rpool,1)" to let grub find my system. Is it important to have a slice mentioned there? Please include myself in reply as I''m not subscribed... Bye...Frank
Cindy Swearingen
2010-Feb-18 20:57 UTC
[zfs-discuss] How to resize ZFS partion or add a new one?
Frank, I can''t comment on everything happening here, but please review the ZFS root partition information in this section: http://www.solarisinternals.com/wiki/index.php/ZFS_Troubleshooting_Guide Replacing/Relabeling the Root Pool Disk The p0 partition identifies the larger Solaris partition, which contains slice 0-8. Slice 0 is then used for your ZFS root pool. Using a p0 device for your root pool was never intended and unexpected behavior could result. I think we have a CR to prevent this configuration in the future. Yes, the findroot entry needs the slice indicator, which is "a" for slice 0: findroot (pool_rpool,1,a) Then make sure the BIOS points to the right boot disk. Thanks, Cindy On 02/18/10 12:40, Frank Thieme wrote:> Hi! > > I tried this guide as my setup was similar. I had a Linux installation > (extended partitions) followed by a OpenSolaris (snv_132) installation. >> 1. Add the current NFS partition as a mirror of the existing ZFS one: >> eg zpool attach rpool c0d0s0 c0d0p1 >> > This worked, >> 1.1 Add a boot block with installgrub to the old NTFS side of the mirror >> > I couldn''t do this, because installgrub doesn''t want to do anything to a > partition or slice that is numbered differently than 0 >> 2. Wait until ''zpool status'' tells you that the resilver is complete. >> >> 3. Now detach the original ZFS fdisk partition leaving the one that >> was the old NTFS partition >> eg zpool deatch rpool c0d0s0 >> > worked, too. now I have: > > NAME STATE READ WRITE CKSUM > rpool ONLINE 0 0 0 > c4t0d0p2 ONLINE 0 0 0 > >> 4. Now boot from LiveCD and repartition (just fdisk alone should be >> enough) to delete the old ZFS partition and make the old NTFS one the >> size of the old NTFS one and the ZFS one together. Making very sure it >> starts in exactly the same place the old NTFS one did. Making sure it >> is tagged Solaris2 not NTFS. >> > this wasn''t a problem either... >> 5. Reboot the system and the ZFS pool should have expanded to the size >> of the original two partitions. >> > rebooting the system didn''t work - as expected - because of the missing > grub. Interestingly I could boot from the OpenSolaris live/install cd, > selecting "boot from hd", finding myself in the boot menu of my hard > disk. After modifying the findroot command I could even boot snv_132 >> If it hasn''t run ''zpool autoexpand=on rpool'' >> > That was the real fun part. Worked instantly... > > Now I have two problems: getting grub to work without CD and getting > rpool back to a slice instead of a partition. > > I didn''t print out my original disk label and have now this label: > > Current partition table (original): > Total disk cylinders available: 32866 + 2 (reserved cylinders) > > Part Tag Flag Cylinders Size Blocks > 0 root wm 1 - 32865 251.76GB (32865/0/0) 527976225 > 1 unassigned wm 0 0 (0/0/0) 0 > 2 backup wu 0 - 32865 251.77GB (32866/0/0) 527992290 > 3 unassigned wm 0 0 (0/0/0) 0 > 4 unassigned wm 0 0 (0/0/0) 0 > 5 unassigned wm 0 0 (0/0/0) 0 > 6 unassigned wm 0 0 (0/0/0) 0 > 7 unassigned wm 0 0 (0/0/0) 0 > 8 boot wu 0 - 0 7.84MB (1/0/0) 16065 > 9 unassigned wm 0 0 (0/0/0) 0 > > 0 was unassigned and these values are guessed by me after reading a > couple of web pages. > > "installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c4t0d0s0" > wasn''t the solution to all my problems. Before doing this I had a black > screen, now I have "GRUB" in the upper left corner and nothing else... > > I can boot via CD and "boot from harddisk" tough... > I had to modify findroot in /rpool/boot/grub/menu.lst from "findroot > (pool_rpool,3,a)" to "findroot (pool_rpool,1)" to let grub find my > system. Is it important to have a slice mentioned there? > > Please include myself in reply as I''m not subscribed... > Bye...Frank > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Frank Thieme
2010-Feb-18 22:33 UTC
[zfs-discuss] How to resize ZFS partion or add a new one?
On Thu, Feb 18, 2010 at 21:57, Cindy Swearingen <Cindy.Swearingen at sun.com> wrote:> Yes, the findroot entry needs the slice indicator, which is "a" for > slice 0: > > findroot (pool_rpool,1,a)"help findroot" in grub command line says it is optional. And as I said it works when I leave the ",a" out, but not when I put it there. I''ll take a look at the guide... Bye...Frank