Hello, I currently have a raid1 array setup on Windows 7 with a pair of 1.5TB drives. I don''t have enough space in any other drives to make a backup of all this data and I really don''t want to copy my ~1.1 TB of files over the network anyways. What I want to do it get a third 1.5 TB drive and make a ZFS RaidZ array (from what I understand it will have two drives for data and one drive for parity, total capacity 1.36 * 2 TB). I think what I need to do is get opensolaris and mount one of the drives from the raid1 array as an NTFS partition (because it is NTFS), and then create a ZFS filesystem on the new drive. Copy all the data from the NTFS drive to the new drive then add the other two drives to create a raidZ array making sure it copies the parity data from the first drive. Is this the correct way of doing it? What commands do I need to use to create the raidZ array from a single ZFS drive. Thanks. -- This message posted from opensolaris.org
On 6/1/2010 8:36 PM, zfsnoob4 wrote:> Hello, > > I currently have a raid1 array setup on Windows 7 with a pair of 1.5TB drives. I don''t have enough space in any other drives to make a backup of all this data and I really don''t want to copy my ~1.1 TB of files over the network anyways. > > What I want to do it get a third 1.5 TB drive and make a ZFS RaidZ array (from what I understand it will have two drives for data and one drive for parity, total capacity 1.36 * 2 TB). > > I think what I need to do is get opensolaris and mount one of the drives from the raid1 array as an NTFS partition (because it is NTFS), and then create a ZFS filesystem on the new drive. Copy all the data from the NTFS drive to the new drive then add the other two drives to create a raidZ array making sure it copies the parity data from the first drive. > > Is this the correct way of doing it? What commands do I need to use to create the raidZ array from a single ZFS drive. > > Thanks. >Let''s call your current drives A & B, and the new drive you are going to get C, and furthermore, assume that: A = c0t0d0 B = c0t1d0 C = c0t2d0 I''m also assuming you have other drives which are going to hold the OS - that is, these drives are only for data, not the OS. Step 1: Break the mirror of A & B inside Windows 7 Step 2: Purchase the new C hard drive, and install it in the case. Step 3: Boot to OpenSolaris Step 4: Make sure you''ve gone out and installed the NTFS driver ( http://sun.drydog.com/faq/9.html ) Step 5: mount drive A: mount -F ntfs /dev/dsk/c0t0d0p0 /mnt Step 6: create a "dummy" drive as a sparse file: mkfile -n 1500G /foo Step 7: create the new RaidZ array, using the dummy drive: zpool create tank raidz c0t1d0 c0t2d0 /foo Step 8: remove the dummy drive: zpool offline tank /foo Step 9: copy all the data from the NTFS drive to the new drive: cd /mnt; cp -rp . /tank Step 10: kill the NTFS partition info: run "format" and delete everything Step 11: add the erased NTFS drive to the new raidZ: zpool replace -f tank /foo c0t0d0 Step 12: delete the dummy file: rm /foo Wait for the raidz to reconstruct (resilver) - this may take quite some time. Done! If you are using the existing mirrored pair to actually boot in Windows 7 (i.e. as the boot drives), then you can''t create a raidz for OpenSolaris - OpenSolaris can only boot from a mirrored root pool, not a raidz of any kind. -- Erik Trimble Java System Support Mailstop: usca22-123 Phone: x17195 Santa Clara, CA
> From: zfs-discuss-bounces at opensolaris.org [mailto:zfs-discuss- > bounces at opensolaris.org] On Behalf Of Erik Trimble > > Step 1: Break the mirror of A & B inside Windows 7 > Step 2: Purchase the new C hard drive, and install it in the case. > Step 3: Boot to OpenSolaris > Step 4: Make sure you''ve gone out and installed the NTFS driver ( > http://sun.drydog.com/faq/9.html ) > Step 5: mount drive A: mount -F ntfs /dev/dsk/c0t0d0p0 /mnt > Step 6: create a "dummy" drive as a sparse file: mkfile -n > 1500G /foo > Step 7: create the new RaidZ array, using the dummy drive: > zpool create tank raidz c0t1d0 c0t2d0 /foo > Step 8: remove the dummy drive: zpool offline tank /foo > Step 9: copy all the data from the NTFS drive to the new drive: > cd /mnt; cp -rp . /tank > Step 10: kill the NTFS partition info: run "format" and delete > everything > Step 11: add the erased NTFS drive to the new raidZ: zpool > replace -f tank /foo c0t0d0 > Step 12: delete the dummy file: rm /fooVery clever! I was just about to say "you can''t do it; you need 3 devices" but by faking out the raidz with a sparse file, degrading the filesystem, and resilvering ... I just tested that on my system and it worked. Nice job. The only thing I would add here is: Instead of mkfile -n 1500G, I would suggest making sure your sparse file is larger than your actual disk drives. Since you said your disk drives are 1.5T, I''d make the sparse file something like 1700G just to be sure the size of your raidz volume is only limited by the size of your disk drives, and not accidentally limited by the size of your sparse file. Although, I''m not 100% sure that would matter anyway.
Wow thank you very much for the clear instructions. And Yes, I have another 120GB drive for the OS, separate from A, B and C. I will repartition the drive and install Solaris. Then maybe at some point I''ll delete the entire drive and just install a single OS. I have a question about step 6, "Step 6: create a "dummy" drive as a sparse file: mkfile -n 1500G /foo" I understand that I need to create a dummy drive and then immediatly remove it to run the raidz in degraded mode. But by creating the file with mkfile, will it allocate the 1.5TB right away on the OS drive? I was wondering because my OS drive is only 120GB, so won''t it have a problem with creating a 1.5TB sparse file? Thanks -- This message posted from opensolaris.org
On 6/2/2010 9:03 AM, zfsnoob4 wrote:> Wow thank you very much for the clear instructions. > > And Yes, I have another 120GB drive for the OS, separate from A, B and C. I will repartition the drive and install Solaris. Then maybe at some point I''ll delete the entire drive and just install a single OS. > > > I have a question about step 6, "Step 6: create a "dummy" drive as a sparse file: mkfile -n 1500G /foo" > > I understand that I need to create a dummy drive and then immediatly remove it to run the raidz in degraded mode. But by creating the file with mkfile, will it allocate the 1.5TB right away on the OS drive? I was wondering because my OS drive is only 120GB, so won''t it have a problem with creating a 1.5TB sparse file? > > > Thanks >No. The ''-n'' option tells Solaris that this is a "sparse" file - that is, it only takes up space as you use it. It reports it''s size to ''ls'' and similar utilities as the size you created it, but actually, the on-disk allocation is only that which has been actually written to the file. In this case, you''re not going to be writing any data to it (well, just a trivial ZFS header file), so you''re all set. I just tested it again to make sure - it works just fine creating a file size N on a zfs filesystem size M, where N >> M. -- Erik Trimble Java System Support Mailstop: usca22-123 Phone: x17195 Santa Clara, CA
On Jun 2, 2010, at 12:03 PM, zfsnoob4 <zfsnoobman at hotmail.co.uk> wrote:> Wow thank you very much for the clear instructions. > > And Yes, I have another 120GB drive for the OS, separate from A, B > and C. I will repartition the drive and install Solaris. Then maybe > at some point I''ll delete the entire drive and just install a single > OS. > > > I have a question about step 6, "Step 6: create a "dummy" drive as a > sparse file: mkfile -n 1500G /foo" > > I understand that I need to create a dummy drive and then immediatly > remove it to run the raidz in degraded mode. But by creating the > file with mkfile, will it allocate the 1.5TB right away on the OS > drive? I was wondering because my OS drive is only 120GB, so won''t > it have a problem with creating a 1.5TB sparse file?There is one potential pitfall in this method, if your Windows mirror is using dynamic disks, you can''t access a dynamic disk with the NTFS driver under Solaris. To get around this create a basic NTFS partition on the new third drive, copy the data to that drive and blow away the dynamic mirror. Then build the degraded raidz pool out of the two original mirror disks and copy the data back off the new third disk on to the raidz, then wipe the disk labels off that third drive and resilver the raidz. A safer approach is to get a 2GB eSATA drive (a mirrored device to be extra safe) and copy the data there, then build a complete raidz and copy the data off the eSATA device to the raidz. The risk and time it takes to copy data on to a degraded raidz isn''t worth it. The write throughput on a degraded raidz will be horrible and the time it takes to copy the data over plus the time it takes in the red zone where it resilvers the raidz with no backup available... There is a high potential for tears here. Get an external disk for your own sanity. -Ross
> From: zfs-discuss-bounces at opensolaris.org [mailto:zfs-discuss- > bounces at opensolaris.org] On Behalf Of Ross Walker > > To get around this create a basic NTFS partition on the new third > drive, copy the data to that drive and blow away the dynamic mirror.Better yet, build the opensolaris machine first, and copy the data from a windows machine over the network. It beats "copy from A to B, and then copy from B to C and then copy from C to D" One more comment: noob says he''s planning to partition the OS drive. Last I knew, easier said than done. I''m sure it''s not impossible, but it might not be straightforward either.
On Thu, Jun 3, 2010 at 5:37 AM, Edward Ned Harvey <solaris2 at nedharvey.com> wrote:> noob says he''s planning to partition the OS drive. ?Last I knew, easier said > than done. ?I''m sure it''s not impossible, but it might not be > straightforward either.I think we was going partition it to install Win 7 on one partition and Solaris on another. This is easy to do with the Caiman installer. It''s not easy to make Solaris slices on the boot drive. It can be done but requires some manual steps after the installation is complete. See the message I sent out earlier this week for steps on how. -B -- Brandon High : bhigh at freaks.com
"It''s not easy to make Solaris slices on the boot drive." As I am just realizing. The installer does not have any kind of partition software. I have a linux boot disc and I am contemplating using gparted to resize the win partition to create a raw 50GB empty partition. Can the installer format a raw partition into a Solaris FS? If it can it will be easy (assuming it can set up the dual boot properly). This is what I''m thinking: 1) Use Gparted to resize the windows partition and therefore create a 50GB raw partition. 2) Use the opensolaris installer to format the raw partition into a Solaris FS. 3) Install opensolaris 2009.06, the setup should automatically configure the dual boot with windows and opensolaris. Does that make sense? Thanks again. Message was edited by: zfsnoob4 -- This message posted from opensolaris.org
On Fri, Jun 4, 2010 at 2:59 PM, zfsnoob4 <zfsnoobman at hotmail.co.uk> wrote:> "It''s not easy to make Solaris slices on the boot drive." > > As I am just realizing. The installer does not have any kind of partition software. > > I have a linux boot disc and I am contemplating using gparted to resize the win partition to create a raw 50GB empty partition. Can the installer format a raw partition into a Solaris FS? If it can it will be easy (assuming it can set up the dual boot properly). > > This is what I''m thinking: > 1) Use Gparted to resize the windows partition and therefore create a 50GB raw partition. > 2) Use the opensolaris installer to format the raw partition into a Solaris FS. > 3) Install opensolaris 2009.06, the setup should automatically configure the dual boot with windows and opensolaris. > > Does that make sense? >that''s exactly what I usually do -- O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
On Fri, Jun 4, 2010 at 12:59 AM, zfsnoob4 <zfsnoobman at hotmail.co.uk> wrote:> This is what I''m thinking: > 1) Use Gparted to resize the windows partition and therefore create a 50GB raw partition. > 2) Use the opensolaris installer to format the raw partition into a Solaris FS. > 3) Install opensolaris 2009.06, the setup should automatically configure the dual boot with windows and opensolaris. > > Does that make sense?That will work fine. Be aware that Solaris on x86 has two types of partitions. There are fdisk partitions (c0t0d0p1, etc) which is what gparted, windows and other tools will see. There are also Solaris partitions or slices (c0t0d0s0). You can create or edit these with the ''format'' command in Solaris. These are created in an fdisk partition that is the SOLARIS2 type. So yeah, it''s a partition table inside a partition table. The caiman installer will allow you to create and install into fdisk partitions. It creates a Solaris slice that uses the entire fdisk partition. If you want to change the size or layout of the slices, you can''t do it at install time. -B -- Brandon High : bhigh at freaks.com
On 6/4/10 11:46 AM -0700 Brandon High wrote:> Be aware that Solaris on x86 has two types of partitions. There are > fdisk partitions (c0t0d0p1, etc) which is what gparted, windows and > other tools will see. There are also Solaris partitions or slices > (c0t0d0s0). You can create or edit these with the ''format'' command in > Solaris. These are created in an fdisk partition that is the SOLARIS2 > type. So yeah, it''s a partition table inside a partition table.That''s not correct, at least not technically. Solaris *slices* within the Solaris fdisk partition, are not also known as partitions. They are simply known as slices. By calling them "Solaris partitions or slices" you are just adding confusion.
Frank, The format utility is not technically correct because it refers to slices as partitions. Check the output below. We might describe that the "partition" menu is used to partition the disk into slices, but all of format refers to partitions, not slices. I agree with Brandon''s explanation, but no amount of explanation resolves the confusion for those unfamiliar with how we use the same term to describe different disk components. Cindy format> p PARTITION MENU: 0 - change `0'' partition 1 - change `1'' partition 2 - change `2'' partition 3 - change `3'' partition 4 - change `4'' partition 5 - change `5'' partition 6 - change `6'' partition expand - expand label to use whole disk select - select a predefined table modify - modify a predefined partition table name - name the current table print - display the current table label - write partition map and label to the disk !<cmd> - execute <cmd>, then return quit partition> p Current partition table (original): Total disk sectors available: 286722878 + 16384 (reserved sectors) Part Tag Flag First Sector Size Last Sector 0 usr wm 256 136.72GB 286722911 1 unassigned wm 0 0 0 2 unassigned wm 0 0 0 3 unassigned wm 0 0 0 4 unassigned wm 0 0 0 5 unassigned wm 0 0 0 6 unassigned wm 0 0 0 8 reserved wm 286722912 8.00MB 286739295 partition> On 06/04/10 15:43, Frank Cusack wrote:> On 6/4/10 11:46 AM -0700 Brandon High wrote: >> Be aware that Solaris on x86 has two types of partitions. There are >> fdisk partitions (c0t0d0p1, etc) which is what gparted, windows and >> other tools will see. There are also Solaris partitions or slices >> (c0t0d0s0). You can create or edit these with the ''format'' command in >> Solaris. These are created in an fdisk partition that is the SOLARIS2 >> type. So yeah, it''s a partition table inside a partition table. > > That''s not correct, at least not technically. Solaris *slices* within > the Solaris fdisk partition, are not also known as partitions. They > are simply known as slices. By calling them "Solaris partitions or > slices" you are just adding confusion. > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Are you going to use this machine as a fileserver, at least the OpenSolaris part? You might consider trying EON storage (http://eonstorage.blogspot.com/), which just runs on a CD. If that''s all you need, then you don''t have to worry about partitioning around Windows, since Windows won''t be able to read your ZFS array anyway. -- This message posted from opensolaris.org
Hello, I finally got the new drive and I am in the process of moving the data. The problem I have now is that I can''t mount the NTFS partition. I followed the directions here: http://sun.drydog.com/faq/9.html and tried both methods, but the problem is that when I run fdisk on the ntfs drive, it does not detect the partitions. In all the tutorials, fdisk is used to identify the partition with ntfs and then it is mounted. I currently have 4 drives, 1 OS drive and 3 identical 1.5TB WD drives. As a test I booted parted magic from a live USB and gparted correctly identified the ntfs partition. It also correctly identified the other 3 drives as ZFS partitions. I was also able to mount the ntfs drive and browse it. However, when I run gparted in opensolaris, it does not show any partitions, it only shows a single unallocated partition. I have attached a file with the output from various useful commands, anyone know what I''m doing wrong? Note: I know the tank zpool is made of c6d0 and c6d1, so c7d0 must be the ntfs drive. Thanks. -- This message posted from opensolaris.org -------------- next part -------------- ---------------------------------------------Output of Format---------------------------------------------- mediaman at mediaman-server:~/Downloads# format AVAILABLE DISK SELECTIONS: 0. c5d0 <DEFAULT cyl 14943 alt 2 hd 255 sec 63> /pci at 0,0/pci-ide at 14,1/ide at 1/cmdk at 0,0 1. c6d0 <WDC WD15- WD-WMAVU147779-0001-1.36TB> /pci at 0,0/pci-ide at 11/ide at 1/cmdk at 0,0 2. c6d1 <WDC WD15- WD-WCAVU044889-0001-1.36TB> /pci at 0,0/pci-ide at 11/ide at 1/cmdk at 1,0 3. c7d0 <WDC WD15- WD-WMAVU144166-0001-1.36TB> /pci at 0,0/pci-ide at 11/ide at 0/cmdk at 0,0 format> current Current Disk = c7d0 <WDC WD15- WD-WMAVU144166-0001-1.36TB> /pci at 0,0/pci-ide at 11/ide at 0/cmdk at 0,0 format> partiion `partiion'' is not expected. format> partition PARTITION MENU: 0 - change `0'' partition 1 - change `1'' partition 2 - change `2'' partition 3 - change `3'' partition 4 - change `4'' partition 5 - change `5'' partition 6 - change `6'' partition expand - expand label to use whole disk select - select a predefined table modify - modify a predefined partition table name - name the current table print - display the current table label - write partition map and label to the disk !<cmd> - execute <cmd>, then return quit partition> print Current partition table (original): Total disk sectors available: 2930260750 + 16384 (reserved sectors) Part Tag Flag First Sector Size Last Sector 0 - wm 34 128.00MB 262177 1 - wm 264192 1.36TB 2929686527 2 unassigned wm 0 0 0 3 unassigned wm 0 0 0 4 unassigned wm 0 0 0 5 unassigned wm 0 0 0 6 unassigned wm 0 0 0 ----------------------------------------------------End---------------------------------------------------------------- ---------------------------------------------Output of fdisk---------------------------------------------- mediaman at mediaman-server:~/Downloads# fdisk /dev/rdsk/c7d0 Total disk size is 60800 cylinders Cylinder size is 48195 (512 byte) blocks Cylinders Partition Status Type Start End Length % ========= ====== ============ ===== === ====== == 1 EFI 0 60799 60800 100 SELECT ONE OF THE FOLLOWING: 1. Create a partition 2. Specify the active partition 3. Delete a partition 4. Change between Solaris and Solaris2 Partition IDs 5. Edit/View extended partitions 6. Exit (update disk configuration and exit) 7. Cancel (exit without updating disk configuration) Enter Selection: 7 ----------------------------------------------------End---------------------------------------------------------------- ---------------------------------------------------------------Output of mount------------------------------------------ mediaman at mediaman-server:~/Downloads# mount -F ntfs /dev/dsk/c7d0p1 /ntfs Could not open the disk/image /dev/dsk/c7d0p1. mediaman at mediaman-server:~/Downloads# mount -F ntfs /dev/dsk/c7d0p0 /ntfs This is not an NTFS disk/image. mediaman at mediaman-server:~/Downloads# mount -F ntfs /dev/dsk/c7d0 /ntfs This is not an NTFS disk/image. ----------------------------------------------------End----------------------------------------------------------------