[Users] exception occured when adding NFS storage
Sandro Bonazzola
sbonazzo at redhat.com
Thu Jul 11 14:49:31 UTC 2013
Il 11/07/2013 16:37, Zhang, Hongyi ha scritto:
> Hi Sandro,
>
> I do see:
> # cat /etc/selinux/targeted/modules/active/file_contexts.local
> # This file is auto-generated by libsemanage
> # Do not edit directly.
> /mnt/iso(/.*)? system_u:object_r:public_content_rw_t:s0
> /mnt/data(/.*)? system_u:object_r:public_content_rw_t:s0
On wich host?
It's failing creating domain on 128.224.147.229:/mnt/data.
You must be sure that the IP address is correct.
You need to be sure that on 128.224.147.229 /mnt/data is 775, owned by
36:36, and selinux allow public content.
Then you need to be sure that you can mount 128.224.147.229:/mnt/data
locally.
On the host running engine try:
mkdir /tmp/test
mount -t nfs 128.224.147.229:/mnt/data /tmp/test
Then if it works you must ensure it's writable by vdsm:kvm user:
sudo -u vdsm -g kvm mkdir /tmp/test/writable
sudo -u vdsm -g kvm touch /tmp/test/writable/file
If those commands are working, you should be able to create the domain.
Remember to cleanup after the test.
> # getenforce
> Permissive
>
> But I still failed to create a storage domain on the ovirt.engine side and got the same exception errors, and also vdsm is idle during the creation of storage domain.
>
> Here is the setup for ovirt.engine:
> oVirt Engine will be installed using the following configuration:
> =================================================================
> override-httpd-config: yes
> http-port: 80
> https-port: 443
> host-fqdn: ovirt.engine
> auth-pass: ********
> org-name: ovirt
> application-mode: both
> default-dc-type: NFS
> db-remote-install: local
> db-local-pass: ********
> nfs-mp: /mnt/iso
> config-nfs: yes
> override-firewall: IPTables
> Proceed with the configuration listed above? (yes|no): yes
>
> Thanks,
> Hongyi
>
> From: Sandro Bonazzola [mailto:sbonazzo at redhat.com]
> Sent: Thursday, July 11, 2013 2:17 AM
> To: Zhang, Hongyi
> Cc: users at ovirt.org
> Subject: Re: [Users] exception occured when adding NFS storage
>
> Il 10/07/2013 18:19, Zhang, Hongyi ha scritto:
>
> Hi,
>
>
>
> I started to learn the oVirt by following the oVirt Quick Start Guide.
>
>
>
> I used one server as the ovirt.engine, and another server as the ovirt.host. Both servers run Fedora 18.
>
>
>
> After executing the command "engine-setup" in the ovirt.engine, I can get into the admin portal to start the configuration of host, storage, etc. Here was what I am doing:
>
>
>
>
>
> 1. In the Default data center, I clicked the Guide Me icon. The first thing is to configure the host. After waiting for 4-5 minutes, I saw the host ovirt.host is displayed under the Host tab with the Up status.
>
>
>
> 2. On the ovirt.engine server, I did the following before creating the storage:
>
>
>
> mkdir -p /mnt/data
>
>
>
> chown -R 36:36 /mnt/data
>
>
>
> Add the following line to /etc/sysconfig/nfs:
>
>
>
> NFS4_SUPPORT="no"
>
>
>
> Add the following line to /etc/exports:
>
>
>
> /nmt/data *(rw,sync,no_subtree_check,all_squash,anonuid=36,anongid=36)
>
>
>
> systemctl restart nfs-server.service
>
>
> Well, exports has a typo error: /nmt/data instead of /mnt/data
> If that it's not enough, If you're using selinux ensure that /mnt/data has the correct context:
>
> /etc/selinux/targeted/modules/active/file_contexts.local:
> /mnt/data(/.*)? system_u:object_r:public_content_rw_t:s0
>
>
>
>
>
>
>
>
>
>
>
> 3. Back to the Default data center, clicked the Guide Me icon to start the configuration of new storage.
>
>
>
> 4. On the New Storage dialog, set Name field to be NFS-Share, and set the Export Path field to be ovirt.engine:/mnt/data. Then click OK
>
>
>
> After couple of minutes, I saw the error window popped up: Error: Cannot add Storage. Internal error, Storage Connection doesn't exist.
>
>
>
>
>
>
>
> From the /var/log/ ovirt-engine/engine.log, I can see:
>
>
>
> 2013-07-10 11:37:51,300 INFO [org.ovirt.engine.core.vdsbroker.vdsbroker.ConnectStorageServerVDSCommand] (ajp--127.0.0.1-8702-1) [41c282da] FINISH, ConnectStorageServerVDSCommand, return: {00000000-0000-0000-0000-000000000000=100}, log id: 1bca7819
>
>
>
> 2013-07-10 11:37:51,303 ERROR [org.ovirt.engine.core.bll.storage.NFSStorageHelper] (ajp--127.0.0.1-8702-1) [41c282da] The connection with details 128.224.147.229:/mnt/data failed because of error code 100 and error message is: generalexception
>
>
>
> 2013-07-10 11:37:51,382 WARN [org.ovirt.engine.core.bll.storage.AddNFSStorageDomainCommand] (ajp--127.0.0.1-8702-6) [2612bf14] CanDoAction of action AddNFSStorageDomain failed. Reasons:VAR__TYPE__STORAGE__DOMAIN,VAR__ACTION__ADD,ACTION_TYPE_FAILED_STORAGE_CONNECTION_NOT_EXIST
>
>
>
> 2013-07-10 11:37:51,483 INFO [org.ovirt.engine.core.bll.storage.RemoveStorageServerConnectionCommand] (ajp--127.0.0.1-8702-1) [2bd59836] Running command: RemoveStorageServerConnectionCommand internal: false. Entities affected : ID: aaa00000-0000-0000-0000-123456789aaa Type: System
>
>
>
> 2013-07-10 11:37:51,489 INFO [org.ovirt.engine.core.vdsbroker.vdsbroker.DisconnectStorageServerVDSCommand] (ajp--127.0.0.1-8702-1) [2bd59836] START, DisconnectStorageServerVDSCommand(HostName = ovirt.node, HostId = 8e47a267-98a9-4184-a92e-26587adae6c4, storagePoolId = 00000000-0000-0000-0000-000000000000, storageType = NFS, connectionList = [{ id: null, connection: 128.224.147.229:/mnt/data, iqn: null, vfsType: null, mountOptions: null, nfsVersion: null, nfsRetrans: null, nfsTimeo: null };]), log id: 2f9800d
>
>
>
> Please let me know what I was doing wrong.
>
>
>
> Thanks,
>
> Hongyi
>
>
>
> P.S. If I create the NFS domain in the ovirt.host side (i.e., Export Path is ovirt.host:/mnt/data), then everything is okay. Not sure why failed on the ovirt.engine side.
>
>
>
>
>
>
> _______________________________________________
>
> Users mailing list
>
> Users at ovirt.org<mailto:Users at ovirt.org>
>
> http://lists.ovirt.org/mailman/listinfo/users
>
>
>
>
> --
>
> Sandro Bonazzola
>
> Better technology. Faster innovation. Powered by community collaboration.
>
> See how it works at redhat.com
>
--
Sandro Bonazzola
Better technology. Faster innovation. Powered by community collaboration.
See how it works at redhat.com
More information about the Users
mailing list