Bernd W. Hennig
2011-Jul-26 06:33 UTC
[zfs-discuss] Adding mirrors to an existing zfs-pool
G''Day, - zfs pool with 4 disks (from Clariion A) - must migrate to Clariion B (so I created 4 disks with the same size, avaiable for the zfs) The zfs pool has no mirrors, my idea was to add the new 4 disks from the Clariion B to the 4 disks which are still in the pool - and later remove the original 4 disks. I only found in all example how to create a new pool with mirrors but no example how to add to a pool without mirrors a mirror disk for each "disk" in the pool. - is it possible to add disks to each disk in the pool (they have different sizes, so I have exact add the correct disks form Clariion B to the original disk from Clariion B) - can I later "remove" the disks from the Clariion A, pool is intact, user can work with the pool ?? Sorry for the beginner questions.... Tnx for help -- This message posted from opensolaris.org
Bernd W. Hennig wrote:> G''Day, > > - zfs pool with 4 disks (from Clariion A) > - must migrate to Clariion B (so I created 4 disks with the same size, > avaiable for the zfs) > > The zfs pool has no mirrors, my idea was to add the new 4 disks from > the Clariion B to the 4 disks which are still in the pool - and later > remove the original 4 disks. > > I only found in all example how to create a new pool with mirrors > but no example how to add to a pool without mirrors a mirror disk > for each "disk" in the pool. > > - is it possible to add disks to each disk in the pool (they have different > sizes, so I have exact add the correct disks form Clariion B to the > original disk from Clariion B) > - can I later "remove" the disks from the Clariion A, pool is intact, user > can work with the pool >Depends on a few things... What OS are you running, and what release/update or build? What''s the RAID layout of your pool "zpool status"? -- Andrew Gabriel
hung-sheng tsao
2011-Jul-26 16:28 UTC
[zfs-discuss] Adding mirrors to an existing zfs-pool
Hi It is better just ceate new ool in array 8 Then use cpio ro copy the data On 7/26/11, Bernd W. Hennig <consulting at hennig-consulting.com> wrote:> G''Day, > > - zfs pool with 4 disks (from Clariion A) > - must migrate to Clariion B (so I created 4 disks with the same size, > avaiable for the zfs) > > The zfs pool has no mirrors, my idea was to add the new 4 disks from > the Clariion B to the 4 disks which are still in the pool - and later > remove the original 4 disks. > > I only found in all example how to create a new pool with mirrors > but no example how to add to a pool without mirrors a mirror disk > for each "disk" in the pool. > > - is it possible to add disks to each disk in the pool (they have different > sizes, so I have exact add the correct disks form Clariion B to the > original disk from Clariion B) > - can I later "remove" the disks from the Clariion A, pool is intact, user > can work with the pool > > > ?? > > Sorry for the beginner questions.... > > Tnx for help > -- > This message posted from opensolaris.org > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss >-- Sent from my mobile device Hung-Sheng Tsao, Ph.D. <laotsao at gmail.com> laotsao at gmail.com http://laotsao.wordpress.com cell:9734950840 gvoice:8623970640
Fajar A. Nugraha
2011-Jul-26 20:19 UTC
[zfs-discuss] Adding mirrors to an existing zfs-pool
On Tue, Jul 26, 2011 at 1:33 PM, Bernd W. Hennig <consulting at hennig-consulting.com> wrote:> G''Day, > > - zfs pool with 4 disks (from Clariion A) > - must migrate to Clariion B (so I created 4 disks with the same size, > ?avaiable for the zfs) > > The zfs pool has no mirrors, my idea was to add the new 4 disks from > the Clariion B to the 4 disks which are still in the pool - and later > remove the original 4 disks. > > I only found in all example how to create a new pool with mirrors > but no example how to add to a pool without mirrors a mirror disk > for each "disk" in the pool. > > - is it possible to add disks to each disk in the pool (they have different > ?sizes, so I have exact add the correct disks form Clariion B to the > ?original disk from Clariion B)from "man zpool" zpool attach [-f] pool device new_device Attaches new_device to an existing zpool device. The existing device cannot be part of a raidz configuration. If device is not currently part of a mirrored configuration, device automatically transforms into a two-way mirror of device and new_device. If device is part of a two-way mirror, attaching new_device creates a three-way mirror, and so on. In either case, new_device begins to resilver immediately. -f Forces use of new_device, even if its appears to be in use. Not all devices can be overridden in this manner.> - can I later "remove" the disks from the Clariion A, pool is intact, user > ?can work with the poolzpool detach pool device Detaches device from a mirror. The operation is refused if there are no other valid replicas of the data. If you''re using raidz, you can''t use zpool attach. Your best bet in this case is zpool replace. zpool replace [-f] pool old_device [new_device] Replaces old_device with new_device. This is equivalent to attaching new_device, waiting for it to resilver, and then detaching old_device. The size of new_device must be greater than or equal to the minimum size of all the devices in a mirror or raidz configuration. new_device is required if the pool is not redundant. If new_device is not specified, it defaults to old_device. This form of replacement is useful after an existing disk has failed and has been physically replaced. In this case, the new disk may have the same /dev path as the old device, even though it is actually a different disk. ZFS recognizes this. -f Forces use of new_device, even if its appears to be in use. Not all devices can be overridden in this manner. -- Fajar