The N1 Provisioning Server 3.1, Blades Edition product has disabled support for FTP images and FTP image servers due to the need to support flash and JumpStart images.
Workaround: You can enable FTP support. However, be aware of the following caveats:
Only one protocol (FTP or NFS) can be supported at a time. Therefore, the N1 datacenter where FTP support is enabled will now be able to provision and snapshot only via FTP.
Flash and JumpStart images cannot be supported in the FTP-enabled N1 datacenter. As a result, all flash and JumpStart images must be deleted.
Any attempts to perform a flash or JumpStart snapshot in the FTP-enabled N1 datacenter will result in an error and fail in an unknown way. Such an operation will not be supported.
Attempts to perform flash or JumpStart provisioning might work but will not be supported.
Make sure that you accept the caveats listed above.
To determine the device ID of the image server, type the following command:
# /opt/terraspring/sbin/device -Lr is |
In the example shown below, the device id is 3001:
# /opt/terraspring/sbin/device -Lr is
DEVICE_ID PARENT_ID STATUS FARM_ID TYPE
3001 - USED - cpu:sun-svr-420R-idb (Sun 420R)
1 devices found.
|
To verify the current protocol being used by the image server, type the following command:
# /opt/terraspring/sbin/device -lv image-server-device-id |
In the example shown below, the protocol is nfs:
# /opt/terraspring/sbin/device -lv 3001
Device ID: 3001, state: USED, owner: -, type: cpu:sun-svr-420R-idb (Sun 420R)
Device Attributes:
make: Sun
name: ps1
imsvsize: 67372343296
halclass: com.terraspring.drivers.sun.SunSysKonnect
nicvips: 1000
role: ispdb
model: 420R
basepath: /images
compressionratio:8
protocol: nfs
...
|
To change the protocol attribute to FTP, type the following command:
# /opt/terraspring/sbin/device -sA protocol ftp image-server-device-id |
Determine the username and password that will be used to connect to the image server via FTP.
You may create a new username and password for this purpose.
In the following example, the username is set to n1psftpu and the password is set to n1psftpp.
# useradd n1psftpu # passwd n1psftpu New Password: Re-enter new Password: passwd: password successfully changed for n1psftpu |
To encrypt the password, type the following command:
# /opt/terraspring/sbin/encrypter password |
Note the output in the following example.
# encrypter n1psftpp ptMSB/T9fNm8Borrjxl/gw== |
To add the ftp_user and ftp_password attributes to the image server device in the database, type the following command once for each attribute:
# /opt/terraspring/sbin/device -sA attribute-name attribute-value image-server-device-id |
Note that the encrypted password must be used as the value for the ftp_password attribute, as shown in the following example.
# /opt/terraspring/sbin/device -sA ftp_user n1psftpu 3001 # /opt/terraspring/sbin/device -sA ftp_password 'ptMSB/T9fNm8Borrjxl/gw==' 3001 |
To verify your changes, type the following command:
# /opt/terraspring/sbin/device -lv image-server-device-id |
To determine the list of disk images and other images, type the following command:
# /opt/terraspring/sbin/image -l |
The following example shows two images.
# /opt/terraspring/sbin/image -l IMAGE_ID IMAGE_NAME CUSTOMER SIZE OS TYPE \ STATE LOCATION 1 rh-linux-i86pc-disk-img __grid__ 30000000000 linux disk_image \ READY nfs://3001//images/master-images/rh-linux-i86pc-disk-img 6 solaris9u5-i86pc-flash __grid__ 1500000000 solaris flash \ READY nfs://3001//images/master-images/solaris9u5-i86pc-flash |
For each disk image, convert the protocol in the URLs to FTP.
Follow these steps:
To ensure that the image file is not deleted, rename the image file on the image server to a temporary name on the image server.
# mv /images/master-images/rh-linux-i86pc-disk-img \ /images/master-images/rh-linux-i86pc-disk-img.bak |
To delete the NFS URL from the image information in the database, type the command /opt/terraspring/sbin/image -dL nfs-url image-id.
# /opt/terraspring/sbin/image -dL \
nfs://3001//images/master-images/rh-linux-i86pc-disk-img 1
Image id is: 1
Delete URL nfs://3001//images/master-images/rh-linux-i86pc-disk-img for this image (y/n)? y
Deleting image content at: nfs://3001//images/master-images/rh-linux-i86pc-disk-img \
size: 1532913330 ip: 10.52.53.1 State: done
Deleted locator URL: nfs://3001//images/master-images/rh-linux-i86pc-disk-img
|
Rename the image back to the original name on the image server.
# mv /images/master-images/rh-linux-i86pc-disk-img.bak \ /images/master-images/rh-linux-i86pc-disk-img |
To add the FTP URL to the image database, type the command /opt/terraspring/sbin/image -uL ftp-url image-id.
The FTP URL is the same URL as the NFS URL, except for the protocol part, which is modified to ftp.
# /opt/terraspring/sbin/image -uL \
ftp://3001//images/master-images/rh-linux-i86pc-disk-img 1
Updated image: 1
|
To update the state of the FTP URL, type the command /opt/terraspring/sbin/imagesync --nosync image-id.
# /opt/terraspring/sbin/imagesync --nosync 1
Image 1 forcibly marked as synchronized
|
Type the following command to verify that the protocol in the URL has indeed been changed to ftp:
# /opt/terraspring/sbin/image -lv image-id |
For example:
# /opt/terraspring/sbin/image -lv 1
IMAGE_ID IMAGE_NAME CUSTOMER SIZE OS TYPE \
STATE LOCATION
1 rh-linux-i86pc-disk-img __grid__ 30000000000 linux disk_image \
READY ftp://3001//images/master-images/rh-linux-i86pc-disk-img
Description: RedHat Linux 2.1 AS, disk image, with snet NIC
Architecture: i86pc
Last Updated: 2004-02-12 23:19:01.0
Image Locations:
ID STATE SIZE LOCATION
26 done 1532913330 ftp://3001//images/master-images/rh-linux-i86pc-disk-img
|
For each flash or JumpStart image, type the following command to delete the image:
# /opt/terraspring/sbin/image -d image-id |
Before you delete the flash or JumpStart images, ensure that none of the images are in use as explained in image Command Does not Check Whether an Image is In Use (4892852 and 5002045). If an image is in use, deactivate and delete any farms that are using the image before you delete the image. If you decide not to do so, please note that future snapshots of the server disks on which these images have been deployed must be taken as disk_image even if the Control Center seems to allow a flash snapshot. See the caveats that precede this task.
# /opt/terraspring/sbin/image -d 6 Delete Image 6 (y/n)? y Queueing request to delete image ... Request (id: 74) submitted. Waiting for request 74 to complete... . Deleting image content at: nfs://3001//images/master-images/solaris9u5-i86pc-flash size: 647191212 ip: 10.52.53.1 State: done |
The FTP protocol now is enabled for both provisioning and taking snapshots of images in the datacenter.