Smallest disk size incorrectly detected with -d #105

Open
opened 2024-10-25 08:43:43 +02:00 by jlh-capturi · 0 comments
jlh-capturi commented 2024-10-25 08:43:43 +02:00 (Migrated from github.com)

The smallest_hd() function in functions.sh sometimes incorrectly detects the size of the smallest disk when disks are specified manually with the -d option.

I experienced this when trying to install an image on a server with 2 x 2TB disks and 4 x 8 TB disks. I wanted to install the image on the 2 x 2 TB disks. However, the smallest disk was detected to be 8 TB, which caused installimage to suggest a partitioning scheme that didn't fit on the small disks.

I specified the two 2 TB disks with -d. That's stored in \$OPT_DRIVE${i} internally. But smallest_hd() uses \$DRIVE$i to detect disk sizes, which are the disks not overwritten by the -d option. And in my particular case, $DRIVE1 and $DRIVE2 both happened to be 8 TB disks.

The `smallest_hd()` function in functions.sh sometimes incorrectly detects the size of the smallest disk when disks are specified manually with the `-d` option. I experienced this when trying to install an image on a server with 2 x 2TB disks and 4 x 8 TB disks. I wanted to install the image on the 2 x 2 TB disks. However, the smallest disk was detected to be 8 TB, which caused installimage to suggest a partitioning scheme that didn't fit on the small disks. I specified the two 2 TB disks with `-d`. That's stored in `\$OPT_DRIVE${i}` internally. But smallest_hd() uses `\$DRIVE$i` to detect disk sizes, which are the disks not overwritten by the `-d` option. And in my particular case, `$DRIVE1` and `$DRIVE2` both happened to be 8 TB disks.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DiamantTh/installimage#105
No description provided.