Clive Meredith
2011-Jun-16 19:21 UTC
[zfs-discuss] Resizing ZFS partition, shrinking NTFS?
Problem: I currently run a duel boot machine with a 45Gb partition for Win7 Ultimate and a 25Gb partition for OpenSolaris 10 (134). I need to shrink NTFS to 20Gb and increase the ZFS partion to 45Gb. Is this possible please? I have looked at using the partition tool in OpenSolaris but both partition are locked, even under admin. Win7 won''t allow me to shrink the dynamic volume, as the Finsh button is always greyed out, so no luck in that direction. Thanks in advance. -- This message posted from opensolaris.org
Cindy Swearingen
2011-Jun-16 19:37 UTC
[zfs-discuss] Resizing ZFS partition, shrinking NTFS?
Hi Clive, What you are asking is not recommended nor supported and could render your ZFS root pool unbootable. (I''m not saying that some expert couldn''t do it, but its risky, like data corruption risky.) ZFS expects the partition boundaries to remain the same unless you replace the original disk with another disk, attach another disk and detach the original disk, or expand a pool''s an underlying LUN. If you have a larger disk, this is what I would recommend. Attach the larger disk and the detach the smaller disk. The full steps are documented on the solarisinternals.com wiki, ZFS troubleshooting section, replacing the root pool disk steps. Thanks, Cindy On 06/16/11 13:21, Clive Meredith wrote:> Problem: > > I currently run a duel boot machine with a 45Gb partition for Win7 Ultimate and a 25Gb partition for OpenSolaris 10 (134). I need to shrink NTFS to 20Gb and increase the ZFS partion to 45Gb. Is this possible please? I have looked at using the partition tool in OpenSolaris but both partition are locked, even under admin. Win7 won''t allow me to shrink the dynamic volume, as the Finsh button is always greyed out, so no luck in that direction. > > Thanks in advance.
John D Groenveld
2011-Jun-16 23:44 UTC
[zfs-discuss] Resizing ZFS partition, shrinking NTFS?
In message <444915109.61308252125289.JavaMail.Twebapp at sf-app1>, Clive Meredith writes:>I currently run a duel boot machine with a 45Gb partition for Win7 Ultimate an >d a 25Gb partition for OpenSolaris 10 (134). I need to shrink NTFS to 20Gb an >d increase the ZFS partion to 45Gb. Is this possible please? I have looked a >t using the partition tool in OpenSolaris but both partition are locked, even >under admin. Win7 won''t allow me to shrink the dynamic volume, as the Finsh b >utton is always greyed out, so no luck in that direction.Shrink the NTFS filesystem first. I''ve used the Knoppix LiveCD against a defragmented NTFS. Then use beadm(1M) to duplicate your OpenSolaris BE to a USB drive and also send snapshots of any other rpool ZFS there. Then I would boot the USB drive, run format, fdisk and recreate the Solaris fdisk partition on your system, recreate the rpool on slice 0 of that fdisk partition, use beadm(1M) to copy your BE back to your new rpool, and then restore any other ZFS from those snapshots. John groenveld at acm.org
Michael Schuster
2011-Jun-17 05:37 UTC
[zfs-discuss] Resizing ZFS partition, shrinking NTFS?
On 17.06.2011 01:44, John D Groenveld wrote:> In message<444915109.61308252125289.JavaMail.Twebapp at sf-app1>, Clive Meredith > writes: >> I currently run a duel boot machine with a 45Gb partition for Win7 Ultimate an >> d a 25Gb partition for OpenSolaris 10 (134). I need to shrink NTFS to 20Gb an >> d increase the ZFS partion to 45Gb. Is this possible please? I have looked a >> t using the partition tool in OpenSolaris but both partition are locked, even >> under admin. Win7 won''t allow me to shrink the dynamic volume, as the Finsh b >> utton is always greyed out, so no luck in that direction. > > Shrink the NTFS filesystem first. > I''ve used the Knoppix LiveCD against a defragmented NTFS. > > Then use beadm(1M) to duplicate your OpenSolaris BE to > a USB drive and also send snapshots of any other rpool ZFS > there.I''d suggest a somewhat different approach: 1) boot a live cd and use something like parted to shrink the NTFS partition 2) create a new partition without FS in the space now freed from NTFS 3) boot OpenSolaris, add the partition from 2) as vdev to your zpool. HTH Michael -- Michael Schuster http://recursiveramblings.wordpress.com/
2011-06-17 9:37, Michael Schuster ?????:> > I''d suggest a somewhat different approach: > 1) boot a live cd and use something like parted to shrink the NTFS > partition > 2) create a new partition without FS in the space now freed from NTFS > 3) boot OpenSolaris, add the partition from 2) as vdev to your zpool. > > HTH > MichaelI gather that he is trying to expand his root pool, and you can not add a vdev to one. Though, true, it might be possible to create a second, data pool, in the partition. I am not sure if zfs can make two pools in different partitions of the same device though - underneath it still uses Solaris slices, and I think those can be used on one partition. That was my assumption for a long time, though never really tested. I only did similar expansions within one slice table which covered the whole disk, and that was a mirror set so I could juggle data around (migrating to ZFS Root from UFS+LUroot+swap layouts, where sometimes original slices did not all go after each other). That went well, and autoexpansion worked as soon as I increased the slice sizes via format''s partition editor. And maybe rebooted too... I think the method of zfs send/recv via a secondary device (including network storage) and another boot device (including a LiveCD|LiveUSB), and remaking the partition, is the least error-prone for this poster''s situation. And resizing the system NTFS partition is really unlikely to be allowed from within running Windows. It should be done from some external booting software, and probably after such defragmentation which would stuff all data into start or end of that NTFS partition as appropriate (see for example the free JkDefrag/MyDefrag project). -- +============================================================+ | | | ?????? ???????, Jim Klimov | | ??????????? ???????? CTO | | ??? "??? ? ??" JSC COS&HT | | | | +7-903-7705859 (cellular) mailto:jimklimov at cos.ru | | CC:admin at cos.ru,jimklimov at mail.ru | +============================================================+ | () ascii ribbon campaign - against html mail | | /\ - against microsoft attachments | +============================================================+
Bob Friesenhahn
2011-Jun-18 02:14 UTC
[zfs-discuss] Resizing ZFS partition, shrinking NTFS?
On Fri, 17 Jun 2011, Jim Klimov wrote:> I gather that he is trying to expand his root pool, and you can > not add a vdev to one. Though, true, it might be possible to > create a second, data pool, in the partition. I am not sure if > zfs can make two pools in different partitions of the same > device though - underneath it still uses Solaris slices, and > I think those can be used on one partition. That was my > assumption for a long time, though never really tested.This would be a bad assumption. Zfs should not care and you are able to do apparently silly things with it. Sometimes allowing potentially silly things is quite useful. Bob -- Bob Friesenhahn bfriesen at simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
Michael Sullivan
2011-Jun-18 05:13 UTC
[zfs-discuss] Resizing ZFS partition, shrinking NTFS?
On 17 Jun 11, at 21:14 , Bob Friesenhahn wrote:> On Fri, 17 Jun 2011, Jim Klimov wrote: >> I gather that he is trying to expand his root pool, and you can >> not add a vdev to one. Though, true, it might be possible to >> create a second, data pool, in the partition. I am not sure if >> zfs can make two pools in different partitions of the same >> device though - underneath it still uses Solaris slices, and >> I think those can be used on one partition. That was my >> assumption for a long time, though never really tested. > > This would be a bad assumption. Zfs should not care and you are able to do apparently silly things with it. Sometimes allowing potentially silly things is quite useful. >This is true. If one has mirrored disks, you could do something like I explain here WRT partitioning and resizing pools. http://www.kamiogi.net/Kamiogi/Frame_Dragging/Entries/2009/5/19_Everything_in_Its_Place_-_Moving_and_Reorganizing_ZFS_Storage.html I did some shuffling using Solaris partitions here on a home server, but it was using mirrors of the same geometry disks. You might be able to o a similar shuffle using an external USB drive which was appropriately sized and turn on autoexpand. Mike --- Michael Sullivan mps at axsh.us http://www.axsh.us/ Phone: +1-662-259-8888 Mobile: +1-662-202-7716