Mario Goebbels
2007-May-05 13:34 UTC
[zfs-discuss] Issue with adding existing EFI disks to a zpool
I spend yesterday all day evading my data of one of the Windows disks, so that I can add it to the pool. Using mount-ntfs, it''s a pain due to its slowness. But once I finished, I thought "Cool, let''s do it". So I added the disk using the zero slice notation (c0d0s0), as suggested for performance reasons. I checked the pool status and noticed however that the pool size didn''t raise. After a short panic (myself, not the kernel), I remembered that I partitioned this disk as EFI disk in Windows (mostly just because). c0d0s0 was the emergency, boot or whatever partition automatically created according to the recommended EFI partitioning scheme. So it added the minimal space of that partition to the pool. The real whole disk partition was c0d0s1. Since there''s no device removal in ZFS yet, I had to replace slice 0 with slice 1 since destroying the pool was out of the question. Two things now: a) ZFS would have added EFI labels anyway. Will ZFS figure things out for itself, or did I lose write cache control because I didn''t explicitely specify s0 though this is an EFI disk already? b) I don''t remember it mentioned anywhere in the documentation. If a) is indeed an issue, it should be mentioned that you have to unlabel EFI disks before adding. Thanks. -mg This message posted from opensolaris.org
Jonathan Edwards
2007-May-05 15:49 UTC
[zfs-discuss] Issue with adding existing EFI disks to a zpool
On May 5, 2007, at 09:34, Mario Goebbels wrote:> I spend yesterday all day evading my data of one of the Windows > disks, so that I can add it to the pool. Using mount-ntfs, it''s a > pain due to its slowness. But once I finished, I thought "Cool, > let''s do it". So I added the disk using the zero slice notation > (c0d0s0), as suggested for performance reasons. I checked the pool > status and noticed however that the pool size didn''t raise. > > After a short panic (myself, not the kernel), I remembered that I > partitioned this disk as EFI disk in Windows (mostly just because). > c0d0s0 was the emergency, boot or whatever partition automatically > created according to the recommended EFI partitioning scheme. So it > added the minimal space of that partition to the pool. The real > whole disk partition was c0d0s1. Since there''s no device removal in > ZFS yet, I had to replace slice 0 with slice 1 since destroying the > pool was out of the question. > > Two things now: > a) ZFS would have added EFI labels anyway. Will ZFS figure things > out for itself, or did I lose write cache control because I didn''t > explicitely specify s0 though this is an EFI disk already?yes if add the whole device to the pool .. that is use c0t0d0 instead of c0t0d0s0 .. in this case, ZFS creates a large partition on s0 starting at sector 34 and encompassing the entire disk. If you need to check the write_cache use "format -e", cache, write_cache, display.> b) I don''t remember it mentioned anywhere in the documentation. If > a) is indeed an issue, it should be mentioned that you have to > unlabel EFI disks before adding.Removing an EFI label is a little trickier .. you can replace the EFI label with an SMI label if it''s below 1TB (format -e then l) and then "dd if=/dev/zero of=/dev/dsk/c0t0d0s2 bs=512 count=1" to remove the SMI label .. or you could also attempt to access the entire disk (c0t0d0) with dd and zero out the first 17KB and the last 8MB, but you''d have to get the 8MB offset from the VTOC. You know you''ve got an empty label if you get stderr entries at the top of the format output, or syslog messages around "corrupt label - bad magic number" Jonathan
Manoj Joseph
2007-May-05 17:54 UTC
[zfs-discuss] Issue with adding existing EFI disks to a zpool
Mario Goebbels wrote:> do it". So I added the disk using the zero slice notation (c0d0s0), > as suggested for performance reasons. I checked the pool status and > noticed however that the pool size didn''t raise.I believe you got this wrong. You should have given ZFS the whole disk - c0d0 and not a slice. When presented a whole disk, it EFI-labels it and turns on the write cache. -Manoj
Mario Goebbels
2007-May-06 23:36 UTC
[zfs-discuss] Re: Issue with adding existing EFI disks to a zpool
Yes, rereading various stuff, I got mixed things up with the rootpool instructions and the general ZFS examples. c0t0d0 and c0d0s0 and all that. Luckily that next drive I''m emptying is the same model and size as the last one, so I can bounce it out of the pool with a replace and then add it back. This message posted from opensolaris.org