<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Web Hosting Skills Rss Feed</title><link>http://www.webhostingskills.com/articles/</link><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/webhostingskills" /><description>Web hosting skills - the Internet&amp;#039;s largest source of searchable information related to web hosting, IT industry news, tutorials, technology, companies and their articles.</description><language>en</language><copyright>Copyright 2013</copyright><managingEditor>farrukhny@gmail.com</managingEditor><lastBuildDate>Thu, 21 Mar 2013 09:14:01 PDT</lastBuildDate><admin:generatorAgent xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" rdf:resource="http://expressionengine.com/" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/webhostingskills" /><feedburner:info uri="webhostingskills" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>webhostingskills</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2Fwebhostingskills" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fwebhostingskills" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2Fwebhostingskills" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/webhostingskills" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fwebhostingskills" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fwebhostingskills" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fwebhostingskills" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><item><title>Windows Azure Storage (WAS) - Architecture</title><link>http://feedproxy.google.com/~r/webhostingskills/~3/CR8TI9sC-FM/windows_azure_storage_architecture</link><category>Tutorials, 
      Windows Server,</category><pubDate>Thu, 21 Mar 2013 09:14:01 PDT</pubDate><guid isPermaLink="false">http://www.webhostingskills.com/articles/windows_azure_storage_architecture</guid><description>&lt;p&gt;Good afternoon, ladies and gentlemen!&lt;/p&gt;

&lt;p&gt;WAS - cloud storage system that provides customers with the ability to store virtually unlimited amounts of data over any period of time. WAS was introduced in production-version in November 2008. Previously, it was used for internal purposes only Microsoft applications such as, for example, storing videos, music and games storage of medical records, etc. The article is based on work with the service repository and dedicated to the principles of operation of these services. &lt;/p&gt;

&lt;p&gt;WAS customers have access to their data from anywhere at any time and pay only for what they use and store. WAS stored in data use both local and geographic replication to implement recovery after serious failures. At the moment, the repository WAS consists of three abstractions - blobs (files), Tables (structured storage) and queue (the message). These three data abstraction cover the need for different types of data storage for most applications. A common use case is to store data in blobs, queues using the same data is transmitted in these blobs, interim same data, status, and such temporary data stored in tables or blobs.&lt;/p&gt;

&lt;p&gt;During the development of WAS were taken into account customer needs, and the most significant characteristics of architecture are:&lt;/p&gt;

&lt;ul&gt;
&amp;nbsp;  &lt;li&gt;Strong consistency - many customers want to have strict consistency, especially for corporate customers, which transfer to the cloud infrastructure. They also want to have the possibility to read, write, and delete under certain conditions for optimistic control strictly consistent data - for the Windows Azure Storage provides that the CAP-Theorem (Consistency, Availability, Partition-tolerance) is described as slozhnodostizhimoe at one point time: strong consistency, high availability, and Partition Tolerance.&lt;/li&gt;

&amp;nbsp;   &lt;li&gt;Global and highly scalable namespace - for ease of use in the store WAS implemented global namespace, which enables you to store data and access them from anywhere in the world. Since one of the main goals of WAS is to allow storage of large volumes of data, a global name space must be able to address the exabytes of data.&lt;/li&gt;

&amp;nbsp;   &lt;li&gt;Disaster recovery - WAS stores customer data in multiple data centers, which are located within a few hundred miles away from each other, and this redundancy provides effective protection against data loss due to a variety of situations, such as earthquakes, fires, tornadoes, and so on.&lt;/li&gt;

&amp;nbsp;  &lt;li&gt;Multitenantnost and storage costs - reducing the cost of storage many customers are served from the one shared storage infrastructure, and WAS with this model, when the repository of many different clients with different storage capacity necessary for them grouped in one place, greatly reduces the total required amount of available storage than if WAS singled separate equipment for each customer.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Consider partitsiiruemoe more global namespace. A key goal of Windows Azure storage is to provide a single global name space, which would allow customers to place and resize any amount of data in the cloud. To provide a global namespace WAS uses DNS as part of the namespace, and the namespace is composed of three parts: the account storage partition name and object name. &lt;/p&gt;

&lt;p&gt;Example:&lt;br /&gt;
http (s) :/ / AccountName..core.windows.net / PartitionName / ObjectName &lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
&lt;strong&gt;AccountName &lt;/strong&gt;- Store account name chosen by the client, is part of the DNS-name. This is used for the storage location of the main cluster, and, in fact, the data center, which stores the data and where to send all requests for data for this account. Client in one application can use multiple accounts names and store the data in a completely different field.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PartitionName&lt;/strong&gt; - the name of the partition that defines the location of the data when queried cluster storage. PartitionName used to scale-up access to the data storage across multiple sites, depending on traffic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ObjectName&lt;/strong&gt; - if partition the set of objects to uniquely identify the object used ObjectName. The system supports atomic transactions for objects within a PartitionName. ObjectName value option for certain types of data PartitionName can uniquely identify the object within your account.&lt;/p&gt;

&lt;p&gt;In WAS can be used to the full name of a blob blobs as PartitionName. For tables, be aware that each entity in the table has a primary key consisting of PartitionName and ObjectName, which allows you to group entities into one partition for an atomic transaction. Queues PartitionName value is the queue name, each message is placed in the queue has its own ObjectName, uniquely identifies the message within the queue. &lt;/p&gt;

&lt;h2&gt;Architecture WAS&lt;/h2&gt;

&lt;p&gt;Fabric-controller manages, monitoring, fault tolerance, and many other tasks in the data center. This mechanism, which is aware of everything that happens in the system, starting with a network connection and ending state of the operating systems in virtual machines. The controller maintains constant contact with their own agents, installed on the operating system and sending complete information on what is happening with this operating system, including OS version, service configuration, package configuration and so on. As for storage, the Fabric Controller allocates resources and manages the replication and distribution of data on disks, as well as load balancing and traffic. Windows Azure Storage architecture is shown in Figure 1.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://www.webhostingskills.com/images/uploads/articles_images/wsc.png" alt="WAS" height="526" width="650"  /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
Location Service (LS). This service manages all SS and namespace for accounts for all SS. LS distributes accounts for SS and implements load balancing and other management tasks. The very same service distributed over two geographically separated sites for own own safety. &lt;/p&gt;

&lt;p&gt;Stream Layer (SL). This layer stores data on disk and is responsible for the distribution and replication of data across servers to store data within the SS. SL can be seen as a distributed file system layer within each SS, reads files (&amp;#8220;streams&amp;#8221;), how to store these files, replicate, and so on. The data is stored on the SL, but is available with Partition Layer. SL provides, in essence, an interface that is used only PL, and file system API, allows you to perform operations such as recording only Append-Only, which allows PL to open, close, delete, rename, read, add parts and combine large files &amp;#8221; streams &amp;#8220;, ordered lists of large chunks of data, called&amp;#8221; extents &amp;#8220;(Fig. 2). &lt;/p&gt;

&lt;p&gt;&lt;img src="http://www.webhostingskills.com/images/uploads/articles_images/b25454a0898bebd7cd7725cfa543361f.png" alt="was" height="350" width="650"  /&gt;&lt;/p&gt;

&lt;p&gt;Stream can have multiple pointers to extents, and each extent contains a set of blocks. In this case, the extents can be &amp;#8220;sealed» (sealed), that is, add to them new pieces of data impossible. If you are trying to read data from a Stream, the data will be recorded in succession from E1 to the extent extent at E4. Each stream is considered Partition Layer as one big file, and the content can be changed Stream or refer to the random-mode.&lt;/p&gt;

&lt;p&gt;Block. The minimum unit of data available for reading and writing, which may be up to a certain N bytes. All recorded data is written to an extent in one or more of the combined blocks, the blocks do not have to be the same size.&lt;/p&gt;

&lt;p&gt;Extent. Extents called units Replication Stream Layer, and the default Storage Stamp store three replicas for each extent, stored in the NTFS-file consists of blocks. The extent size used Partition Layer, 1 GB, while the smallest objects are complemented Partition Layer to one extent, and sometimes to a single unit. To store very large objects (such as blobs), the object is divided into several Partition Layer extents. Here, of course, Partition Layer ensures that, to what extent and what objects belong to the blocks. &lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
&lt;img src="http://www.webhostingskills.com/images/uploads/articles_images/ce6940d36475293fd8b7bc38ca9ae9ce.png" alt="inside" height="403" width="650"  /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
&lt;strong&gt;Stream Manager (SM)&lt;/strong&gt;. Stream Manager monitors namespace stream-s, controls the status of all active stream and the extent and location between Extend Node, monitors the health of all Extend Node, creates and distributes extents (not blocks - they do Stream Manager does not know), and provides a lazy perereplikatsiyu extents replica was lost due to a hardware error or simply inaccessible and collects &amp;#8220;garbage extents.&amp;#8221; Stream Manager periodically polls and synchronizes the status of all Extend Node and extents that they hold. If SM reveals that the extent razreplitsirovan at less than the expected number of EN, SM produces perereplikatsiyu. The volume of the state if it can be called, can be small enough to fit in the memory of a Stream Manager. Only consumer and customer Stream Layer is Partition Layer, and they are so designed that they can not use more than 50 million and no more extents 100.000 Stream for one Storage Stamp (units are not taken into account, as they can be quite incalculable number) that quite fit in 32 GB memory Stream Manager.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Extent Nodes (EN)&lt;/strong&gt;. Each EN manages the repository for the replica set of extents assigned to them SM. EN N has attached disks, which are under the full control of it to maintain replicas of extents and blocks. In this case, EN does not know anything about the Stream (in contrast to the Stream Manager, who knows nothing about the blocks), and controls only extents and blocks that (extents) are, in fact, the files on the disk containing the data blocks and their checksums + card associations shifts in extents to the corresponding blocks and their physical location. Each EN has some idea of ​​its extent and that, where the cues for specific extents. When specific extents no longer referenced by any one of the Stream-s, Stream Manager collects these &amp;#8220;junk&amp;#8221; and the extents of the need to notify the EN make room. The data in the Stream can only be added to the existing well data can not be modified. The add an atom - or the entire block of data is added or not added anything. At one point in time may be added to a few blocks in a single atomic operation, &amp;#8220;adding a few blocks.&amp;#8221; Minimum size, which is available to read from the Stream, is one unit. The operation is to add multiple blocks allows the customer to record large amounts of sequential data in a single operation.&lt;/p&gt;

&lt;p&gt;Each extent, as has been said, has a definite ceiling on the size, and when it is full, the extent of the sealed (sealed) and further write operations operate on the new extent. In sealed extent can add data, and it is immutable (immutable). &lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
There are some rules regarding the extents:&lt;/p&gt;

&lt;p&gt;1. After adding the record and confirm the transaction to the client, all further reads that record from any replica must return the same data (immutable).&lt;br /&gt;
2. After sealing extent all read from any printed replica must return the same content extent.&lt;/p&gt;

&lt;p&gt;For example, when the Stream is created, SM appoints first extent three replicas (one primary and two secondary) for the three Extent Nodes, which, in turn, selected SM for a random distribution between the different domains of updates and fixes and given the possibility of load balancing. Besides SM decides which replica will be Primary for all extents and write operations are performed first on the extent of the primary EN, and only then with the primary EN record takes two secondary EN. Primary EN and location of the three replicas does not change to an extent. When SM allocates an extent, the information is sent back to extent at the customer, who then knows what EN contain three replicas and which one is the primary. This information becomes part of the metadata Stream and cached on the client. When the last extent in the Stream is sealed, the process is repeated. SM allocates another extent, which now becomes the last extent in the Stream, and all new write operations are performed on a new last extent. To the extent each operation adding replicated three times on all replicas of the extent that the client sends all requests to write to the primary EN, but the read operation may be made to any replica, even unsealed extents. Append operation is sent to the primary EN, and primary EN is responsible for determining the shift in the extent and sequencing of all write operations in the event that occurs in parallel recording of one extent, sending an add with the necessary shift to two secondary EN and sending to the client for confirmation which is sent only when the operation was confirmed by adding the three replicas. If one of the replicas is not responding or is (or there was) any hardware error, an error is returned to the client record. In this case, the client communicates with the SM and the extent in which there is a write operation, sealed SM.&lt;/p&gt;

&lt;p&gt;SM then allocates a new extent with the replicas on other available and EN notes this extent in the latter stream, and information about this back to the client, which continues to make an add in a new extent. It should be mentioned that the entire sequence for the sealing and placement of the new extent performed an average of only 20 milliseconds.&lt;br /&gt;
As for the process of sealing. In order to seal the extent, SM EN polls all three of their current length. In the process of sealing two scenarios - either all replicas of the same size, or some of the replicas is longer or shorter than the others. The second situation is only for error adding, when any of the EN (but not all) were not available. When sealing extent SM chooses the shortest length, based on the available EN. This allows you to seal the extents so that all changes are confirmed to the client, will be sealed. After sealing the extent confirmed by a length does not change and if the SM can not communicate with EN during sealing, but then becomes available to EN, SM EN this leads to the confirmation of the length of sync, leading to the same set of bits.&lt;/p&gt;

&lt;p&gt;However, there may arise a different situation - SM can not communicate with EN, but Partition Server, which is a client, it can. Partition Layer, which a little later, has two modes of reading - reading records in certain positions and with the help of iterating through all the records in the stream. As to the first - Partition layer uses two types of Stream - a record and a blob. For these Stream reads always occur for certain positions (extent + shift length). Partition Layer performs the read operation for the two types, using the position information returned by a previous successful operation to add Stream Layer, which happens only when all three cues have reported that the operation succeeded added. In the second case, when all the entries in the Stream are moving sequentially, each partition has two separate Stream (metadata and log evidence) that Partition Layer will be read sequentially from beginning to end.&lt;/p&gt;

&lt;p&gt;In the Windows Azure Storage introduced a mechanism to save on disk space and traffic without compromising the availability of data, and it is called erasure codes. The essence of this mechanism is that the extent is divided into N roughly equal-sized pieces (in practice, this is again a file), then the algorithm of Reed-Solomon codes added M fragments, correcting an error. What does this mean? Any X of N fragments equal in size to the original file to restore the original file is enough to collect all the fragments X and decode, and the remaining NX fragments can be removed, broken and so on. As long as the system is stored in more than fragments of M codes, error correction, the system can completely restore the original extent.&lt;/p&gt;

&lt;p&gt;This optimization sealed extents very important when huge volumes of data stored in the cloud storage because it allows to reduce the cost of storage with three complete replicas of the original data source data to 1.3-1.5 depending on the number of fragments, and also extends the &amp;#8220;sustainability&amp;#8221; of the data compared with three replicas in storage Storage Stamp.&lt;/p&gt;

&lt;p&gt;When performing write operations to the extent that has three replicas, all operations are put on performance with a certain time and, if the operation is not completed within this time, the operation should not be performed. If EN specifies that the read operation can not be fully implemented for some time, he immediately informs the customer. This mechanism allows the client to address with the read another EN.&lt;br /&gt;
Similarly, the data for which is used erasure coding - when a read operation does not have time to execute for the time period because of the workload, the operation can not be used to read the full piece of data, but it can take the opportunity to reconstruct the data and in this case refers to the read all the fragments in the extent to erasure code, and the first N responses will be used to reconstruct the desired fragment.&lt;br /&gt;
Drawing attention to the fact that the system can handle WAS very large Streams, may encounter the following situation: some physical drives serve and closed on serving large read or write operations from crop capacity for other operations. To prevent this, WAS does not assign the new disk I / O-operation when he was already scheduled for surgery that can be performed more than 100 milliseconds, or if already appointed operations were assigned, but not executed for 200 milliseconds.&lt;/p&gt;

&lt;p&gt;When the data is defined as recorded Stream Layer, is an additional drive or a SSD as a storage for log of all entries in the EN. Disk logging completely allotted for one magazine, which consistently write operations are logged. When each EN performs the add operation, it writes the data to disk journaling and starts writing data to disk. If the disk journaling returned a successful operation before the data will be buffered in memory for as long as all the data is written to disk, all reads are served from memory. Disk usage logger provides important advantages, such as an add does not have to &amp;#8220;compete&amp;#8221; with the disk read data to confirm the transaction for the client. Journal allows operations to add Partition Layer to be more consistent and have less delay.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
&lt;strong&gt;Partition Layer (PL).&lt;/strong&gt; This layer contains special Partition Servers (daemon process) and is designed to manage your own abstractions storage (blobs, tables, and queues), namespace, order transaction, strict consistency of the objects, store data on SL and caching data reducing the number of I / O operations to disk. PL also involved partitioning of data objects within SS according PartitionName and further load balancing between servers partitions. Partition Layer provides an internal data structure called the Object Table (OT), which is a large table that can grow up to several petabytes. OT, depending on the load dynamically partitioned into RangePartitions and distributed to all in Partition Server Storage Stamp. RangePartition is a range of records in OT, starting with the smallest key is provided to the highest key.&lt;/p&gt;

&lt;p&gt;There are several different types of OT:&lt;br /&gt;
• Account Table stores the metadata and configuration of storage for each account associated with the Storage Stamp.&lt;br /&gt;
• Blob Table stores all objects blobs for all accounts associated with Storage Stamp.&lt;br /&gt;
• Entity Table keeps all records of the entity account for all the storage associated with the Storage Stamp and is used to store table service Windows Azure.&lt;br /&gt;
• Message Table stores all messages for all queues for the storage of all accounts associated with Storage Stamp.&lt;br /&gt;
• Schema Table tracking scheme for all OT.&lt;br /&gt;
• Partition Map Table monitors all current RangePartitions for all Object Table and what Partition Server service which RangePartition. This table is used FE-servers to route requests to appropriate Partition Server.&lt;/p&gt;

&lt;p&gt;Tables of all types have a fixed pattern that is stored in the Schema Table.&lt;br /&gt;
For all the schemes OT has a standard set of property types - bool, binary, string, DateTime, double, GUID, int32 and int64, in addition, the system supports two special properties and DictionaryType BlobType, the first of which allows for the addition of properties without specific schema as a record . These properties are stored in such a dictionary in the form of (Name, type, value). The second special feature is used to store large amounts of data and is currently used only for Blob Table, and the data blobs are not stored in the stream of records, and in a separate thread for the data blob is essentially the same stores only a reference to the data blob (list links &amp;#8220;extent + shift length&amp;#8221;). OT support standard operations - insert, update, delete, and read, as well as batch transactions for records with the same value PartitionName. Operations in a single package are confirmed as one transaction. OT also supports snapshot isolation to allow the read operation is carried out operations in parallel. &lt;/p&gt;

&lt;p&gt;&lt;img src="http://www.webhostingskills.com/images/uploads/articles_images/2dade71.png" alt="partition" height="458" width="650"  /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
Partition Manager (PM) monitors and shares the big OT on N RangePartition within Storage Stamp and assigns certain RangePartition Partition Server. Information about what is stored where, stored in Partition Map Table. One RangePartition appointed one active Partition Server, which ensures that the two RangePartition not intersect.&lt;br /&gt;
Each Storage Stamp has multiple instances of PM and they &amp;#8220;compete&amp;#8221; for one Leader Lock, stored in Lock Service.&lt;/p&gt;

&lt;p&gt;Partition Server (PS) services requests for RangePartitions, appointed by the server PM and stores all state partitions in Streams and manages the cache in memory. PS is capable of handling several RangePartition several OT, perhaps to an average of ten. PS serves the following components, keeping them in mind:&lt;br /&gt;
• Memory Table, version of the log evidence for RangePartition, containing all the recent changes that have not yet been confirmed by the reference point.&lt;br /&gt;
• Index Cache, cache, containing the reference point position data flow records.&lt;br /&gt;
• Row Data Cache, in-memory cache for data pages to record a checkpoint. This cache is only available for reading. When an access to the cache, checked Row Data Cache and Memory Table with preference to the latter.&lt;br /&gt;
• Bloom Filters - if the data is not found in the Row Data Cache and Memory Table, we examined the positions and checkpoints in the data stream, and their rough sorting is inefficient, and so for each control point using special bloom-filters that indicate whether it may be accessed to a record in the checkpoint.&lt;/p&gt;

&lt;p&gt;Lock Service is used to select the service PM. Each PS also manages leasing with Lock Service to service partitions. On error, all PS N RangePartitions, serves this PS, forwarded available PS. PM picks N PS, based on their load, then PM appoints RangePartitions PS and updates Partition Map Table of relevant data that allows Front-End Layer find location RangePartitions, referring to Partition Map Table. RangePartition uses to store data Log-Structured Merge-Tree, each RangePartition has its own set of Streams in the Stream Layer and Stream relates entirely to certain RangePartition.&lt;/p&gt;

&lt;p&gt;Each RangePartition can be one of the following Streams:&lt;br /&gt;
• Metadata Stream - Stream that is central to RangePartition. PM appoints PS partition, giving the name of the Metadata Stream PS.&lt;br /&gt;
• Commit Log Stream - Stream that is designed to store logs confirmed the insert, update, delete, applied to RangePartitions from the last point generated for RangePartition.&lt;br /&gt;
• Row Data Stream stores data records and position for RangePartitions&lt;br /&gt;
• Blob Data Stream used only for Blob Table to store the data blobs.&lt;br /&gt;
All of these are different Stream Stream to Stream Layer, controlled OT RangePartition. Each RangePartition in OT has only one data stream, eliminating the Blob Table - RangePartition Blob Table in a stream of data records to store the data for the last checkpoint record (position blob) and a separate data stream for a blob to store the data for a specific type BlobType. &lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
To implement load balancing among Partition Servers and determine the total number of partitions in the Storage Stamp, PM holds three operations:&lt;br /&gt;
• Load Balancing. This operation is defined as a certain PS are overwhelmed, and then one or more RangePartitions reassigned to a less loaded PS.&lt;br /&gt;
• Split. This operation is defined when a certain RangePartition are overwhelmed, and this RangePartition divided into two or more smaller partitions, then these RangePartitions shared by two or more PS. PM sends a command to Split, but decides where the partition will be divided, PS, based on the AccountName and PartitionName. Thus, for example, to separate the two RangePartition B RangePartitions C and D, the following operations:&lt;br /&gt;
o PM sends a command to the PS division B to C and D.&lt;br /&gt;
o PS makes a reference point for B and no longer receive traffic.&lt;br /&gt;
o PS performs a special team MultiModify, collecting Streams with B (metadata, logs, and data verification) and creates a new set of Streams for C and D in the same order as in B (this happens quickly, as are, in fact, only pointers to the data). PS then adds new ranges Partition Key for C and D to the metadata.&lt;br /&gt;
o PS resumes service traffic for new partitions C and D.&lt;br /&gt;
o PS notifies the PM on the implementation of the division, updates Partition Map Table and metadata, then transfers the separated partitions for different PS.&lt;br /&gt;
• Merge. With this operation, the two &amp;#8220;cold&amp;#8221; or lightly loaded RangePartitions together so as to form a range of key issues in their OT. For this PM selects two RangePartitions with adjacent bands PartitionName, Low-load, and performs the following actions:&lt;br /&gt;
o PM carries C and D so that they are served by the PS, PS and tells the team to combine C and D to E.&lt;br /&gt;
o PS remains a reference point for C and D and briefly stops servicing traffic to C and D.&lt;br /&gt;
o PS MultiModify executes the command to create a new log file and confirm the data streams is each of these streams is the union of all the extents of the corresponding fluxes of C and D.&lt;br /&gt;
o PS creates a stream metadata E, containing the names of the log and confirm the data flow, the combined range of keys and indexes for E (extent + offset) for the log evidence (from C and D).&lt;br /&gt;
o begin service traffic RangePartition E.&lt;br /&gt;
o PM renews Partition Map Table and metadata.&lt;br /&gt;
For load balancing, track the following metrics:&lt;br /&gt;
• The number of transactions per second.&lt;br /&gt;
• Average number of pending transactions.&lt;br /&gt;
• Load CPU.&lt;br /&gt;
• The load on the network.&lt;br /&gt;
• Delay requests.&lt;br /&gt;
• Data Size RangePartition.&lt;br /&gt;
PM with controls heartbeat-om each of PS, and the information about it is passed back to the PM in response to heartbeat. If the PM sees RangePartition are overwhelmed (based metrics), he shared partition and sends a command to perform an operation PS Split. PS If he is experiencing a heavy load, but not RangePartition, then PM remaps available at this PS RangePartitions to less loaded PS. For load balancing RangePartition PM sends team PS, having RangePartition, to record the current checkpoint, after which the PS sends a confirmation PM and PM RangePartition overrides another and updates PS Partition Map Table.&lt;/p&gt;

&lt;p&gt;The decision on the choice of partitioning mechanism based band (which employs RangePartition) instead of index-based hashes (when objects are assigned to the server via hash values ​​of their keys) was justified by the fact that partitioning based on ranges helps easier to implement Performance Isolation, as the object of a specific account they are really close to the limits set RangePartitions, indexing based on a hash simplifies the task of the load on the server, but it denies the benefits of local objects to isolate and efficient transfer. Partitioning based on ranges can store objects of the same client together in one set of partitions, which also provides the ability to effectively limit or isolate potentially unsafe accounts. One of the drawbacks of such a campaign is to scale in the sequential access scenarios - for example, if the client writes all data to the end of the key-range table, then all write operations will be redirected to the latest RangePartition customer table. In this case, the advantage of partitioning and load balancing in the system is not used. If the client distributes write operations on a large number PartitionNames, the system quickly separates the table on the set RangePartitions and distributes them across multiple servers, which allows a linear increase efficiency. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Front-End (FE).&lt;/strong&gt; Frontend layer consists of a set of stateless-server listens on. When prompted, FE reads AccountName, authenticate and authorize the request, and then converts it to the server partition to PL (Based on the PartitionName). Servers of the FE, cache, a card partitions (Partition Map), in which the system manages some PartitionName tracking ranges and which server partitions which PartitionNames serves.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Intra-Stamp Replication (stream layer).&lt;/strong&gt; This mechanism controls the synchronous replication and data. He retains enough replicas on different nodes in different domains of errors to save the data in the event of an error, and it is performed entirely in SL. In the case of a write operation received from the client, it is confirmed only after a full successful replication.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Inter-Stamp Replication (partition layer).&lt;/strong&gt; This replication is asynchronous replication between the SS, and he holds that replication in the background. Replication occurs at the object level, that is, either the whole object is replicated or replicates its changes (delta). &lt;br /&gt;
 &lt;/p&gt;

&lt;p&gt;These mechanisms differ in that intra-stamp provides resistance against the &amp;#8220;iron&amp;#8221; errors that occur in large-scale systems, whereas the inter-stamp provides geographic redundancy against a variety of disasters that occur rarely. One of the main scenarios for this type of replication is geographic data replication between storage account data centers in order to recover from natural disasters.&lt;br /&gt;
All data in the services repository blobs and tables are replicated geographically (but turn - no). With geographically redundant storage platform saves again three replicas, but in two locations. When deploying a storage account LS Storage Stamp picks in each of the geographical locations and registers selected AccountName all Storage Stamp, with one of the locations will receive a &amp;#8220;live&amp;#8221; traffic, while the second, secondary, shall act as inter-stamp replication (essentially is the geographic replication). LS then updates the DNS for the new record AccountName.service.core.windows.net, leading to the VIP main location. Thus, if a datacenter something happens, data will be available from the second location. When the write operation goes to the main location for the storage account, the changes are replicated in full with intra-stamp replication in the Stream Layer, then the code of the successful completion of the operation is returned to the client. To confirm the operation is asynchronous replication occurs in a different geographic location and there is a transaction used on Partition Layer.&lt;/p&gt;

&lt;p&gt;Regarding the geographical availability and how everything is restored in the event of major disruptions. If there was a serious failure in the main geographical location, it is natural that the corporation is trying to mitigate the effects of the maximum. However, if all the really bad and the data is lost, you may need to apply the rules of geographic fault tolerance - the customer is notified of the accident occurred in the main location, after which the DNS-record scrape the main location for the second (account.service.core.windows.net ). Of course, in the process of translation DNS-records hardly anything will work, but upon completion of existing blobs and tables are available on their URL. After completion of the transfer of the second geographic location rises in status to the host (as long as the failure does not happen once the data center into the ground). Also, immediately after the process of improving the status of the data center is initiated the process of creating a new second geographical location in the same region and further replication. The development team has been announced that users will be able to choose where it will be the second geographic location, in the event that one region is more than two data centers, but so far I have not noticed this (probably because I do not know of these regions).&lt;/p&gt;

&lt;p&gt;Geographic replication process is much more interesting, if only because that our actions affect it more and more frequently than ephemeral dinosaur ate the data center, which led to a geo-failover.&lt;br /&gt;
So, for example, in our account, there are several stores blobs (example from Team blog), foo and bar. For the full name of the blob blob equal to PartitionKey. We perform two transactions A and B on the blob foo, then perform two transactions X and Y on the blob bar. The system ensures that a transaction will be geographically replicated before transaction B, and, accordingly, the transaction will be X geographically replicated before transaction Y. Otherwise, there are no guarantees - It is unknown how much time will be spent on geographical replication between transactions and transactions on foo to bar. Also, if at the time of replication of data center for some reason fails, it will be impossible to replicate the geographical recent transactions, it may happen that the replicated transaction A and X, whereas the B and Y transactions will be lost. Or replicated only A and B, X and Y will be gone. The same thing could happen with table service (given that the partition tables by a specified application PartitionKey entities, not the name of a blob).&lt;/p&gt;

&lt;h3&gt;Summary&lt;/h3&gt;

&lt;p&gt;Windows Azure storage services are a critical component of the platform, which provides services for the storage of data in the cloud and implement a combination of characteristics such as strong consistency global namespace, and high availability of data in multitenantnosti. &lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/webhostingskills/~4/CR8TI9sC-FM" height="1" width="1"/&gt;</description><feedburner:origLink>http://www.webhostingskills.com/articles/windows_azure_storage_architecture</feedburner:origLink></item><item><title>Main defender left the Adobe Flash in Apple</title><link>http://feedproxy.google.com/~r/webhostingskills/~3/FZ3y1xrnZKc/main_defender_left_the_adobe_flash_in_apple</link><category>Business &amp;amp; Technology,</category><pubDate>Thu, 21 Mar 2013 09:03:11 PDT</pubDate><guid isPermaLink="false">http://www.webhostingskills.com/business_and_technology/articles/main_defender_left_the_adobe_flash_in_apple</guid><description>&lt;img src="http://www.webhostingskills.com/images/uploads/articles_images/_medium/kevin-lynch-adobe.jpg" height="200" width="250" alt="Main defender left the Adobe Flash in Apple" /&gt;&lt;p&gt;Adobe CTO Kevin Lynch went to work for Apple - a company that has blocked Flash on the iPhone, and probably accelerated the decline in the popularity of this technology, writes TechCrunch. Sam Lynch is known for having once wrote a blog Adobe emotional article in defense of Flash, although in recent years he was engaged in Adobe more promising projects.&lt;/p&gt;

&lt;p&gt;Lynch has played an important role in promoting the cloud service Adobe Creative Cloud, as well as leading the development of Adobe Marketing Cloud. Both products have helped to move from Adobe packaged sales to cloud offerings with SaaS-approach to sales. In fact, Lynch has managed to turn a cloudy Adobe company faster than it could other technology companies.&lt;/p&gt;

&lt;p&gt;Lynch also advocated the need for a multi-platform Adobe in the development and design of adaptive products. Thanks to him, Adobe has done a lot for the release of a full-featured products for mobile devices, including Adobe Photoshop Touch for iPad and Photoshop Touch for iPhone.&lt;/p&gt;

&lt;p&gt;Apple made no secret of the fact that he considered the new center of the universe cloud user. iCloud, presented at the WWDC in 2011, was supposed to be just such a center for the ecosystem of Apple. The company has taken some steps for this, making it possible to synchronize your information and media on the iOS and OS X via iCloud. But at the same time, Apple is constantly faced with complaints about the performance of iCloud and iTunes Match.&lt;/p&gt;

&lt;p&gt;Currently responsible for iCloud senior vice president of Apple Eddy Cue. Prior to that, he was engaged by the service predecessor MobileMe, whose reputation was even worse. It is likely that Q can benefit from the support of veterans of cloud services to address shortcomings iCloud.&lt;/p&gt;

&lt;p&gt;Reportedly, Lynch as Vice President of Technology will report to Apple Senior Vice President of Technology Bob Mansfield. Mansfield deals with wireless and semiconductor technologies, but the name of his office gives him greater freedom of action. So if Apple is planning a big cloud breakthrough that Lynch could become a good candidate.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/webhostingskills/~4/FZ3y1xrnZKc" height="1" width="1"/&gt;</description><feedburner:origLink>http://www.webhostingskills.com/business_and_technology/articles/main_defender_left_the_adobe_flash_in_apple</feedburner:origLink></item><item><title>Virtual desktops on Linux</title><link>http://feedproxy.google.com/~r/webhostingskills/~3/p-05hXbI564/virtual_desktops_on_linux</link><category>Tutorials, 
      Linux,</category><pubDate>Thu, 21 Mar 2013 08:52:45 PDT</pubDate><guid isPermaLink="false">http://www.webhostingskills.com/articles/virtual_desktops_on_linux</guid><description>&lt;p&gt;Hello!&lt;/p&gt;

&lt;p&gt;Had this problem:&lt;br /&gt;
deployed on a server one powerful system with possible users of the system, like the desktop. Each user should be assigned a certain strictly defined configuration (for example, 1 core, 2GB operatives, etc.). Everything should be as transparent to the end user (connected, job, disconnected). &lt;/p&gt;

&lt;p&gt;Number of users - not known (ie, at one point they may be one, or maybe 100). Should be something like a pool of dynamically extensible virtual machine to which users connect.&lt;br /&gt;
Wednesday all the same, users do not have to store the final VM.&lt;/p&gt;

&lt;p&gt;Guglenie on this issue has shown that to solve this problem, Microsoft has Virtual Desktop Infrastructure (VDI) , and at VMware - View ( good description of what I want to get ).&lt;/p&gt;

&lt;p&gt;Microsoft solution does not fit - the server VM and customers on Linux.&lt;br /&gt;
VMware solution conditionally suitable, but is unlikely to get it to use in our project because of a proprietary product.&lt;/p&gt;

&lt;p&gt;Question: is there any software that can be as similar to deploy on Linux (RedHat)? KVM, Xen, VirtualBox, etc., interested in any ideas.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/webhostingskills/~4/p-05hXbI564" height="1" width="1"/&gt;</description><feedburner:origLink>http://www.webhostingskills.com/articles/virtual_desktops_on_linux</feedburner:origLink></item><item><title>How to disable PCI-switches on the device on the fly</title><link>http://feedproxy.google.com/~r/webhostingskills/~3/LuxDNx1vvcw/how_to_disable_pci_switches_on_the_device_on_the_fly</link><category>Tutorials, 
      Linux,</category><pubDate>Thu, 21 Mar 2013 08:50:49 PDT</pubDate><guid isPermaLink="false">http://www.webhostingskills.com/articles/how_to_disable_pci_switches_on_the_device_on_the_fly</guid><description>&lt;p&gt;Hello&lt;/p&gt;

&lt;p&gt;I am developing a manual test in which there is a need to simulate disabling SCSI fiber channel. I am developing a manual test in which there is a need to simulate disabling SCSI fiber channel.&lt;br /&gt;
Uses SCSI FC adapter QLogic ISP2532 coupled with OSes CentOS 6.2. There is some progress in research, at the moment I was able to cut off the card through the echo 0&gt; / sys/bus/slot/2-3/power and bring it back through the echo&gt; / sys / bus / pci / rescan. It seems to be all good, except for one. This works only once, that is, After connecting the device, disable it again does not work, and echo 0&gt; / sys/bus/slot/2-3/power simply does not work. Retrip only after rebooting the entire operating system, which I absolutely do not fit. I guess there is a separate system module, which can be rebooted and it will give the desired yaffekt.&lt;/p&gt;

&lt;p&gt;There are ideas, colleagues?&lt;br /&gt;
Advance inordinately.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/webhostingskills/~4/LuxDNx1vvcw" height="1" width="1"/&gt;</description><feedburner:origLink>http://www.webhostingskills.com/articles/how_to_disable_pci_switches_on_the_device_on_the_fly</feedburner:origLink></item><item><title>Does ICANN technically possible to cancel delegation block ip addresses?</title><link>http://feedproxy.google.com/~r/webhostingskills/~3/XvmEzILpbB4/does_icann_technically_possible_to_cancel_delegation_block_ip_addresses</link><category>Business &amp;amp; Technology,</category><pubDate>Thu, 14 Mar 2013 17:06:21 PDT</pubDate><guid isPermaLink="false">http://www.webhostingskills.com/business_and_technology/articles/does_icann_technically_possible_to_cancel_delegation_block_ip_addresses</guid><description>&lt;p&gt;Question humanitarian.&lt;/p&gt;

&lt;p&gt;Increasingly, in the articles on the state of information security, I find the claim of modern states based on ICANN. Since the implementation of many of the functions of the state (in management, defense, economy, etc.) are now going through the Internet, ICANN, «control the Internet,&amp;#8221; theoretically could cripple the state fulfills a number of its functions.&lt;/p&gt;

&lt;p&gt;It is clear that ICANN, manages the routing on the top level of the DNS, theoretically can not bypass a national domain. It is also clear that this problem is easily avoided by using a single gateway between devices inside and root server DNS. Well, citizens living abroad, and the government will not be able to receive services, but sovereignty over the flow of information within its territory the state does not lose.&lt;/p&gt;

&lt;p&gt;However, ICANN&amp;#8217;s still and allocates blocks ip addresses. In this connection, a question arises: whether it can select blocks ip addresses issued by a particular provider? Specifically, whether ICANN technically possible to select ip-address, which is currently running our portal of public services, and give it to someone else?&lt;/p&gt;

&lt;p&gt;Do I understand correctly that even if ICANN would do it, as long as the server is on the network of public services, the new legal owner of ip address would be unable to join the network? And just because of some failure to shut down our server, again it this ip address to get to was not able to? Or is the system does not work?&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/webhostingskills/~4/XvmEzILpbB4" height="1" width="1"/&gt;</description><feedburner:origLink>http://www.webhostingskills.com/business_and_technology/articles/does_icann_technically_possible_to_cancel_delegation_block_ip_addresses</feedburner:origLink></item><item><title>How to install Python3.3 on Debian x64?</title><link>http://feedproxy.google.com/~r/webhostingskills/~3/sCLViNLz8qw/how_to_install_python3.3_on_debian_x64</link><category>Tutorials, 
      Linux,</category><pubDate>Thu, 14 Mar 2013 16:54:06 PDT</pubDate><guid isPermaLink="false">http://www.webhostingskills.com/articles/how_to_install_python3.3_on_debian_x64</guid><description>&lt;p&gt;The situation: a server on a remote Debian 6 x64. There trying to make a Python script.&lt;br /&gt;
For the script needs Python 3.3 (this version, others do not roll) with the module sqlite3 (since the script writes to the database in this format)&lt;/p&gt;

&lt;p&gt;On the server, the default installed python 2.7.&lt;/p&gt;

&lt;p&gt;Managed to collect python3.3 from source.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
But it is unclear how he collected sqlite3. Trying to install sqlite3: &lt;/p&gt;

&lt;div class="codes"&gt;&lt;pre&gt; apt-get install sqlite3 &lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;leads to the fact that it is set for Python 2.7. That, in general, is to be expected.&lt;/p&gt;

&lt;p&gt;Attempt to escape from a heap of different pythons on a single version of Python 3.3, without building from source failed. I read this article . Python found the correct version and under the right architecture&lt;/p&gt;

&lt;p&gt;Prescribed repository python3.3 in / etc / apt / sources.list like this:&lt;/p&gt;

&lt;p&gt;&amp;nbsp;   deb ftp.de.debian.org / debian Experimental main &lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
Old updated on packages: &lt;/p&gt;

&lt;div class="codes"&gt;&lt;pre&gt; apt-get update &amp;amp;&amp;amp; apt-get upgrade &lt;/pre&gt;&lt;/div&gt;

&lt;p&gt; and when trying to install version 3.3: &lt;/p&gt;

&lt;div class="codes"&gt;&lt;pre&gt; apt-get install python3.3 &lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;throws out a lot of missing dependencies in other packages:&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
How to solve the problem in the end?&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/webhostingskills/~4/sCLViNLz8qw" height="1" width="1"/&gt;</description><feedburner:origLink>http://www.webhostingskills.com/articles/how_to_install_python3.3_on_debian_x64</feedburner:origLink></item><item><title>OpenSUSE 12.3 released</title><link>http://feedproxy.google.com/~r/webhostingskills/~3/p01tbTh88Bg/opensuse_12.3_released</link><category>Tutorials, 
      Linux,</category><pubDate>Thu, 14 Mar 2013 16:52:26 PDT</pubDate><guid isPermaLink="false">http://www.webhostingskills.com/articles/opensuse_12.3_released</guid><description>&lt;p&gt;Today, March 13, 2013, without delay was a new release of the popular distribution openSUSE 03/12 .&lt;br /&gt;
Of the innovations is worth noting:&lt;/p&gt;

&lt;p&gt;&amp;nbsp;   Full transition to systemd, support journald.&lt;br /&gt;
&amp;nbsp;   UEFI support for x86_64, experimental support for Secure Boot.&lt;br /&gt;
&amp;nbsp;   Is under way to develop openSUSE 12.3 for ARMv7.&lt;br /&gt;
&amp;nbsp;   MariaDB instead of MySQL by default. &lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
Just updated the following programs:&lt;/p&gt;

&lt;p&gt;&amp;nbsp;   Linux 3.7.10.&lt;br /&gt;
&amp;nbsp;   KDE 4.10.&lt;br /&gt;
&amp;nbsp;   Gnome 3.6.3&lt;br /&gt;
&amp;nbsp;   Xorg 1.13&lt;br /&gt;
&amp;nbsp;   Mesa 9&lt;br /&gt;
&amp;nbsp;   PulseAudio 3 &lt;/p&gt;



&lt;p&gt;And, of course, not dull the new wallpaper . By the way, the dark color scheme is actually quite pleasant.&lt;br /&gt;
Also immediately with a clean install is possible to drive Memtest (available from GRUB2). In addition to the above, there are other innovations narrower character. For example, the first release, including a full range of OpenStack «Folsom» for cloud platforms. Also, now officially supported E17, Sawfish and Awesome. Also in the description pretty much told to increase the performance / completion of any part of the distribution (integration Bluetooth&amp;#8217;a, YaST, PackageKit general rewrite, etc.). Despite the fact that the distribution switched to systemd, still available service management using files and / etc / init.d.&lt;/p&gt;

&lt;p&gt;Traditionally, the installation package is available for i686 and x86_64 or Coordinated Universal 4,7 DVD image, or Live and KDE 4.10 or Gnome 3.6.3, or network installer. Live-images weigh slightly less than 1 GiB, which makes it impossible to write this image to a CD, but now on Live-image hold more programs (in particular, it has finally turned gparted).&lt;/p&gt;

&lt;p&gt;Let us hope that the work done well, congratulations to all users of this great distribution with the new release.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/webhostingskills/~4/p01tbTh88Bg" height="1" width="1"/&gt;</description><feedburner:origLink>http://www.webhostingskills.com/articles/opensuse_12.3_released</feedburner:origLink></item><item><title>Linux 3.8 Local Root Vulnerability</title><link>http://feedproxy.google.com/~r/webhostingskills/~3/Gk2WgtxXD48/linux_3.8_local_root_vulnerability</link><category>Tutorials, 
      Linux,</category><pubDate>Thu, 14 Mar 2013 16:50:23 PDT</pubDate><guid isPermaLink="false">http://www.webhostingskills.com/articles/linux_3.8_local_root_vulnerability</guid><description>&lt;p&gt;It seems that the call clone () with parameters CLONE_NEWUSER | CLONE_FS results in a uid 0, ie, provides a standard user root.&lt;br /&gt;
The exploit only works if the kernel includes support for namespaces, and the user has write access to the root file system (in a lot of root systems and home partition is on the same topic).&lt;/p&gt;

&lt;p&gt;To launch the exploit in a 32-bit environment, change all occurrences of lib64 to lib, and ld-linux-x86-64.so.2 to ld-linux.so.2.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/webhostingskills/~4/Gk2WgtxXD48" height="1" width="1"/&gt;</description><feedburner:origLink>http://www.webhostingskills.com/articles/linux_3.8_local_root_vulnerability</feedburner:origLink></item><item><title>IP-address in the headers Google Apps</title><link>http://feedproxy.google.com/~r/webhostingskills/~3/NtbzH2e7x50/ip_address_in_the_headers_google_apps</link><category>Tutorials, 
      Networking,</category><pubDate>Thu, 14 Mar 2013 16:46:25 PDT</pubDate><guid isPermaLink="false">http://www.webhostingskills.com/articles/ip_address_in_the_headers_google_apps</guid><description>&lt;p&gt;As everyone knows, when you send mail through GMail site in header indicates IP-address (usually a field called &amp;#8221; X-Originating-IP &amp;#8220;or« Received »). Google explains this by the fact that the anti-spam filters enough internal GMail.&lt;/p&gt;

&lt;p&gt;For Google Apps domains on this rule does not work, and in headings indicate X-Originating-IP, is not so in all domains - some address hiding. On Google and our support is not no clear explanation, in which cases the address indicated.&lt;/p&gt;

&lt;p&gt;Possibly a IP-address to be useful, when Google Apps be able to use for free, but not so long ago, they closed a free registration, leaving only tariffs for business customers.&lt;/p&gt;

&lt;p&gt;There are no representatives of Google? Explain, please, is it possible to disable the recording of this title, or to explain why and when it is recorded?&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/webhostingskills/~4/NtbzH2e7x50" height="1" width="1"/&gt;</description><feedburner:origLink>http://www.webhostingskills.com/articles/ip_address_in_the_headers_google_apps</feedburner:origLink></item><item><title>New distribution Backtrack: Meet Kali Linux</title><link>http://feedproxy.google.com/~r/webhostingskills/~3/pTlgi9Oh2Hw/new_distribution_backtrack_meet_kali_linux</link><category>Tutorials, 
      Linux,</category><pubDate>Thu, 14 Mar 2013 16:41:16 PDT</pubDate><guid isPermaLink="false">http://www.webhostingskills.com/articles/new_distribution_backtrack_meet_kali_linux</guid><description>&lt;img src="http://www.webhostingskills.com/images/uploads/tutorials_images/_medium/a.png" height="200" width="250" alt="New distribution Backtrack: Meet Kali Linux" /&gt;&lt;p&gt;Known distribution for pentestinga BackTrack changes name to Kali Linux and moved to Ubuntu on Debian. Kali Linux is the best Linux distribution for penetration testing and security audit.&lt;/p&gt;

&lt;p&gt;Kali is a complete reassembly BackTrack Linux, fully adhering to development standards Debian. The entire infrastructure has been revised, all instruments have been analyzed and packaged, also used Git.&lt;/p&gt;

&lt;p&gt;More than 300 tools for penetration testing: After consideration of each instrument, which was included in BackTrack, was removed a large number of tools that either do not work or duplicate other instruments with similar functionality.&lt;/p&gt;

&lt;p&gt;Kali Linux, like its predecessor, is a completely free and always will be. You never have to pay for Kali Linux.&lt;/p&gt;

&lt;p&gt;Open source.&lt;/p&gt;

&lt;p&gt;FHS compliant: Kali has been designed to adhere to Filesystem Hierarchy Standard, which allows all users to easily find the Linux binaries, support files, libraries, etc.&lt;/p&gt;

&lt;p&gt;Extensive support for wireless devices.&lt;/p&gt;

&lt;p&gt;Secure development environment: Kali Linux development team consists of a small group of trusted individuals who can write packages and interact with storage only when using multiple security protocols.&lt;/p&gt;

&lt;p&gt;Multilingualism: Although tools for pentest, usually written in English, we have ensured that Kali is the real multi-language support, allowing most users to work in their native language and to find the tools you need for the job.&lt;/p&gt;

&lt;p&gt;Fully customizable: We are fully aware that not everyone will agree with our design solutions, we have enabled our customers as easy as possible to configure Kali Linux of your choice, up to the core.&lt;/p&gt;

&lt;p&gt;Support ARMEL and ARMHF: ARM-systems are becoming more and more common and affordable, resulting in a working installation for ARMEL and ARMHF systems. Kali Linux ARM repository is integrated with the main distribution as tools for ARM will be updated along with the other distributions. Cali is now available for the following ARM-devices: rk3306 mk/ss808, Raspberry Pi, ODROID U2/X2, MK802/MK802 II, Samsung Chromebook.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/webhostingskills/~4/pTlgi9Oh2Hw" height="1" width="1"/&gt;</description><feedburner:origLink>http://www.webhostingskills.com/articles/new_distribution_backtrack_meet_kali_linux</feedburner:origLink></item><item><title>Simple Ways to Execute PHP in WordPress Posts and Pages</title><link>http://feedproxy.google.com/~r/webhostingskills/~3/2YiY_NJ5sag/simple_ways_to_execute_php_in_wordpress_posts_and_pages</link><category>Tutorials, 
      Web Server,</category><pubDate>Thu, 01 Nov 2012 08:52:58 PDT</pubDate><guid isPermaLink="false">http://www.webhostingskills.com/articles/simple_ways_to_execute_php_in_wordpress_posts_and_pages</guid><description>&lt;img src="http://www.webhostingskills.com/images/uploads/tutorials_images/_medium/wordpress.jpg" height="200" width="250" alt="Simple Ways to Execute PHP in WordPress Posts and Pages" /&gt;&lt;p&gt;For those who need a custom solution&lt;br /&gt;
 &lt;br /&gt;
Since web design is comprised of several basic elements – HTML, CSS and PHP,&amp;nbsp; which are 3 different languages, some people reach a different level of knowledge in them. On the other hand, systems like &lt;a href="http://wpwidgets.net/"&gt;Wordpress&lt;/a&gt; are made to be used by people who don’t have knowledge for any of these languages. That’s the reason why directly inputting PHP code isn’t possible – because it wouldn’t be needed for the masses. Yet if you want to do it, there are ways, and that’s what we’re going to discuss that in this article.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Custom Template on Custom Page&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;First we’re going to discuss what Wordpress uses to display itself on the browser. Apparently, PHP does all the work in processing the content, and stores it so that it can be returned by certain functions in the theme template files.&amp;nbsp; Once there, they’re displayed , wrapped around the HTML of the template. But what does that mean to us ?&lt;br /&gt;
 &lt;br /&gt;
One of the reasons why this is so important to us, is because we can use that structure to execute our own code . We can make a custom template to be used only on a certain page, where we need the PHP code executed.&lt;br /&gt;
 &lt;br /&gt;
&lt;strong&gt;Make a function in the current template&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Another commonly used way to bring our own code into Wordpress is to build a function (or several functions) into our code. Using  “if … else” conditionals, or “case” structures, we  can execute the function with different parameters wherever we need it in the template.&amp;nbsp; Wherever we need the code to run, we just execute the function like this :&lt;/p&gt;

&lt;div class="codes"&gt;&lt;pre&gt;&amp;lt;?php functionname($parametername) ?&amp;gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Both of the above mentioned ways have a problem, however. They cannot run in a specific post, because they depend on the template. We can either use them on the whole template, or on a single page that uses a different template, but not separately, for a post. So what do we do then ?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use plugins that allow code execution&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There are several plugins who do the same trick we need, but we’re going to focus on two particular plugins: Exec-PHP and Shortcode Exec-PHP.&amp;nbsp; You’ve probably already figured out what the difference between them is.&lt;br /&gt;
 &lt;br /&gt;
Exec-PHP is a &lt;a href="http://wpwidgets.net/"&gt;wordpress&lt;/a&gt; plugin which makes execution  in posts as easy as 1-2-3. This can be handy for various reasons, especially if you have knowledge of how to use scripts or even write scripts professionally. You can use PHP libraries to generate graphics, calculate statistics and bring more unique content to your site.&lt;/p&gt;

&lt;p&gt;Still, Exec-PHP has one crucial drawback – if you are running a blog with several authors and several people with access to posting ,security is rather compromised since anyone can write code in the posts.&lt;br /&gt;
 &lt;br /&gt;
Here’s where we introduce Shortcode Exec-PHP. This plugin has rights management, which allows us to define the level of rights necessary to write PHP code, which will later be included with a shortcode in the post. The advantage here is that only certain people can write the PHP scripts and snippets, but many can execute the shortcodes associated with them.&lt;br /&gt;
 &lt;br /&gt;
With Shortcode Exec-PHP you can have one administrator that writes the scripts, and several moderators who use them if they find necessary. That’s not only good for security, but also prevents unskilled people from executing code on Wordpress, and prevents potential data loss and crashes which may occur if an incompetent person was to attempt executing their code.&lt;br /&gt;
 &lt;br /&gt;
It doesn’t need to be hard to include your own functionality via PHP. As with many other things in Wordpress, it’s wonderful that someone has already thought about it, and has already made it easy via plugins.&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/webhostingskills/~4/2YiY_NJ5sag" height="1" width="1"/&gt;</description><feedburner:origLink>http://www.webhostingskills.com/articles/simple_ways_to_execute_php_in_wordpress_posts_and_pages</feedburner:origLink></item><item><title>OpenVZ: Mounting Host Devices/Partitions/Directories In A Container With Bind Mounts (Debian/Ubuntu)</title><link>http://feedproxy.google.com/~r/webhostingskills/~3/G2Guj1LkPWk/openvz_mounting_host_devices_partitions_directories_in_a_container_with_bin</link><category>Tutorials, 
      Linux,</category><pubDate>Thu, 06 Sep 2012 15:47:56 PDT</pubDate><guid isPermaLink="false">http://www.webhostingskills.com/articles/openvz_mounting_host_devices_partitions_directories_in_a_container_with_bin</guid><description>&lt;img src="http://www.webhostingskills.com/images/uploads/tutorials_images/_medium/images_(15).jpg" height="200" width="250" alt="OpenVZ: Mounting Host Devices/Partitions/Directories In A Container With Bind Mounts (Debian/Ubuntu)" /&gt;&lt;p&gt;Sometimes you are in a situation where you need to mount a hard drive, partiiton or directory from the OpenVZ host inside an OpenVZ container - for example, you add a fast SSD to the host and want to put your container&amp;#8217;s MySQL databases on it to make MySQL faster. This tutorial explains how you can mount host devices/partitions/directories in an OpenVZ container with bind mounts.&lt;br /&gt;
&lt;strong&gt;1 Preliminary Note&lt;/strong&gt;&lt;br /&gt;
In this tutorial I have an OpenVZ container with the container ID 101 which is running MySQL. I add a second hard drive to the host and want to put the container&amp;#8217;s MySQL directory /var/lib/mysql on the second hard drive.&lt;br /&gt;
&lt;strong&gt;2 Preparing The Host&lt;/strong&gt;&lt;br /&gt;
Host:&lt;/p&gt;

&lt;p&gt;If you have added a new hard drive to the host, you should see it in the output of&amp;#8230;&lt;/p&gt;&lt;div class="codes"&gt;&lt;pre&gt;fdisk -l&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;... and you should see that it is unformatted (unless you have created partitions on it previously) - in this example the hard drive is /dev/sdb:&lt;/br&gt;&lt;br /&gt;
&lt;em&gt;root@server1:~# fdisk -l&lt;/p&gt;

&lt;p&gt;Disk /dev/sda: 32.2 GB, 32212254720 bytes&lt;br /&gt;
255 heads, 63 sectors/track, 3916 cylinders&lt;br /&gt;
Units = cylinders of 16065 * 512 = 8225280 bytes&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
Disk identifier: 0x00029d5c&lt;/p&gt;

&lt;p&gt;&amp;nbsp;  Device Boot &amp;nbsp;  &amp;nbsp; Start &amp;nbsp;  &amp;nbsp;  &amp;nbsp; End &amp;nbsp;  &amp;nbsp; Blocks &amp;nbsp; Id  System&lt;br /&gt;
/dev/sda1 &amp;nbsp; *&amp;nbsp;  &amp;nbsp;  &amp;nbsp;  &amp;nbsp; 1 &amp;nbsp;  &amp;nbsp;   3793 &amp;nbsp;  30461952 &amp;nbsp; 83  Linux&lt;br /&gt;
/dev/sda2 &amp;nbsp;  &amp;nbsp;  &amp;nbsp;  &amp;nbsp; 3793 &amp;nbsp;  &amp;nbsp;   3917 &amp;nbsp;  &amp;nbsp; 992257 &amp;nbsp;  5  Extended&lt;br /&gt;
/dev/sda5 &amp;nbsp;  &amp;nbsp;  &amp;nbsp;  &amp;nbsp; 3793 &amp;nbsp;  &amp;nbsp;   3917 &amp;nbsp;  &amp;nbsp; 992256 &amp;nbsp; 82  Linux swap / Solaris&lt;/p&gt;

&lt;p&gt;Disk /dev/sdb: 32.2 GB, 32212254720 bytes&lt;br /&gt;
255 heads, 63 sectors/track, 3916 cylinders&lt;br /&gt;
Units = cylinders of 16065 * 512 = 8225280 bytes&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
Disk identifier: 0x00000000&lt;/p&gt;

&lt;p&gt;Disk /dev/sdb doesn&amp;#8217;t contain a valid partition table&lt;br /&gt;
root@server1:~#&lt;/em&gt;&lt;/br&gt;&lt;/p&gt;

&lt;p&gt;Let&amp;#8217;s create one single partition on it:&lt;/br&gt;&lt;/p&gt;&lt;div class="codes"&gt;&lt;pre&gt;fdisk /dev/sdb&lt;/pre&gt;&lt;/div&gt;&lt;/br&gt;

&lt;em&gt;root@server1:
~# fdisk /dev/sdb&lt;/em&gt;&lt;/br&gt;
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x31e0dc4b.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won&amp;#8217;t be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

WARNING: DOS-compatible mode is deprecated. It&amp;#8217;s strongly recommended to
&amp;nbsp;  &amp;nbsp;  &amp;nbsp;  switch off the mode (command &amp;#8216;c&amp;#8217;) and change display units to
&amp;nbsp;  &amp;nbsp;  &amp;nbsp;  sectors (command &amp;#8216;u&amp;#8217;).

Command (m for help): &lt;-- n
Command action
   e   extended
   p   primary partition (1-4)
&lt;-- p
Partition number (1-4): &lt;-- 1
First cylinder (1-3916, default 1): &lt;-- ENTER
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-3916, default 3916): &lt;-- ENTER
Using default value 3916

Command (m for help): &lt;-- t
Selected partition 1
Hex code (type L to list codes): &lt;-- L

 0  Empty           24  NEC DOS         81  Minix / old Lin bf  Solaris
 1  FAT12           39  Plan 9          82  Linux swap / So c1  DRDOS/sec (FAT-
 2  XENIX root      3c  PartitionMagic  83  Linux           c4  DRDOS/sec (FAT-
 3  XENIX usr       40  Venix 80286     84  OS/2 hidden C:  c6  DRDOS/sec (FAT-
 4  FAT16 &lt;32M      41  PPC PReP Boot   85  Linux extended  c7  Syrinx
 5  Extended        42  SFS             86  NTFS volume set da  Non-FS data
 6  FAT16           4d  QNX4.x          87  NTFS volume set db  CP/M / CTOS / .
 7  HPFS/NTFS       4e  QNX4.x 2nd part 88  Linux plaintext de  Dell Utility
 8  AIX             4f  QNX4.x 3rd part 8e  Linux LVM       df  BootIt
 9  AIX bootable    50  OnTrack DM      93  Amoeba          e1  DOS access
 a  OS/2 Boot Manag 51  OnTrack DM6 Aux 94  Amoeba BBT      e3  DOS R/O
 b  W95 FAT32       52  CP/M            9f  BSD/OS          e4  SpeedStor
 c  W95 FAT32 (LBA) 53  OnTrack DM6 Aux a0  IBM Thinkpad hi eb  BeOS fs
 e  W95 FAT16 (LBA) 54  OnTrackDM6      a5  FreeBSD         ee  GPT
 f  W95 Ext'd (LBA) 55  EZ-Drive        a6  OpenBSD         ef  EFI (FAT-12/16/
10  OPUS            56  Golden Bow      a7  NeXTSTEP        f0  Linux/PA-RISC b
11  Hidden FAT12    5c  Priam Edisk     a8  Darwin UFS      f1  SpeedStor
12  Compaq diagnost 61  SpeedStor       a9  NetBSD          f4  SpeedStor
14  Hidden FAT16 &lt;3 63  GNU HURD or Sys ab  Darwin boot     f2  DOS secondary
16  Hidden FAT16    64  Novell Netware  af  HFS / HFS+      fb  VMware VMFS
17  Hidden HPFS/NTF 65  Novell Netware  b7  BSDI fs         fc  VMware VMKCORE
18  AST SmartSleep  70  DiskSecure Mult b8  BSDI swap       fd  Linux raid auto
1b  Hidden W95 FAT3 75  PC/IX           bb  Boot Wizard hid fe  LANstep
1c  Hidden W95 FAT3 80  Old Minix       be  Solaris boot    ff  BBT
1e  Hidden W95 FAT1
Hex code (type L to list codes): &lt;-- 83

Command (m for help): &lt;-- w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
root@server1:~#&lt;/em&gt;&lt;/br&gt;

Afterwards, there should be the partition&lt;em&gt; /dev/sdb1&lt;/em&gt;&lt;/br&gt;

&lt;div class="codes"&gt;&lt;pre&gt;fdisk -l&lt;/pre&gt;&lt;/div&gt;&lt;/br&gt;

&lt;em&gt;root@server1:~# fdisk -l

Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00029d5c

&amp;nbsp;  Device Boot &amp;nbsp;  &amp;nbsp; Start &amp;nbsp;  &amp;nbsp;  &amp;nbsp; End &amp;nbsp;  &amp;nbsp; Blocks &amp;nbsp; Id  System
/dev/sda1 &amp;nbsp; *&amp;nbsp;  &amp;nbsp;  &amp;nbsp;  &amp;nbsp; 1 &amp;nbsp;  &amp;nbsp;   3793 &amp;nbsp;  30461952 &amp;nbsp; 83  Linux
/dev/sda2 &amp;nbsp;  &amp;nbsp;  &amp;nbsp;  &amp;nbsp; 3793 &amp;nbsp;  &amp;nbsp;   3917 &amp;nbsp;  &amp;nbsp; 992257 &amp;nbsp;  5  Extended
/dev/sda5 &amp;nbsp;  &amp;nbsp;  &amp;nbsp;  &amp;nbsp; 3793 &amp;nbsp;  &amp;nbsp;   3917 &amp;nbsp;  &amp;nbsp; 992256 &amp;nbsp; 82  Linux swap / Solaris

Disk /dev/sdb: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x31e0dc4b

&amp;nbsp;  Device Boot &amp;nbsp;  &amp;nbsp; Start &amp;nbsp;  &amp;nbsp;  &amp;nbsp; End &amp;nbsp;  &amp;nbsp; Blocks &amp;nbsp; Id  System
/dev/sdb1 &amp;nbsp;  &amp;nbsp;  &amp;nbsp;  &amp;nbsp;  &amp;nbsp; 1 &amp;nbsp;  &amp;nbsp;   3916 &amp;nbsp;  31455238+&amp;nbsp; 83  Linux
root@server1:~#&lt;/em&gt;&lt;/br&gt;

Let&amp;#8217;s format it with ext4&amp;#8230;
&lt;div class="codes"&gt;&lt;pre&gt;mkfs.ext4 /dev/sdb1&lt;/pre&gt;&lt;/div&gt;
... and mount it to/mnt/sdb1&lt;/br&gt;

&lt;div class="codes"&gt;&lt;pre&gt;mkdir /mnt/sdb1
mount /dev/sdb1 /mnt/sdb1&lt;/pre&gt;&lt;/div&gt;
You should see /dev/sdb1 in the output of&amp;#8230;
&lt;div class="codes"&gt;&lt;pre&gt;mount&lt;/pre&gt;&lt;/div&gt;&lt;/br&gt;

... now:&lt;/br&gt;

&lt;em&gt;root@server1:~# mount
/dev/sda1 on / type ext3 (rw,errors=remount-ro)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
/dev/sdb1 on /mnt/sdb1 type ext4 (rw)
root@server1:~#&lt;/em&gt;&lt;/br&gt;

To have /dev/sdb1 mounted automatically at boot time, add it to /etc/fstab:&lt;/br&gt;

&lt;div class="codes"&gt;&lt;pre&gt;vi /etc/fstab&lt;/pre&gt;&lt;/div&gt;
&lt;div class="codes"&gt;&lt;pre&gt;[...]
/dev/sdb1 /mnt/sdb1               ext4    errors=remount-ro 0       1&lt;/pre&gt;&lt;/div&gt;
&lt;strong&gt;3 Preparing The Container&lt;/strong&gt;
Container:

As we want to move /var/lib/mysql to the new partition, we need to stop MySQL first, make sure it isn&amp;#8217;t started automatically when the container is started, create a backup of /var/lib/mysql and a new, empty /var/lib/mysql directory:
&lt;div class="codes"&gt;&lt;pre&gt;/etc/init.d/mysql stop
update-rc.d -f mysql remove&lt;/pre&gt;&lt;/div&gt;
&lt;div class="codes"&gt;&lt;pre&gt;mv /var/lib/mysql/ /var/lib/mysql_bak
mkdir /var/lib/mysql
chown mysql:mysql /var/lib/mysql
chmod 700 /var/lib/mysql&lt;/pre&gt;&lt;/div&gt;
&lt;strong&gt;4 Creating A Bind Mount Script For The Container On The Host&lt;/strong&gt;
Host:

On the host we now create the bind mount script /etc/vz/conf/101.mount (make sure you replace 101 with the correct container ID!) as follows:
&lt;div class="codes"&gt;&lt;pre&gt;vi /etc/vz/conf/101.mount&lt;/pre&gt;&lt;/div&gt;
&lt;div class="codes"&gt;&lt;pre&gt;#!/bin/bash
. /etc/vz/vz.conf
. ${VE_CONFFILE}
SRC=/mnt/sdb1
DST=/var/lib/mysql
if [ ! -e ${VE_ROOT}${DST} ]; then mkdir -p ${VE_ROOT}${DST}; fi
mount -n -t simfs ${SRC} ${VE_ROOT}${DST} -o ${SRC}&lt;/pre&gt;&lt;/div&gt;
You must adjust the SRC and DST variables to your needs. SRC is the directory which we want to mount in the container (/mnt/sdb1 in this example), and DST is the mount point in the container.

If you want to add mount options like noatime, you can add the -o switch to the mount line, e.g. as follows:
&lt;div class="codes"&gt;&lt;pre&gt;#!/bin/bash
. /etc/vz/vz.conf
. ${VE_CONFFILE}
SRC=/mnt/sdb1
DST=/var/lib/mysql
if [ ! -e ${VE_ROOT}${DST} ]; then mkdir -p ${VE_ROOT}${DST}; fi
mount -o noatime -n -t simfs ${SRC} ${VE_ROOT}${DST} -o ${SRC}&lt;/pre&gt;&lt;/div&gt;
Make the script executable&amp;#8230;
&lt;div class="codes"&gt;&lt;pre&gt;chmod +x /etc/vz/conf/101.mount&lt;/pre&gt;&lt;/div&gt;
... and restart the container (that&amp;#8217;s why we disabled MySQL&amp;#8217;s system startup links for the container in chapter three - /var/lib/mysql is empty right now which will result in MySQL errors):
&lt;div class="codes"&gt;&lt;pre&gt;vzctl restart 101&lt;/pre&gt;&lt;/div&gt;&lt;/br&gt;

&lt;strong&gt;5 Using The Bind Mount In The Container&lt;/strong&gt;
Container:

After the container restart is finished, you can log into the container and check if the new mount exists:
&lt;div class="codes"&gt;&lt;pre&gt;mount&lt;/pre&gt;&lt;/div&gt;&lt;/br&gt;

&lt;em&gt;root@test:~# mount
/dev/simfs on / type simfs (rw,relatime)
/dev/simfs on /var/lib/mysql type simfs (rw,relatime)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,relatime,mode=755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,relatime)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)
root@test:~#&lt;/em&gt;&lt;/br&gt;

&lt;div class="codes"&gt;&lt;pre&gt;df -h&lt;/pre&gt;&lt;/div&gt;&lt;/br&gt;

&lt;em&gt;root@test:~# df -h
Filesystem &amp;nbsp;  &amp;nbsp;  &amp;nbsp;  &amp;nbsp; Size  Used Avail Use% Mounted on
/dev/simfs &amp;nbsp;  &amp;nbsp;  &amp;nbsp;  &amp;nbsp; 1.0G  381M  644M  38% /
/dev/simfs &amp;nbsp;  &amp;nbsp;  &amp;nbsp;  &amp;nbsp;  30G  172M &amp;nbsp; 28G &amp;nbsp; 1% /var/lib/mysql
tmpfs &amp;nbsp;  &amp;nbsp;  &amp;nbsp;  &amp;nbsp;  &amp;nbsp;   128M &amp;nbsp;   0  128M &amp;nbsp; 0% /lib/init/rw
tmpfs &amp;nbsp;  &amp;nbsp;  &amp;nbsp;  &amp;nbsp;  &amp;nbsp;   128M &amp;nbsp;   0  128M &amp;nbsp; 0% /dev/shm
root@test:~#&lt;/em&gt;&lt;/br&gt;

Go to the /var/lib directory:
&lt;div class="codes"&gt;&lt;pre&gt;cd /var/lib
ls -la&lt;/pre&gt;&lt;/div&gt;&lt;/br&gt;

&lt;em&gt;root@test:/var/lib# ls -la
total 72
drwxr-xr-x 18 root &amp;nbsp;  root &amp;nbsp;  4096 Jul 17 10:25 .
drwxr-xr-x 13 root &amp;nbsp;  root &amp;nbsp;  4096 Feb 13  2011 ..
drwxr-xr-x  5 root &amp;nbsp;  root &amp;nbsp;  4096 Jul 17 10:16 apt
drwxr-xr-x  2 root &amp;nbsp;  root &amp;nbsp;  4096 Oct 16  2010 aptitude
drwxr-xr-x  2 root &amp;nbsp;  root &amp;nbsp;  4096 Feb 13  2011 dhcp
drwxr-xr-x  7 root &amp;nbsp;  root &amp;nbsp;  4096 Jul 17 10:16 dpkg
drwxr-xr-x  2 root &amp;nbsp;  root &amp;nbsp;  4096 Jan  1  2011 initscripts
drwxr-xr-x  2 root &amp;nbsp;  root &amp;nbsp;  4096 Jan  1  2011 insserv
drwxrwsr-x  2 libuuid libuuid 4096 Feb 13  2011 libuuid
drwxr-xr-x  2 root &amp;nbsp;  root &amp;nbsp;  4096 Apr 17  2010 logrotate
drwxr-xr-x  2 root &amp;nbsp;  root &amp;nbsp;  4096 Dec 14  2010 misc
drwxr-xr-x  4 root &amp;nbsp;  root &amp;nbsp;  4096 Jul 17 10:53 mysql
drwx&amp;#8212;&amp;#8212;&amp;#8212; 3 mysql &amp;nbsp; mysql &amp;nbsp; 4096 Jul 17 10:24 mysql_bak
drwxr-xr-x  2 root &amp;nbsp;  root &amp;nbsp;  4096 Feb 13  2011 pam
drwxr-xr-x  2 root &amp;nbsp;  root &amp;nbsp;  4096 Jul 17 10:23 quota
drwxr-xr-x  2 root &amp;nbsp;  root &amp;nbsp;  4096 Jul 17 10:52 update-rc.d
drwxr-xr-x  2 root &amp;nbsp;  root &amp;nbsp;  4096 Jul 17 10:53 urandom
drwxr-xr-x  3 root &amp;nbsp;  root &amp;nbsp;  4096 Feb 13  2011 vim
root@test:/var/lib#&lt;/em&gt;&lt;/br&gt;

As you see, the new /var/lib/mysql directory has wrong permissions/ownership - let&amp;#8217;s correct that (the new permissions/ownership should be kept even after a restart of the container):
&lt;div class="codes"&gt;&lt;pre&gt;chown mysql:mysql /var/lib/mysql
chmod 700 /var/lib/mysql&lt;/pre&gt;&lt;/div&gt;
Now let&amp;#8217;s move the databases from our backup back to&lt;em&gt; /var/lib/mysql&lt;/em&gt;:
&lt;div class="codes"&gt;&lt;pre&gt;cp -pfr /var/lib/mysql_bak/* /var/lib/mysql&lt;/pre&gt;&lt;/div&gt;
Then start MySQL:
&lt;div class="codes"&gt;&lt;pre&gt;/etc/init.d/mysql start&lt;/pre&gt;&lt;/div&gt;
That&amp;#8217;s it! One last thing you should do is recreate MySQL&amp;#8217;s system startup links so that it starts automatically when the container is started:
&lt;div class="codes"&gt;&lt;pre&gt;update-rc.d mysql defaults&lt;/pre&gt;&lt;/div&gt;
&lt;strong&gt;6 Links&lt;/strong&gt;
OpenVZ:&lt;a mce_real_href="http://openvz.org/" href="http://openvz.org/" target="_blank"&gt;http://openvz.org/&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/webhostingskills/~4/G2Guj1LkPWk" height="1" width="1"/&gt;</description><feedburner:origLink>http://www.webhostingskills.com/articles/openvz_mounting_host_devices_partitions_directories_in_a_container_with_bin</feedburner:origLink></item></channel></rss>
