Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
7fa37870
Commit
7fa37870
authored
Jul 01, 2015
by
James Cammarata
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9683 from justinwyer/logical-block-size-and-sectors-9549
Disk size for advanced drives over 2 TB is incorrect
parents
dcb9b5a6
8146d1ff
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
lib/ansible/module_utils/facts.py
+2
-2
No files found.
lib/ansible/module_utils/facts.py
View file @
7fa37870
...
...
@@ -974,7 +974,7 @@ class LinuxHardware(Hardware):
part
[
'start'
]
=
get_file_content
(
part_sysdir
+
"/start"
,
0
)
part
[
'sectors'
]
=
get_file_content
(
part_sysdir
+
"/size"
,
0
)
part
[
'sectorsize'
]
=
get_file_content
(
part_sysdir
+
"/queue/
phys
ical_block_size"
)
part
[
'sectorsize'
]
=
get_file_content
(
part_sysdir
+
"/queue/
log
ical_block_size"
)
if
not
part
[
'sectorsize'
]:
part
[
'sectorsize'
]
=
get_file_content
(
part_sysdir
+
"/queue/hw_sector_size"
,
512
)
part
[
'size'
]
=
module
.
pretty_bytes
((
float
(
part
[
'sectors'
])
*
float
(
part
[
'sectorsize'
])))
...
...
@@ -991,7 +991,7 @@ class LinuxHardware(Hardware):
d
[
'sectors'
]
=
get_file_content
(
sysdir
+
"/size"
)
if
not
d
[
'sectors'
]:
d
[
'sectors'
]
=
0
d
[
'sectorsize'
]
=
get_file_content
(
sysdir
+
"/queue/
phys
ical_block_size"
)
d
[
'sectorsize'
]
=
get_file_content
(
sysdir
+
"/queue/
log
ical_block_size"
)
if
not
d
[
'sectorsize'
]:
d
[
'sectorsize'
]
=
get_file_content
(
sysdir
+
"/queue/hw_sector_size"
,
512
)
d
[
'size'
]
=
module
.
pretty_bytes
(
float
(
d
[
'sectors'
])
*
float
(
d
[
'sectorsize'
]))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment