Xen cloud platform series: NFS repository (4)

Source: Internet
Author: User

You still need to modify it !!!!!

 

Some people say that the true implication of the golden age is that two people have finally found and established a lifelong great friendship, and no matter how the world is destroyed, it cannot be changed, countless people in the world live in loneliness or hypocrisy all their lives.

As mentioned in Article 2, when creating a VM, you must create an ISO repository to store ISO image files, by default, only 5 GB of storage space is allocated to the '/' directory, and the specified directory will soon be full. To solve this problem, you can mount New partitions, expand the space, and set up an nfs iso repository.

The following describes how to build an NFS repository.

Xenserver defines a container called the SR repository to describe specific storage targets for storing Virtual Disk Images (VDI. VDI is the disk abstraction that contains the Virtual Disk content. Xenserver SR provides built-in support for locally connected IDE, SATA, SCSI, and SAS drives, and iSCSI, NFS, and SAS remotely connected through fiber channel, making it extremely flexible. Each xenserver host can support multiple SRS and different types of SRS at the same time.

You can use the Xe Sr-LIST command to view the SR library in the system.

For example, there are three different repositories: ISO, udev, ext.

The ISO repository processes CD images stored in ISO format. This Sr type is useful when creating a shared ISO library. For a repository used to store the ISO library, you must

Set the Content-Type parameter to ISO.

The second article has mentioned how to create a local ISO repository. The following describes how to build an nfs iso repository.

First, install the NFS service on another server. its IP address is 10.10.93.138.

1 yum install -y nfs-utils

Edit the configuration file:/etc/exports. For example, share the/home/choudan directory. It can be written as follows:

1 /home/choudan 10.10.93.138/255.255.0.0(rw,sync)

The first is the shared directory, the second is the shared IP address, followed by the default mask, the read and write permissions in the brackets, synchronously updated.

The last step is to enable the NFS service:

1 service nfs restart

Now you can create an ISO repository on the XCP host.

First, enable the Service Portmap on the xcp host.

In CLI mode, enter the following command:

1 xe sr-create host-uuid=d4fb7cd4-14d9-4f3a-8527-c9cf2821d384 content-type=iso name-label=NFS SR shared=true device-config:server=10.10.93.138 device-config:serverpath=/home/choudan type=iso

If yes, the uuid of the created ISO repository is returned.

If you encounter the following problems:

Error code: sr_backend_failure_88
Error Parameters:, NFS Sr creation error, opterr = remote Directory creation error is 13,

This problem is caused by insufficient write permissions. You need to modify the attributes of the shared directory on the NFS server and add write permissions to the user.

The preceding steps only install an iso-type repository on NFS. To use NFS as a storage space available for virtual machines, you must create an NFS repository, the creation method is also very simple. The command is as follows:

1 xe sr-create host-uuid=d4fb7cd4-14d9-4f3a-8527-c9cf2821d384 content-type=user name-label=NFS SR shared=true device-config:location=10.10.93.138:/home/choudan device-config:type=nfs type=nfs

You can create an NFS repository.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.