objbaker is the program that provides access to object storage for the cloud gateway software. To start with the configuration you would need access key and secret generated by your provider, if you are using object storage in multi-cloud environment or if the compute engine was not authorized to perform any S3 object access operations.
For AWS EC2 instance created with IAM role that authorizes S3 operations it may not be required to configure the accessId and accessKey within the software. Instead use the option --accessEC2IAM=ROLE option with objbaker. This will acquire S3 credentials from EC2 machine via IAM role. |
Create file v:\etc\.s3wasabi_passwd using notepad and add the access information in this format accessId:accessKey. The accessId could be account ID, and the accessKey is base64 encoded secret.
By starting filename with dot you would avoid Windows adding any .txt extension to the above file. Also make sure there are no extraneous characters or newlines in this file. This file is accessed by Crossmeta programs as /etc/.s3wasabi_passwd, while WIN32 programs access as v:\etc\.s3wasabi_passwd |
Before configuring object disk with Windows, make sure objbaker can list the buckets from your storage account. The baseURL is the most important parameter and should match with access URL of the cloud provider. You should use HTTPS for secure SSL access.
C:\Program Files\crossmeta>objbacker.exe --cacert=ca-bundle.crt --ssl --accessFile=/etc/.s3azure_passwd --s3Type=azure --baseURL=https://zfstest.blob.core.windows.net/ --bucketCommand=list |
C:\Program Files\crossmeta>objbacker.exe --cacert=ca-bundle.crt --ssl --accessFile=/etc/.s3amazon_passwd --authVersion=aws2 --baseURL=https://s3.us-west-1.wasabisys.com/ --bucketCommand=list |
C:\Program Files\crossmeta>objbacker.exe --cacert=ca-bundle.crt --ssl --accessFile=/etc/.s3google_passwd --s3Type=google_s3 --baseURL=https://storage.googleapis.com/ --bucketCommand=list |
C:\Program Files\crossmeta>objbacker.exe --cacert=ca-bundle.crt --ssl --accessFile=/etc/.s3wasabi_passwd --baseURL=https://s3.us-west-1.wasabisys.com/ --bucketCommand=list |
For troubleshooting add --debug-http to the above command to get detailed REST API output.
Configure object storage as VHD
Before configuring object disk with Windows make sure the Crossmeta Fuse driver has started. If required start the driver as follows
C:\Program Files\crossmeta>net start cxfuse The CROSSMETA FUSE kernel mode driver service was started successfully. |
| Option | ||
|---|---|---|
| Logical size of VHDX up to 64TB allowed by Windows | 10T | --size=10T |
| Block size of object files. Large block size reduces object access costs. This should match file system allocation size for optimal performance | 1MB | --blockSize=1024K |
| Directory to use as mount point in Crossmeta drive | mnt | /mnt |
| No caching to prevent stale data | --directIo--blockCacheSize=100 | |
| Specify desired filename for object disk. This should have extension vhdx for Windows to use it | --filename=file.vhdx | |
| S3 access credential file name. Some file in Crossmeta drive. | accessId:accessKey | --accessFile=/etc/.s3wasabi_passwd |
| S3 Type option to identify cloud object storage api. The default is amazon_s3. Mandatory option for Azure Blobs | azure google_s3 amazon_s3 | --s3Type=azure |
| Region option. This option is mandatory for Amazon S3 | us-west-1 | --region=us-west-1 |
Access URL for the object storage. Must be specified for all S3 object provider other than Amazon Azure blobs contain the storage account name in the URL. | zfstest is the storage account name for Azure | --baseURL=https://zfstest.blob.core.windows.net/ |
Mount object storage bucket
Before configuring the object storage disk as service so that ii is automatically started with the system we have to intialize the object storage as VHD image. This step is performed in foreground interactively to make sure it is working before configuring it as service. In the following example object storage bucket smbtest1 is being mounted. Please make note of the -f option for foreground. Also filename we chose as extension .vhdx
C:\Program Files\crossmeta>objbacker.exe --cacert=ca-bundle.crt --accessFile=/etc/.s3wasabi_passwd --authVersion=aws2 --baseURL=https://s3.us-west-1.wasabisys.com/ --directIO --noAutoDetect --size=10T --timeout=30 --blockCacheSize=100 --blockCacheThreads=8 --minWriteDelay=5000 --md5CacheSize=1000000 --ssl --blockSize=1024K -o no_pagecache --filename=file.vhdx smbtest1 /mnt -f objbacker.exe: auto-detection disabled; using configured block size 1m and file size 10t INFO: s3backer process 5312 for /mnt started INFO: mounting /mnt |
After the above command the object storage is accessible as V:\mnt\file.vhdx as one giant logically sized 10T file
Initialize VHDX on the object storage bucket using qemu-img program available in c:\program files\qemu
cd c:\program files\qemu C:\Program Files\qemu> qemu-img create -f vhdx v:\mnt\file.vhdx 10T |
Verify VHDX information
cd c:\program files\qemu C:\Program Files\qemu> qemu-img create -f vhdx v:\mnt\file.vhdx 10T |
Activate VHDX file as virtual disk in Windows
c:\users\Administrator> mount-diskimage -imagepath v:\mnt\file.vhdx |
Create a file system NTFS or ReFS. Use the actual drive letter that was assigned from the above command and allocation size of 1MB is chosen.
c:\users\Administrator> format /fs:ntfs /A:1M /q F: |
Windows 2019 supports allocation size of 1MB for NTFS file systems while earlier version limited to 64KB only. This means NTFS created with 1MB allocation size may not be recognized by older Windows. |
Detach the virtual disk
c:\users\Administrator> dismount-diskimage -imagepath v:\mnt\file.vhdx |
Stop the objbaker program to proceed configuration as service
From Desktop → Crossmeta command shell running as administrator
v:\> mount v:\> umount /mnt |
The above command would stop the objbacker program that is running inside another Command Prompt Window.
Register objdisk1 as NT service program
If everything worked out fine so far we are ready to make this object disk as service now.
c:\users\Administrator> sc create objdisk1 -binpath= "\"c:\program files\crossmeta\objbacker.exe" -cacert=ca-bundle.crt --accessFile=/etc/.s3wasabi_passwd --baseURL=https://s3.us-west-1.wasabisys.com/ --directIO --noAutoDetect --size=10T --timeout=30 --blockCacheSize=100 --blockCacheThreads=8 --minWriteDelay=5000 --md5CacheSize=1000000 --ssl --blockSize=1024K -o no_pagecache --filename=file.vhdx smbtest1 /mnt" -description= "My first object disk smbtest1 from Wasabi" sc query objdisk1 |
Starting the objdisk1 service
c:\users\Administrator> sc create objdisk1 -binpath= "\"c:\program files\crossmeta\objbacker.exe" -cacert=ca-bundle.crt --accessFile=/etc/.s3wasabi_passwd --baseURL=https://s3.us-west-1.wasabisys.com/ --directIO --noAutoDetect --size=10T --timeout=30 --blockCacheSize=100 --blockCacheThreads=8 --minWriteDelay=5000 --md5CacheSize=1000000 --ssl --blockSize=1024K -o no_pagecache --filename=file.vhdx smbtest1 /mnt" -description= "My first object disk smbtest1 from Wasabi" sc query objdisk1 |
Stopping the objdisk service
c:\users\Administrator> sc create objdisk1 -binpath= "\"c:\program files\crossmeta\objbacker.exe" -cacert=ca-bundle.crt --accessFile=/etc/.s3wasabi_passwd --baseURL=https://s3.us-west-1.wasabisys.com/ --directIO --noAutoDetect --size=10T --timeout=30 --blockCacheSize=100 --blockCacheThreads=8 --minWriteDelay=5000 --md5CacheSize=1000000 --ssl --blockSize=1024K -o no_pagecache --filename=file.vhdx smbtest1 /mnt" -description= "My first object disk smbtest1 from Wasabi" sc query objdisk1 |
Related pages