The image server size is determined during installation by querying the file system. The size is maintained in the database as an attribute of the image server device. This value is static and does not reflect changes that are made to the file system outside of the scope of N1 Provisioning Server. The following changes are outside of the scope:
If the images file system is being used for some other purpose and files other than those created by the N1 Provisioning Server software are copied onto it, the actual size of the image repository decreases. However, the size value in the database does not reflect the decrease in size for the image repository.
In this case, the software might allow a snapshot operation to proceed because the software assumes that enough space exists. However, the snapshot operation might fail due to lack of actual space on the filesystem.
If the partition is extended, the original partition is replaced by a new partition on a secondary disk, or files that are unknown to the N1 Provisioning Server software are removed from the images file system, the actual size of the images file system might increase. However, the size value in the database does not reflect the increase in size for the image repository.
In this case, the software might not allow a snapshot to proceed because the software assumes that enough space does not exist on the file system, even though sufficient space exists. The failure in this case could occur before the snapshot data is copied or after the snapshot data is copied.
In both cases, the symptom might not reflect the cause. The error that you see might not be clear enough to determine that the problem is due to incorrect image server size in the database. The error might be buried in the /var/adm/tspr.debug log file.
Workaround: If you see an unexplained snapshot error, follow these steps to determine whether the cause of the problem is a size inconsistency between the database and the actual file system:
Determine the device ID of the image server using the following command:
# /opt/terraspring/sbin/device -Lr |
Determine the image repository size in the N1 Provisioning Server database using the following command:
# /opt/terraspring/sbin/device lv device-id | grep imsvsize |
where device-id is the ID that you determined in the previous step.
Determine the total size of all the images that are known to the N1 Provisioning Server repository.
To get a verbose listing of all the images, type the following command:
# image -lv > tmpfile |
Look through the tmpfile and note all the size values in the “Image Locations” section for each image.
Add all the values in the previous step to arrive at the total size of all the images that are known to the repository.
Subtract the values from the two previous steps to determine the total available space in the image server as perceived by the N1 Provisioning Server software.
Determine the size of the actual filesystem using the following command:
# df -k path-to-images-filesystem |
Determine the available space in bytes for the actual filesystem by multiplying the value under “avail” in the df output by 1024.
If the value from step 4 (the perceived space) differs from the value in step 6 (the actual space), a size inconsistency exists. To resolve this inconsistency, follow these steps:
Add the actual available size (from step 6) and the total size of images (from step 3c). This total provides the new value for the imsvsize attribute in the N1 Provisioning Server repository.
Update the lmsvsize attribute in the N1 Provisioning Server database with the new value from the previous step using the following command:
# device -sA imsvsize new-imsvsize-value device-id |