From 33414a0182ae193150f65f7bca97a7e4d818a49e Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 15 Jun 2010 17:55:41 -0700 Subject: Kill subarray v2 Support for deleting a subarray out of a container. When all subarrays are deleted the component devices are converted back into spares, a --zero-superblock is still needed to kill the remaining metadata at this point. This operation is blocked when the subarray is active and may also be blocked by the metadata handler when deleting the subarray might change the uuid of other active subarrays. For example, with imsm, deleting subarray 'n' may change the uuid of subarrays with indexes > n. Deleting a subarray needs to be a container wide event to ensure disks that record the modified subarray list perceive other disks that did not receive this change as out of date. Notes: The st->subarray parsing in super-intel.c and super-ddf.c is updated to be more strict now that we are reading user supplied subarray values. Offline container modification shares actions that mdmon typically handles so promote is_container_member() and version_to_superswitch() (formerly find_metadata_methods()) to generic utility functions for the cases where mdadm performs the operation. Signed-off-by: Dan Williams --- mdadm.8 | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'mdadm.8') diff --git a/mdadm.8 b/mdadm.8 index 4edfc41..784ba31 100644 --- a/mdadm.8 +++ b/mdadm.8 @@ -1172,6 +1172,16 @@ overwritten with zeros. With the block where the superblock would be is overwritten even if it doesn't appear to be valid. +.TP +.B \-\-kill\-subarray= +If the device is a container and the argument to \-\-kill\-subarray +specifies an inactive subarray in the container, then the subarray is +deleted. Deleting all subarrays will leave an 'empty-container' or +spare superblock on the drives. See \-\-zero\-superblock for completely +removing a superblock. Note that some formats depend on the subarray +index for generating a UUID, this command will fail if it would change +the UUID of an active subarray. + .TP .BR \-t ", " \-\-test When used with -- cgit From aa534678baad80689a642ba1bd602a00a267ac03 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 22 Jun 2010 16:30:59 -0700 Subject: Rename subarray v2 Allow the name of the array stored in the metadata to be updated. In some cases the metadata format may not be able to support this rename without modifying the UUID. In these cases the request will be blocked. Otherwise we allow the rename to take place, even for active arrays. This assumes that the user understands the difference between the kernel node name, the device node symlink name, and the metadata specific name. Anticipating further need to modify subarrays in-place, introduce the ->update_subarray() superswitch method. A future potential use case is setting storage pool (spare-group) identifiers. Signed-off-by: Dan Williams --- mdadm.8 | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'mdadm.8') diff --git a/mdadm.8 b/mdadm.8 index 784ba31..1909819 100644 --- a/mdadm.8 +++ b/mdadm.8 @@ -1182,6 +1182,14 @@ removing a superblock. Note that some formats depend on the subarray index for generating a UUID, this command will fail if it would change the UUID of an active subarray. +.TP +.B \-\-update\-subarray= +If the device is a container and the argument to \-\-update\-subarray +specifies a subarray in the container, then attempt to update the given +superblock field in the subarray. See below in +.B MISC MODE +for details. + .TP .BR \-t ", " \-\-test When used with @@ -1760,6 +1768,28 @@ metadata is platform independent metadata failed to find its platform components on this system .RE +.TP +.B \-\-update\-subarray= +If the device is a container and the argument to \-\-update\-subarray +specifies a subarray in the container, then attempt to update the given +superblock field in the subarray. Similar to updating an array in +"assemble" mode, the field to update is selected by +.B \-U +or +.B \-\-update= +option. Currently only +.B name +is supported. + +The +.B name +option updates the subarray name in the metadata, it may not affect the +device node name or the device node symlink until the subarray is +re\-assembled. If updating +.B name +would change the UUID of an active subarray this operation is blocked, +and the command will end in an error. + .TP .B \-\-examine The device should be a component of an md array. -- cgit