Azure / Azure/azure-quickstart-templates

Does not work on certain versions - vm-disk-utils-0.1.sh

Open
#808 3 comments 0 reactions 0 assignees View on GitHub
enhancement/feature
Dominant language
Bicep
Stars
14.9k
Forks
16.2k
Avg merge
6d 21h
Merged PRs (30d)
6

Description

Great Script!!!! I have used the script against different Linux distributions available in Azure gallery and it works as with most of them. However, it does not work for CentOS 6.5, CentOS 6.6 and CentOS 6.7, openSUSE 13.1, Oracle Linux 6.4. The error is same on all the versions this does not work. Are you able to help based on the error below from extension.log

2015/11/05 05:06:28 [Microsoft.OSTCExtensions.CustomScriptForLinux-1.0]Script is running...
2015/11/05 05:06:28 ---stdout---
2015/11/05 05:06:28 Begin scanning and formatting data disks
2015/11/05 05:06:28 Disks are /dev/sdc
2015/11/05 05:06:28 Working on /dev/sdc
2015/11/05 05:06:28 Creating filesystem on .
2015/11/05 05:06:28 Next mount point appears to be /datadisks/disk1
2015/11/05 05:06:28
2015/11/05 05:06:28 ---errout---
2015/11/05 05:06:28 vm-disk-utils-0.1.sh: line 311: [: : integer expression expected
2015/11/05 05:06:28 Usage: file [-bchikLNnprsvz0] [--apple] [--mime-encoding] [--mime-type]
2015/11/05 05:06:28 [-e testname] [-F separator] [-f namefile] [-m magicfiles] file ...
2015/11/05 05:06:28 file -C [-m magicfiles]
2015/11/05 05:06:28 file [--help]
2015/11/05 05:06:28 Usage: mkfs.ext2 [-c|-l filename] [-b block-size] [-f fragment-size]
2015/11/05 05:06:28 [-i bytes-per-inode] [-I inode-size] [-J journal-options]
2015/11/05 05:06:28 [-G meta group size] [-N number-of-inodes]
2015/11/05 05:06:28 [-m reserved-blocks-percentage] [-o creator-os]
2015/11/05 05:06:28 [-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]
2015/11/05 05:06:28 [-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]
2015/11/05 05:06:28 [-T fs-type] [-U UUID] [-jnqvFKSV] device [blocks-count]
2015/11/05 05:06:28
2015/11/05 05:06:28
2015/11/05 05:06:28 [Microsoft.OSTCExtensions.CustomScriptForLinux-1.0]Enable,transitioning,0,Script is running...
2015/11/05 05:06:28 ---stdout---
2015/11/05 05:06:28 Begin scanning and formatting data disks
2015/11/05 05:06:28 Disks are /dev/sdc
2015/11/05 05:06:28 Working on /dev/sdc
2015/11/05 05:06:28 Creating filesystem on .
2015/11/05 05:06:28 Next mount point appears to be /datadisks/disk1
2015/11/05 05:06:28
2015/11/05 05:06:28 ---errout---
2015/11/05 05:06:28 vm-disk-utils-0.1.sh: line 311: [: : integer expression expected
2015/11/05 05:06:28 Usage: file [-bchikLNnprsvz0] [--apple] [--mime-encoding] [--mime-type]
2015/11/05 05:06:28 [-e testname] [-F separator] [-f namefile] [-m magicfiles] file ...
2015/11/05 05:06:28 file -C [-m magicfiles]
2015/11/05 05:06:28 file [--help]
2015/11/05 05:06:28 Usage: mkfs.ext2 [-c|-l filename] [-b block-size] [-f fragment-size]
2015/11/05 05:06:28 [-i bytes-per-inode] [-I inode-size] [-J journal-options]
2015/11/05 05:06:28 [-G meta group size] [-N number-of-inodes]
2015/11/05 05:06:28 [-m reserved-blocks-percentage] [-o creator-os]
2015/11/05 05:06:28 [-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]
2015/11/05 05:06:28 [-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]
2015/11/05 05:06:28 [-T fs-type] [-U UUID] [-jnqvFKSV] device [blocks-count]
2015/11/05 05:06:28
2015/11/05 05:06:28
2015/11/05 05:06:58 ERROR:[Microsoft.OSTCExtensions.CustomScriptForLinux-1.0]Script returned an error.
2015/11/05 05:06:58 ERROR:---stdout---
2015/11/05 05:06:58 ERROR:Begin scanning and formatting data disks
2015/11/05 05:06:58 ERROR:Disks are /dev/sdc
2015/11/05 05:06:58 ERROR:Working on /dev/sdc
2015/11/05 05:06:58 ERROR:Creating filesystem on .
2015/11/05 05:06:58 ERROR:Next mount point appears to be /datadisks/disk1
2015/11/05 05:06:58 ERROR:Not adding 6d089360-3e14-401d-91d0-378f3fd09332 to fstab again (it's already there!)
2015/11/05 05:06:58 ERROR:Mounting disk on /datadisks/disk1
2015/11/05 05:06:58 ERROR:
2015/11/05 05:06:58 ERROR:---errout---
2015/11/05 05:06:58 ERROR:vm-disk-utils-0.1.sh: line 311: [: : integer expression expected
2015/11/05 05:06:58 ERROR:Usage: file [-bchikLNnprsvz0] [--apple] [--mime-encoding] [--mime-type]
2015/11/05 05:06:58 ERROR: [-e testname] [-F separator] [-f namefile] [-m magicfiles] file ...
2015/11/05 05:06:58 ERROR: file -C [-m magicfiles]
2015/11/05 05:06:58 ERROR: file [--help]
2015/11/05 05:06:58 ERROR:Usage: mkfs.ext2 [-c|-l filename] [-b block-size] [-f fragment-size]
2015/11/05 05:06:58 ERROR: [-i bytes-per-inode] [-I inode-size] [-J journal-options]
2015/11/05 05:06:58 ERROR: [-G meta group size] [-N number-of-inodes]
2015/11/05 05:06:58 ERROR: [-m reserved-blocks-percentage] [-o creator-os]
2015/11/05 05:06:58 ERROR: [-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]
2015/11/05 05:06:58 ERROR: [-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]
2015/11/05 05:06:58 ERROR: [-T fs-type] [-U UUID] [-jnqvFKSV] device [blocks-count]
2015/11/05 05:06:58 ERROR:mount: can't find /datadisks/disk1 in /etc/fstab or /etc/mtab
2015/11/05 05:06:58 ERROR:
2015/11/05 05:06:58 ERROR:
2015/11/05 05:06:58 [Microsoft.OSTCExtensions.CustomScriptForLinux-1.0]Enable,failed,1,Script returned an error.
2015/11/05 05:06:58 ---stdout---
2015/11/05 05:06:58 Begin scanning and formatting data disks
2015/11/05 05:06:58 Disks are /dev/sdc
2015/11/05 05:06:58 Working on /dev/sdc
2015/11/05 05:06:58 Creating filesystem on .
2015/11/05 05:06:58 Next mount point appears to be /datadisks/disk1
2015/11/05 05:06:58 Not adding 6d089360-3e14-401d-91d0-378f3fd09332 to fstab again (it's already there!)
2015/11/05 05:06:58 Mounting disk on /datadisks/disk1
2015/11/05 05:06:58
2015/11/05 05:06:58 ---errout---
2015/11/05 05:06:58 vm-disk-utils-0.1.sh: line 311: [: : integer expression expected
2015/11/05 05:06:58 Usage: file [-bchikLNnprsvz0] [--apple] [--mime-encoding] [--mime-type]
2015/11/05 05:06:58 [-e testname] [-F separator] [-f namefile] [-m magicfiles] file ...
2015/11/05 05:06:58 file -C [-m magicfiles]
2015/11/05 05:06:58 file [--help]
2015/11/05 05:06:58 Usage: mkfs.ext2 [-c|-l filename] [-b block-size] [-f fragment-size]
2015/11/05 05:06:58 [-i bytes-per-inode] [-I inode-size] [-J journal-options]
2015/11/05 05:06:58 [-G meta group size] [-N number-of-inodes]
2015/11/05 05:06:58 [-m reserved-blocks-percentage] [-o creator-os]
2015/11/05 05:06:58 [-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]
2015/11/05 05:06:58 [-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]
2015/11/05 05:06:58 [-T fs-type] [-U UUID] [-jnqvFKSV] device [blocks-count]
2015/11/05 05:06:58 mount: can't find /datadisks/disk1 in /etc/fstab or /etc/mtab

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with vm-disk-utils-0.1.sh around line 311 and compare its disk-detection and filesystem commands with the extension.log output. Reproduce the failure on one of the listed CentOS, openSUSE, or Oracle Linux versions, then verify that the data disk is formatted and mounted at /datadisks/disk1 without errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, linux, shell
Domain
infrastructure, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.