Using the maprcli volume upgrade format Command

Use the following command to upgrade a volume from the old format to the new format:

maprcli volume upgradeformat [ -cluster cluster_name ] -name volumeName

For example, vol999 is an old volume (mirrortype 0):

root@node-20:~# maprcli volume upgradeformat -name vol999 -json
{
 "timestamp":1433465410299,
 "timeofday":"2015-06-04 05:50:10.299 GMT-0700",
 "status":"OK",
 "total":0,
 "data":[
 ]
}
After the upgradeformat command has been run, the volume’s mirror type is now 3:
root@node-20:~# maprcli volume info -name vol999 -json | grep mirrortype
   "mirrortype":3,

The upgradeformat operation takes some time to complete, depending on the number of containers, but the volume remains accessible for reads and writes during the operation. The mirror type does not get updated until the operation is complete.

Do not attempt to mirror data to a volume that is in the process of being upgraded. A mirroring operation will hang and must be aborted if it attempts to mirror from an old source volume that is in the process of being upgraded to the new type.

The system does not provide any progress information during the upgradeformat operation.

The upgradeformat command returns an error in the following situations:

  • If the volume is already a promotable (new-format) volume:
    mapr@node-20:~$ maprcli volume create -name volume1
    ...
    mapr@node-20:~$ maprcli volume upgradeformat -name volume1
    ERROR (22) -  Volume upgradeformat failed: volume1 is already in new type. Invalid argument
  • If the volume is an old-format mirror volume. You cannot upgrade a mirror volume that was created in the old format.
Note: Upgraded source volumes must mirror to new-type mirror volumes. If you upgrade to Version 5.0 and upgrade your source volumes, you cannot continue to use old-type mirror volumes for mirroring. You must create new mirror volumes in Version 5.0. However, a maprcli command (maprcli volume mirror start) that attempts to mirror to an old mirror volume from a new source volume will not fail at the CLI prompt. The maprcli interface does not validate volume types. You need to monitor the attempted mirror operation itself to detect any errors.