**Hwi-Ho Lee 1, Jung-Hyok Kwon 2,\* and Eui-Jik Kim 1,\***


Received: 30 January 2020; Accepted: 18 March 2020; Published: 24 March 2020

**Abstract:** This paper presents a virtual private storage framework (VPSF) using Internet of Things (IoT) local networks. The VPSF uses the extra storage space of sensor devices in an IoT local network to store users' private data, while guaranteeing expected network lifetime, by partitioning the storage space of a sensor device into data and system volumes and, if necessary, logically integrating the extra data volumes of the multiple sensor devices to virtually build a single storage space. When user data need to be stored, the VPSF gateway divides the original data into several blocks and selects the sensor devices in which the blocks will be stored based on their residual energy. The blocks are transmitted to the selected devices using the modified speedy block-wise transfer (BlockS) option of the constrained application protocol (CoAP), which reduces communication overhead by retransmitting lost blocks without a retransmission request message. To verify the feasibility of the VPSF, an experimental implementation was conducted using the open-source software *libcoap*. The results demonstrate that the VPSF is an energy-efficient solution for virtual private storage because it averages the residual energy amounts for sensor devices within an IoT local network and reduces their communication overhead.

**Keywords:** constrained application protocol; Internet of Things local network; sensor device; speedy block-wise transfer; virtual private storage

#### **1. Introduction**

As the amount of data produced by individuals has increased explosively in recent years, so has the demand for storage solutions for efficiently storing, accessing, and managing user data [1–4]. Two representative storage solutions are typically considered for storing user data: cloud storage and on-premises storage. Cloud storage stores user data on remote servers maintained by third-party service providers such as Google Drive, Apple iCloud, and Dropbox [5–7]. On-premises storage stores user data on local servers dedicated to specific users such as network-attached storage (NAS) [8]. Cloud storage does not require hardware installation at a personal site but is vulnerable to data leakage because it can be accessed by anyone over the Internet [9–11]. Consequently, users are reluctant to store critical data using cloud storage. In contrast, on-premises storage can help to prevent data leakage because the user can set the security policy of the local server to control how the data are stored and who has access [12,13]. However, local storage demands a high cost to install and maintain the hardware, with the risk that all data can become inaccessible due to a local server failure [14].

Meanwhile, with the spread of the Internet of Things (IoT), embedded sensor devices interacting each other over an IoT local network have been deployed in real-world applications [15–18]. As the requirements for IoT applications become more complex, sensor devices tend to be designed with sufficient storage space (e.g., on-board memory and external memory) to perform specific operations reliably [19]. Accordingly, to solve the problems of existing storage solutions, the extra storage space of sensor devices can be merged to build local storage virtually (virtual storage) that does not require additional hardware installation costs and effectively prevents data leakage. Moreover, even when some sensor devices fail, user data stored in the other sensor devices are accessible. Even though the virtual storage is often too small due to the limited number of sensor devices or extra storage size, it can be very useful for storing various kinds of data that require privacy, but are only up to kilobyte in size, such as personal health and financial data. However, sensor devices have physical resources that are inherently limited, such as batteries and microcontroller units (MCUs) [20]. Consequently, the following must be considered when designing virtual storage using such sensor devices.


In order to build the storage using sensor devices within an IoT local network, the distributed file system (DFS) solutions such as Ceph, Lustre, Hadoop Distributed File System (HDFS), and Google File System (GFS) can be used [21–24]. The DFS makes it possible to divide a data file into several parts and store them in multiple different devices. To this end, the DFS maintains the list and information of all stored files as metadata (i.e., type, size, attributes, etc.) via name nodes or meta-servers. However, the existing DFS solutions do not consider the limited physical resources of sensor devices composing the IoT local network. Thus, DFS-based storage is highly likely to suffer from unreliable data access due to the energy-depleted sensor devices and the high communication overhead. The recent paradigm of fog computing (a.k.a., edge computing) seems to be an ideal solution to build virtual storage using sensor devices in the IoT local network, because it is expected to benefit an IoT local network by reducing energy consumption, increasing bandwidth utilization, and enhancing security/privacy compared to cloud computing [25–27]. However, when it comes to implementing virtual data storage based on the fog computing paradigm, the research on its implementation technology is still in its infancy. In order to implement virtual data storage based on fog computing, the technologies capable of logically integrating and managing the storage space of edge devices are required, and in addition, various aspects of the data storage system, such as energy consumption, bandwidth, fault tolerance, scalability, and security, should be considered. However, only a few research efforts have been put into fog computing-based virtual data storage [28,29].

This paper presents a virtual private storage framework (VPSF) using Internet of Things (IoT) local networks. The VPSF uses the extra storage space of sensor devices in an IoT local network to store users' private data, while guaranteeing expected network lifetime, by partitioning the storage space of a sensor device into data and system volumes, and, if necessary, logically integrating the extra data volumes of the multiple sensor devices to virtually build a single storage space. When user data need to be stored, the VPSF gateway divides the original data into several blocks and selects the sensor devices in which the blocks will be stored based on their residual energy. The blocks are transmitted to the selected devices using the modified speedy block-wise transfer (BlockS) option of the constrained application protocol (CoAP), which reduces communication overhead by retransmitting lost blocks without a retransmission request message [30–32]. To verify the feasibility of the VPSF, an experimental implementation was conducted using the open-source software *libcoap* [33,34]. The results demonstrate that the VPSF is an

energy-efficient solution for virtual private storage because it averages the residual energy amounts for sensor devices within an IoT local network and reduces their communication overhead.

The rest of this paper is organized as follows. Section 2 describes the VPSF design in detail. Section 3 presents the results of the implementation and performance evaluation. Finally, Section 4 concludes the paper.
