1. Field of the Invention
The invention relates to shared resources. More specifically, the invention relates to automatic allocation of shares for shared resources in a client-server environment.
2. Background
Use of shared resources in a client-server environment is ubiquitous. Typically, when a shared resource, such as storage devices or printers, are attached to the server, the server indicates that those devices are available for sharing by adding the device to a shared resources table. Creation of this table requires a fair amount of overhead and administration. When, for example, a disk in installed, the server goes through the basic input output system (“BIOS”) to enable it to recognize the disk. The disk is then known locally and the server goes through its management interface to identify which directories (or the whole disk) are to be shared. Typically, a human administrator is required to identify which disk directories and/or printers to share, assign names to the shared resources and establish access rights. The server then interacts with the clients on the network, using, for example, server message block (SMB) protocol alternatively known as common internet file system (CIFS) protocol to define the shares allocated to various clients. The shared resources table is maintained on the server and when the shared resource device is unplugged from the server, the corresponding entries from the shared resource table are deleted. Thus, if the device is again attached, the users must reestablish their shares.
The invention is illustrated by way of example and not by way of limitation in the figures of the accompanying drawings in which like references indicate similar elements. It should be noted that references to “an” or “one” embodiment in this disclosure are not necessarily to the same embodiment, and such references mean at least one.
The processor detects connections to its ports 112 and 114. When a shared resource, such as printer 128 is connected, the processor identifies the connection, checks to see if the shared resource is a known resource, (e.g., exists in the descriptor table 110). In one embodiment, the server 100 reads information such as manufacturer, product name and serial number through e.g., a 1394 or USB interface, and compares that information to information in the descriptor table 110. If the shared resource exists in the descriptor table 110, it will automatically be shared under the same name under which it was previously shared. If the printer 128 is unknown, the server automatically creates a unique name under which to share the device based on information such as the manufacturer, product name, or serial number of the device. The name is then added to the descriptor table 110 so the device 128 may be recognized later. While this occurs automatically, in some embodiments, a system administrator may override the automatic name and share allocations. Moreover, while the above discussion is in the context of a printer, it applies equally to other storage free devices such as scanners, cameras, etc.
When the processor detects the connection of a storage device, such as disk 118, it automatically queries the device for the presence of a share indicator. If a share indicator is present, the device is a known device and the processor 102 adds its shares as previously defined to the shared resource table 106. In one embodiment, the processor 102 consults the directory 130 on the disk for share allocation information. The share information may be embodied as a share descriptor file which provides a description of which directories on the disk should be shared, under what names those directories should be shared, and any other parameters that govern the sharing. A check sum file may also be present to authenticate the contents of the share file. In one embodiment, the check sum file contains a MD5 check sum of the contents of the share file. If such share information is found, additional shares are allocated according to that information. The allocation is added to the shared resource table 106. If the device is not a known device, the processor assigns the device a unique name to be used when clients want to identify the device subsequently.
For unknown storage devices, shares may be automatically allocated based on the type of storage device present. For example, in one embodiment, if the device is a CD-ROM (in one embodiment, CD-ROM's are treated as a special case of a storage device), the server automatically creates a read-only browsable share which is the root directory using its volume label as the share name. For a hard disk, the automatically created share may be the root directory that is browsable and read-write. For portable media, such as Zip drives, the share automatically created may be similar to the CD-ROM case with writability enabled by manual configuration by the administrator. Because the shares are retained in the share file on the media, the generated device and share names survive both accidental and controlled restart of the server 100.
In one embodiment, while the disk 118 is plugged in, all writes are required to be “write through cache.” This reduces the risk of data loss upon unplugging. Also, in one embodiment, the server 100 periodically clears a dirty bit that indicates the “volume mounted” to increase the probability that an unsolicited unplug followed by a hot plug will correctly be interpreted by the server 100 as a hot plug of a correctly dismounted disk. In one embodiment, the clearing occurs at least once per minute. If a resource is unplugged for a period of time, the processor 102 will eventually age out the entry corresponding to that resource from the descriptor table. In one embodiment, entries age out of the descriptor table after seven (7) days. After an entry is aged out, the corresponding device becomes unknown.
If at decision block 206 the shared resource is writable, the determination is made at decision block 212 whether a share directory is present. If the share directory is present, at decision block 214 a determination is made if a share descriptor file exists. If the share descriptor file exists, a decision is made at decision block 216 whether a check sum file exists. If the check sum file exists, the contents of the check sum file are evaluated at decision block 218 to determine if the check sum is valid. The check sum may be, for example, an MD5 check sum of the contents of the share file. If the check sum is valid at functional block 220, the share descriptor file is read. Then at functional block 222, shares are allocated according to the contents of the share descriptor file. Those shares are then reflected in a share descriptor file in memory and the shared resource table.
If at any of decision blocks 212 through 218, the directory, file, or check sum are not present or not valid, the server creates a share directory in the root directory of the storage device at functional block 224. In this context, “creates” means to generate if not yet existing and to clear and repopulate if already existing e.g., the case where the directory exists, but the check sum is invalid. At functional block 226, a share descriptor file is created in the share directory. At functional block 228, a check sum file is created in the share directory. The share descriptor file contains the information defining the sharing of the device as discussed above. In one embodiment, the share descriptor file specifies that the root of the device is to be shared. At functional block 230, share information is stored in the share descriptor file. At functional block 232, a check sum is performed on the share file. At functional block 234, the check sum determined is written to the check sum file. Shares of the resource are then allocated according to the contents of the share file at functional block 222.
In the foregoing specification, the invention has been described with reference to specific embodiments thereof. It will, however, be evident that various modifications and changes can be made thereto without departing from the broader spirit and scope of the invention as set forth in the appended claims. The specification and drawings are, accordingly, to be regarded in an illustrative rather than a restrictive sense.
Number | Name | Date | Kind |
---|---|---|---|
5243543 | Notess | Sep 1993 | A |
5282247 | McLean et al. | Jan 1994 | A |
5428769 | Glaser et al. | Jun 1995 | A |
5692111 | Marbry et al. | Nov 1997 | A |
5768524 | Schmidt | Jun 1998 | A |
5841991 | Russell | Nov 1998 | A |
5857076 | Schmidt | Jan 1999 | A |
6012145 | Mathers et al. | Jan 2000 | A |
6041063 | Povlsen et al. | Mar 2000 | A |
6044444 | Ofek | Mar 2000 | A |
6044468 | Osmond | Mar 2000 | A |
6067545 | Wolff | May 2000 | A |
6073188 | Fleming | Jun 2000 | A |
6098120 | Yaotani | Aug 2000 | A |
6182167 | Basham et al. | Jan 2001 | B1 |
6289023 | Dowling et al. | Sep 2001 | B1 |
6327613 | Goshey et al. | Dec 2001 | B1 |
6374352 | Goldman et al. | Apr 2002 | B1 |
6389029 | McAlear | May 2002 | B1 |
6421723 | Tawil | Jul 2002 | B1 |
6513101 | Fisher et al. | Jan 2003 | B1 |
6549966 | Dickens et al. | Apr 2003 | B1 |
6564371 | Goldman et al. | May 2003 | B1 |
6611866 | Goldman et al. | Aug 2003 | B1 |
6628661 | Goldman et al. | Sep 2003 | B1 |
6665714 | Blumenau et al. | Dec 2003 | B1 |
6742034 | Schubert et al. | May 2004 | B1 |
6799255 | Blumenau et al. | Sep 2004 | B1 |
6807632 | Carpentier et al. | Oct 2004 | B1 |
6895588 | Ruberg | May 2005 | B1 |
6895855 | Doll | May 2005 | B2 |
6940825 | Goldman et al. | Sep 2005 | B2 |
6947991 | Burton et al. | Sep 2005 | B1 |
6957301 | Deenadhayalan et al. | Oct 2005 | B2 |
7099943 | Tondering et al. | Aug 2006 | B1 |
7206282 | Goldman et al. | Apr 2007 | B1 |
7246372 | Takahashi et al. | Jul 2007 | B2 |
7320033 | Bradfield et al. | Jan 2008 | B2 |
20010043702 | Elteto et al. | Nov 2001 | A1 |
20010052073 | Kern et al. | Dec 2001 | A1 |
20020078161 | Cheng | Jun 2002 | A1 |
20020184361 | Eden | Dec 2002 | A1 |
20030074431 | Abbondanzio et al. | Apr 2003 | A1 |
20030115255 | Kuroshima | Jun 2003 | A1 |
20030188162 | Candelore et al. | Oct 2003 | A1 |
20040062209 | Goldman et al. | Apr 2004 | A1 |
20040162921 | Teow et al. | Aug 2004 | A1 |
20040190052 | Sando | Sep 2004 | A1 |
20040236731 | Tamai et al. | Nov 2004 | A1 |
20050120082 | Hesselink et al. | Jun 2005 | A1 |
20050154553 | Wheeler et al. | Jul 2005 | A1 |
20050177633 | Plunkett | Aug 2005 | A1 |
20050198222 | Kohinata et al. | Sep 2005 | A1 |
20060173969 | Wilson | Aug 2006 | A1 |
Number | Date | Country |
---|---|---|
10320142 | Dec 1998 | JP |