Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export script should check size of exported disks against the actual size #1

Open
evancacka opened this issue Mar 8, 2018 · 0 comments

Comments

@evancacka
Copy link

evancacka commented Mar 8, 2018

Attempting to export my LPAR reports everything is fine:

autoadmin@my-aix-host:/dest/exportaix$ sudo ./export_lpar.ksh hdisk0 hdisk1 hdisk2 hdisk3

Disks:
Found device hdisk0, 17408 MB
Found device hdisk1, 2048 MB
Found device hdisk2, 3072 MB
Found device hdisk3, 4096 MB

Disk images will be created uncompressed in local directory.
Create these image(s)? (Yes/No)
Yes

Creating disk hdisk0.img
Creating disk hdisk1.img
Creating disk hdisk2.img
Creating disk hdisk3.img
Disks images created

Creating OVF file: my-aix-host.ovf
OVF Completed Successfully

However, from the disk files it is clear that the export failed:

autoadmin@my-aix-host:/dest/exportaix$ ll

total 8388656
drwxr-xr-x 2 autoadmi staff 256 Mar 08 11:40 ./
drwxr-xr-x 4 autoadmi staff 256 Mar 07 17:53 ../
-rwxr-xr-x 1 autoadmi staff 2226 Mar 07 17:49 export_lpar.ksh*
-rw-r--r-- 1 root system 1073741312 Mar 08 11:36 hdisk0.img
-rw-r--r-- 1 root system 1073741312 Mar 08 11:37 hdisk1.img
-rw-r--r-- 1 root system 1073741312 Mar 08 11:38 hdisk2.img
-rw-r--r-- 1 root system 1073741312 Mar 08 11:40 hdisk3.img
-rwxr-xr-x 1 autoadmi staff 7624 Mar 07 17:50 make_ovf.ksh*
-rw-r--r-- 1 root system 5206 Mar 08 11:40 my-aix-host.ovf

Expect:
The script should not blindly eat any errors while reporting everything was successful. A rough comparison of the physical disk size compared to the created file would have quickly indicated a failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant