A method for managing the size of a storage device, comprising:
- providing the storage device that has a processor, a root complex connected to the processor and including a root port, an interface device including an endpoint, and a switch that mutually connects the root port and the interface device, wherein
- the switch includes:
- a first port connected to the root port, a second port connected to the endpoint, a plurality of cross-link ports that are mutually connected with a cross-link;
- a virtual switch for connection to the root port, the virtual switch having an upstream bridge connected to the root port;
- and
- a virtual switch for connection to the cross-link, the virtual switch having an upstream bridge connected to the cross-link;
- the method being adapted to add, to the storage device in operation in which the processor is configured to control the interface device by accessing the endpoint using a path that passes through the root port, the first port, and the second port, and a path that passes through the root port, the first port, the cross-link, and the second port;
- one or more add-on storage devices each having the same configuration as the storage device and having the same number of, or a different number of, endpoints as/from the storage device, the method comprising:
- causing the processor of the storage device to, in response to an instruction to add the storage device, hot-remove a PCI function of the endpoint that is accessed from the virtual switch for connection to the cross-link;
- causing an MR-PCIM of the storage device to, in response to an instruction to remove the cross-link connection of the storage device, update a global key, which contains information to identify a virtual hierarchy, of the virtual switch for connection to the cross-link whose cross-link has been removed, and a global key of the PCI function that has been hot-removed with a global key representing a virtual hierarchy used in the add-on storage device;
- causing the MR-PCIM of the storage device to, in response to a connection between the cross-link ports of the storage device and cross-link ports of the add-on storage device, recognize a switch and an end-point of the add-on storage device;
- causing the processor of the storage device to hot-add a PCI function of the endpoint that is accessed using a virtual switch for connection to the cross-link of the add-on storage device;
- and
- causing a processor of the add-on storage device to hot-add the PCI function of the endpoint that is accessed using a virtual switch for connection to a root port of the add-on storage device and to hot-add the PCI function of the endpoint that is accessed using the virtual switch for connection to the cross-link of the storage device.