Azure / Azure/azure-quickstart-templates
"grep filesystem" may wrongly count /boot partition in the DEV list
- Dominant language
- Bicep
- Stars
- 14.9k
- Forks
- 16.2k
- Avg merge
- 6d 21h
- Merged PRs (30d)
- 6
Description
#### The detailed code line:
https://github.com/Azure/azure-quickstart-templates/blob/d5b583cc8aaed3c61692551a7ac04c89b5f2e2fc/shared_scripts/ubuntu/vm-disk-utils-0.1.sh#L122
-----
The /dev/sda1 on my test box has been the volume mounted at /boot.
#### Output of file -L -s:
file -L -s /dev/sda1
/dev/sda1: DOS/MBR boot sector, code offset 0x58+2, OEM-ID "mkfs.fat", sectors/cluster 8, Media descriptor 0xf8, sectors/track 63, heads 255, hidden sectors 2048, sectors 1048576 (volumes > 32 MB), FAT (32 bit), sectors/FAT 1024, reserved 0x1, serial number 0xfbb815da, unlabeled
has_filesystem returns 1 with the above output before /dev/sda is added in the DEV list in scan_for_new_disks. However it has a filesystem in place, thus /dev/sda should not get included in the result of scan_for_new_disks.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with shared_scripts/ubuntu/vm-disk-utils-0.1.sh at the linked line, then trace has_filesystem and scan_for_new_disks. Reproduce the /dev/sda1 output described in the issue and verify that a disk with a mounted /boot filesystem is excluded from the DEV list.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell, ubuntu
- Domain
- infrastructure, operating-systems
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100