Re: How to use replacement?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 4 Jun 2012 09:53:21 +0800 majianpeng <majianpeng@xxxxxxxxx> wrote:

> Hi:
> 	At present, md is supporting replacement.
> 	In function: state_store()
> >   } else if (cmd_match(buf, "replacement")) {
> >		/* Can only set a device as a replacement when array has not
> >		 * yet been started.  Once running, replacement is automatic
> >		 * from spares, or by assigning 'slot'.
> >		 */
> 		I can using spare disk.But how to use slot?

If you want to ensure that a particular device becomes a replacement for a
particular other device, then
  cd /sys/block/mdX/md
  echo frozen > sync_action
  echo NN:MM > new_dev  # where NN is major and MM is minor of new device
  echo want_replacement > rdSS/state  # where SS is slot number of device to
                          # replace
  echo SS > dev-YYY/slot  # where YYY is the kernel name of the newly added
                          # device
  echo idle > sync_action

should do it, but I haven't tested recently.

NeilBrown


> >		if (rdev->mddev->pers)
> >			err = -EBUSY;
> 		
> 
> 
> --------------
> majianpeng

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux