KR20130104110A - Method for sharing data in nas and nas capable of sharing data - Google Patents
Method for sharing data in nas and nas capable of sharing data Download PDFInfo
- Publication number
- KR20130104110A KR20130104110A KR1020120025303A KR20120025303A KR20130104110A KR 20130104110 A KR20130104110 A KR 20130104110A KR 1020120025303 A KR1020120025303 A KR 1020120025303A KR 20120025303 A KR20120025303 A KR 20120025303A KR 20130104110 A KR20130104110 A KR 20130104110A
- Authority
- KR
- South Korea
- Prior art keywords
- file
- usb
- nas
- loop
- storage module
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/067—Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1097—Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present invention relates to a method of sharing data on a NAS. In one embodiment of the present invention, if the USB device via the USB interface and the IP device via the network interface is confirmed to be connected to the NAS, and the USB device and the IP device is confirmed that the connected to the NAS area that the USB device is accessed A first file for the USB device and a second file for the IP device are generated and stored for the first device, and the first file and the second file may be synchronized with each other. The first file and the second file are generated as an image file for storing the contents included in the corresponding area, and the first file and the second file are respectively included in the g_file_storage module included in the kernel of the operating system running on the NAS; It can be managed by a loop device. As a result, a remote operating IP device can access an area accessed by a USB device in a NAS operating as a Linux operating system, and data recorded through the USB device or the IP device can be accessed and read.
Description
The present invention relates to a data sharing method in a NAS, and more particularly, to a method for allowing a device connected to a network and a device connected to a network to share files.
Recently, more and more people use portable computers such as tablet PCs, notebook PCs, and smartphones, and because of the well-equipped internet infrastructure, they are not satisfied with fixed desktop PCs in cafes, subways, and even at home. do. In addition, the desire to import and write large amounts of data over the Internet is increasing, and NAS (Network Attached Storage), a device that enables users to access their data anytime and anywhere when only the Internet is connected, becomes popular. .
The NAS can simply be defined as network-attached storage, which does not depend on a computer and runs independently, has independent power and IP addresses, so it can be used for a long time without powering down the computer.
It is often said that the NAS market will shrink as the cloud market called virtual servers grows, but the functions of using the network to insert and remove files that users want are almost the same as the cloud. However, the NAS market is not shrinking and growing steadily, which means that the concept of the cloud is not yet in place for the average consumer, it is a burden to use the cloud that is not yet stabilized, and the user who is extremely sensitive to security. They prefer a NAS that can be viewed as a personal cloud and as a personal network HDD.
The NAS is connected to external devices via the network and USB interface. When an external device is connected via the USB (Universal Serial Bus) interface, the area accessed by the device connected via the USB interface in the data storage space is connected to other devices connected via the network. There is a limitation that makes the device inaccessible.
Accordingly, an object of the present invention is to solve the above problems, and an object of the present invention is to provide a method for allowing a device connected by a USB interface in a NAS to be accessed through a network.
Another object of the present invention is to provide a method for sharing a storage space of a NAS with a device connected via a USB interface and a network.
A data sharing method in a NAS according to an embodiment of the present invention for achieving the above object comprises the steps of checking whether a USB device via a USB interface and an IP device via a network interface is connected to the NAS; If it is determined that the USB device and the IP device are connected to the NAS, generating and storing a first file for the USB device and a second file for the IP device in an area accessed by the USB device; And synchronizing the first file and the second file.
In an embodiment, the first file and the second file may be generated as image files that store contents included in the corresponding area.
In an embodiment, the first file may be managed by a g_file_storage module included in a kernel of an operating system running on the NAS, and the second file may be managed by a loop device included in the kernel.
In one embodiment, the loop device may connect the second file to the loop device node and mount it in a predetermined directory so that the IP device can use the second file as a block device.
In one embodiment, the file structure of the first file and the second file may be shared internally of the operating system running on the NAS.
In one embodiment, the method may further comprise checking whether a write command is issued by the USB device or the IP device.
In an embodiment, the g_file_storage module managing the first file may check whether a SCSI command related to writing is issued by the USB device.
In one embodiment, the g_file_storage module may convert the issued SCSI command into a file write command and update the first file according to the converted write command. In this case, the loop device managing the second file may update the second file according to the first file updated by the g_file_storage module to synchronize the first file and the second file.
In an embodiment, the loop device managing the second file may determine whether a write command is issued by the IP device through an internal write function.
According to another embodiment of the present invention, a data sharing NAS includes: a memory for temporarily storing data generated during an execution of an application program and loading a kernel of an operating system; A central processor configured to execute an application program, output a control signal according to the kernel loaded in the memory, and store data generated in the execution process of the application program in the memory; Storage for storing at least one of the operating system, applications, and content data; A USB interface for connecting with a USB device; And a network interface for connecting to an IP device, wherein the kernel is executed by the central processing unit to check whether a USB device via the USB interface and an IP device via the network interface are connected to a NAS. When it is confirmed that the USB device and the IP device are connected, a first file for the USB device and a second file for the IP device are generated and stored for the area in the storage accessed by the USB device, and the first file is stored. And the second file to be synchronized.
In an embodiment, the first file and the second file may be generated as an image file that stores contents included in a corresponding area, and may be managed by a g_file_storage module and a loop device included in the kernel, respectively.
In one embodiment, the g_file_storage module checks whether a SCSI command related to writing is issued by the USB device, converts the issued SCSI command into a file writing command, and updates the first file according to the converted writing command, The loop device may update the second file according to the first file updated by the g_file_storage module to synchronize the first file and the second file.
As a result, a remote operating IP device can share data by accessing the USB device from the NAS running the Linux operating system.
In addition, the data changed by the connected USB device or the IP device can also share the changed content in the IP device or USB device.
FIG. 1 illustrates an x-HDD region in which a device connected through a USB interface is accessed by a device connected through a USB interface, and thus cannot be accessed by a device connected through a network.
2 illustrates a sharing area in which a device connected through a USB interface and a device connected through a network share access according to the present invention,
3 illustrates a configuration of a NAS to which a data sharing method according to the present invention is applied,
FIG. 4 conceptually illustrates an embodiment of managing and synchronizing a file accessed by a device connected through a USB interface and a file accessed by a device connected through a network through different modules, at an internal layer level,
5 is a flowchart illustrating an operation of a data sharing method in a NAS according to an embodiment of the present invention.
Hereinafter, an embodiment of a data sharing method in a NAS according to the present invention will be described in detail with reference to the accompanying drawings.
FIG. 1 illustrates an x-HDD region in which a device connected through a USB interface of a conventional NAS accesses a device connected through a network.
On the disk of the hard disk drive (HDD), which is a large data storage of the NAS, there is a directory structure as shown in Fig. 1 (a situation in which there are a large number of files such as
The x-HDD region shown in FIG. 1 cannot be accessed by a device connected via a network, so that other directories under the root, that is, files such as
In particular, since the NAS is always powered on and the USB interface is physically connected via the USB line, when the NAS is left with USB devices connected via the USB line, external devices can access the NAS remotely via IP. When you do this, you cannot search or browse the area that the USB device is accessing, that is, the current directory and any directories or files under it.
Accordingly, the present invention provides a method of sharing an x-HDD area accessed by a USB device connected through a USB interface so that an IP device connected to a network can access the same.
In one embodiment of the present invention, the area used for accessing the x-HDD area through the network and the area used for accessing the x-HDD area via USB are used as general files instead of physical partitions and synchronized with each other. It can be written on one side and read on the other side. That is, the file system of the x-HDD accessed by the USB device is stored as a regular file, and the file is shared at the same time by synchronizing the connection between the path accessed by the USB device and the path accessed by the IP device.
In one embodiment of the present invention, for example, a TV is connected to the NAS via a USB interface, the NAS receives the broadcast content received from the TV and stores it on a hard disk, and a PC connected to the NAS and a network is stored on the hard disk. A scenario of playing back broadcast content is conceivable.
The USB interface allows USB devices such as PCs, TVs, PMPs, tablets, smart phones, MP3 players, e-books, digital cameras and camcorders to connect to the NAS, and smart devices equipped with IP functions to connect to the NAS. Can be. USB devices must be physically adjacent to the NAS because they are wired via a USB interface via a USB line, but devices connected via a network are space-limited because they are connected to the NAS by wire or wirelessly based on IP.
3 illustrates a configuration of a NAS to which a data sharing method according to an embodiment of the present invention is applied.
The NAS 100 according to an embodiment of the present invention may include a
The
The
The
The
The
In the kernel of an operating system loaded in the
For reference, the loop device and the block device will be briefly described.
Loop devices are device drivers that allow an image file (such as a file with an extension of .img, .iso, .bin, etc.) to be mounted and mounted as if it were a regular block device. In other words, you can view and write the contents of an image file so that it can be used as a general block device. The loop device must be linked to a file in the file system before it can be used, mounted in a directory, and has the same effect as mounting a disk. This disk image is identical to the file associated with the device above that directory.
Mounting a file to a directory consists of connecting the file to the loop device node using a specific command and mounting the device node to the directory in relation to other block devices. For example, if example.img is a regular file and / home / you / dir is a directory on a Linux box, the root user can mount the file in the directory with two commands:
losetup / dev / loop0 example.img
mount / dev / loop0 / home / you / dir
The first command associates the loop device node / dev / loop0 with the regular file example.img, which can later be removed with the command losetup -d / dev / loop0. The second command mounts the device in the / home / you / dir directory. The net effect of these two commands is that they are used to store the entire directory where the contents of the file are mounted.
In addition, a block device is a device that reads and writes data in units of blocks such as a floppy disk, a hard disk, and a CD-ROM. Usually, the first thing we need to do to install an operating system on a PC is to partition and format it. Formatting refers to the installation of a file system so that an operating system can use a physical disk. The reason for installing a file system is that the physical disk and the smallest unit of data used by the operating system are different. Disks are arranged at regular intervals along the disk's concentric circles, with a minimum unit of 512 bytes in sectors, while the smallest unit of the operating system is a file, and the files are of different sizes. Therefore, the operating system manages the disk by dividing the physical disk into block units and assigning an address to each block. A block of a block device may mean a block in a file system.
A regular file system partitions the disk and then formats it for the operating system. It also defines a file system, such as FAT32 or NTFS for windows and ext3, 4 for Linux. Defining and formatting a file system creates a file system buffer area on the disk and causes I / O through that buffer area.
One block device can handle multiple block devices, and each disk is usually divided into partitions, so each partition is considered a logical block device. The block device driver handles all the Virtual File System (VFS) system calls that occur on the device files associated with the block device, and each block device is represented by a block device script.
The g_file_storage module operates in a USB mode when an external USB device accesses a file or directory of the
When the external device accesses the
When a USB device and an external device via IP are connected to the
Accordingly, the g_file_storage module opens the File_USB in response to a read request of the USB device connected to the
In addition, similar to the operation of the g_file_storage module, when the external device connected to the
In this way, the two modules do not share a physical partition, but each opens a separate file, allowing access to the same area at the same time without fear of conflict.
When the USB device or the external device accesses File_USB or File_pub and reads only the File_USB or File_pub, the additional operation is not necessary.
However, when the USB device accesses the File_USB and creates a new file or directory in the file to record data or modifies an existing file or directory included in the file, the modified File_USB and the external device access. File_pub may be different, which can be a problem. Similarly, when the external device accesses the File_pub and creates a new file or directory in the file to record data or modifies an existing file or directory included in the file, the modified File_pub and the USB device access. File_USB will be different.
In order to solve this problem, the g_file_storage module and the loop device may synchronize two files by reflecting a file changed by another module in the corresponding file. In addition, the g_file_storage module and the loop device monitor whether a write command has been issued to check whether a file shared by another module is changed by another module, and reflect the file to process the file if a write command is detected.
5 is a flowchart illustrating an operation of a data sharing method in a NAS according to an embodiment of the present invention.
The kernel of the operating system executed by the
When the USB device is connected, the g_file_storage module included in the kernel operates to record data when the connected external USB device accesses a file or directory of the
When both the USB device and the IP device are connected (YES in S510 and S520), the g_file_storage module is connected to the USB device for x-HDD which is connected to the connected USB device and is an area (files and subdirectories within the directory) in the
When the g_file_storage module and the loop device request reading by accessing File_USB or File_pub, respectively, the g_file_storage module and the loop device read the directory or file data included in the file and transmit the read data to the requested device.
The two modules of the g_file_storage module and the loop device respectively monitor whether a write command is issued (S560), and the kernel of the operating system or the g_file_storage module is a SCSI (Small Computer System) related to writing such as Write6, Write10, Write12 by a USB device. Interface) command is issued, and the kernel of the operating system or the loop device monitors whether a write command is issued by the IP device through an internal write function.
If a write command is detected (YES in S560), when a write command by the USB device is detected, the g_file_storage module converts the SCSI command into a file write command and executes it to update the File_USB file while recording data in the File_USB file and The loop device reflects the change in the File_USB file in the File_pub file (S570). Alternatively, if a write command by the IP device is detected, when the write command to the file system is detected, the loop device updates the File_pub file while writing data in the File_pub file, and the g_file_storage module changes the File_pub file to the File_pub file. Reflect the content.
Thereafter, the g_file_storage module or the loop device performs synchronization on the File_USB file and the File_pub file (S580), and the synchronization in step S580 may include an operation of reflecting the modified File_USB file on the actual physical partition.
For example, if a TV, which is a USB device, is connected through the
This operation is repeated until the system is terminated (S590).
As a result, a remote operating IP device can access an area accessed by a USB device in a NAS operating as a Linux operating system, and data recorded through the USB device or the IP device can be accessed and read.
It will be apparent to those skilled in the art that various modifications and variations can be made in the present invention without departing from the spirit or scope of the invention as defined in the appended claims. Addition or the like.
100: NAS 110: memory
120: central processing unit 130: storage
140: USB interface 150: network interface
Claims (15)
If it is determined that the USB device and the IP device are connected to the NAS, generating and storing a first file for the USB device and a second file for the IP device in an area accessed by the USB device; And
And synchronizing the first file and the second file.
And the first file and the second file are generated as image files storing contents included in a corresponding area.
And the first file is managed by a g_file_storage module included in a kernel of an operating system running on the NAS, and the second file is managed by a loop device included in the kernel.
And said loop device connects said second file to a loop device node and mounts it in a predetermined directory so that said IP device can use said second file as a block device.
And a file structure of the first file and the second file are shared internally by an operating system running on the NAS.
And checking whether a recording command is issued by the USB device or the IP device.
The g_file_storage module managing the first file checks whether a SCSI command related to writing is issued by the USB device.
The g_file_storage module converts the issued SCSI command into a file write command and updates the first file according to the converted write command.
And a loop device managing the second file updates the second file according to the first file updated by the g_file_storage module to synchronize the first file and the second file.
And a loop device managing the second file checks whether a write command is issued by the IP device through an internal write function.
A central processor configured to execute an application program, output a control signal according to the kernel loaded in the memory, and store data generated in the execution process of the application program in the memory;
Storage for storing at least one of the operating system, applications, and content data;
A USB interface for connecting with a USB device; And
Configured to include a network interface for connecting to IP devices,
The kernel is executed by the central processing unit,
Confirm that the USB device via the USB interface and the IP device via the network interface are connected to the NAS, and when the USB device and the IP device are confirmed to be connected, the USB device is connected to an area within the storage accessed by the USB device. And generate and store a first file and a second file for the IP device, and synchronize the first file and the second file.
And the first file and the second file are generated as image files storing contents included in a corresponding area, and are managed by a g_file_storage module and a loop device included in the kernel, respectively.
The g_file_storage module checks whether a SCSI command related to recording is issued by the USB device, converts the issued SCSI command into a file write command, updates the first file according to the converted write command,
And the loop device updates the second file according to the first file updated by the g_file_storage module to synchronize the first file and the second file.
And the loop device connects the second file to the loop device node and mounts it in a predetermined directory so that the IP device can use the second file as a block device.
And the loop device checks whether a write command is issued by the IP device through an internal write function.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020120025303A KR20130104110A (en) | 2012-03-13 | 2012-03-13 | Method for sharing data in nas and nas capable of sharing data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020120025303A KR20130104110A (en) | 2012-03-13 | 2012-03-13 | Method for sharing data in nas and nas capable of sharing data |
Publications (1)
Publication Number | Publication Date |
---|---|
KR20130104110A true KR20130104110A (en) | 2013-09-25 |
Family
ID=49453010
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020120025303A KR20130104110A (en) | 2012-03-13 | 2012-03-13 | Method for sharing data in nas and nas capable of sharing data |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR20130104110A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102053836B1 (en) | 2018-05-31 | 2019-12-09 | (주)피디씨 | Data sharing system and method between closed intranet and open intranet |
-
2012
- 2012-03-13 KR KR1020120025303A patent/KR20130104110A/en not_active Application Discontinuation
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102053836B1 (en) | 2018-05-31 | 2019-12-09 | (주)피디씨 | Data sharing system and method between closed intranet and open intranet |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8615594B2 (en) | Virtual media with folder-mount function | |
US9250822B2 (en) | Data storage method and data storage apparatus | |
CN106164884B (en) | Data storage device with embedded software | |
US9235583B2 (en) | Virtual media with folder-mount function | |
CN1822004B (en) | System and method for using a file system to automatically backup a file as a generational file | |
TWI628540B (en) | Method and computer system for performing transparent mass storage backups and snapshots | |
US9990136B2 (en) | Methods and devices for booting a network attached storage with two logical units | |
JP2009187544A (en) | Unit for implementing rewritable mode on removable disk drive storage system | |
KR101533427B1 (en) | Mobile storage device providing mass virtual storage space and providing method thereof | |
JP2014533850A (en) | Method, computer program and storage system for reading a file stored on a storage system | |
WO2016110004A1 (en) | Management method and apparatus for disk storage space, and storage device | |
US11263090B2 (en) | System and method for data packing into blobs for efficient storage | |
US20120311002A1 (en) | Computer and data management method by the computer | |
US20100180080A1 (en) | External storage device having a self-contained security function | |
US20140372745A1 (en) | Booting a server using a remote read-only memory image | |
JP6200091B2 (en) | Camera that supports removable storage device divided into multiple partitions | |
US20120017061A1 (en) | Methods and apparatus for controlling data between storage systems providing different storage functions | |
US20150153766A1 (en) | Camera supporting removable storage divided into multiple partitions | |
US20140019709A1 (en) | Methods and Systems For Using Distributed Allocation Tables | |
KR20130104110A (en) | Method for sharing data in nas and nas capable of sharing data | |
US8200936B2 (en) | Systems and methods for recording information to a memory card | |
TWI497414B (en) | File executing method and system | |
US20100274828A1 (en) | Electronic Device, Storage Area Allocation Method for File System, and Computer Product | |
ES2917252T3 (en) | Dynamic establishment of real-time file system compatibility | |
JP5135696B2 (en) | Electronic device and object management method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
WITN | Withdrawal due to no request for examination |