Bug 986648

Summary: RFE: optimize automatic partitioning (and devicefactory) use of SSD
Product: [Fedora] Fedora Reporter: Artur Szymczak <ajes+redhat>
Component: python-blivetAssignee: Vojtech Trefny <vtrefny>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: amulhern, anaconda-maint-list, bcl, bughunt, dlehman, g.kaviyarasu, jonathan, mkolman, sbueno, stephent98, thomas.holmquist, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
anaconda.log
none
anaconda.program.log
none
anaconda.storage.log
none
/etc/fstab
none
/sys/block/sda/queue/scheduler none

Description Artur Szymczak 2013-07-21 09:13:13 UTC
Description of problem:
Could you add support for SSD disk detection in anaconda, and proper handling it? I mean, that anconda should properly:
- detect erase block, and add proper mkfs options during creating FS
- add relevant options to fstab (like discard, noatime or relatime)
- other

Comment 1 Steve Tyler 2013-07-21 22:01:17 UTC
Could you be more specific about what actually happened when you attempted to install to the SSD?

Did you get an exception?
Was the SSD detected?
Was the file system corrupt?

If the install succeeded, there should be log files in /var/log/anaconda/ on the installed system. Could you attach those as separate, uncompressed, text/plain files?

Comment 2 Steve Tyler 2013-07-21 22:37:07 UTC
FYI, you can configure mount options and file system tuning in a kickstart file:

15.4. Kickstart Options
...
part or partition
...
--fsoptions ...
--fsprofile ...
...
http://docs.fedoraproject.org/en-US/Fedora/19/html/Installation_Guide/s1-kickstart2-options.html

How are you installing?

Disclaimer: I have never used these options.

Comment 3 Artur Szymczak 2013-07-23 09:04:58 UTC
Created attachment 777237 [details]
anaconda.log

Comment 4 Artur Szymczak 2013-07-23 09:05:41 UTC
Created attachment 777238 [details]
anaconda.program.log

Comment 5 Artur Szymczak 2013-07-23 09:06:09 UTC
Created attachment 777239 [details]
anaconda.storage.log

Comment 6 Artur Szymczak 2013-07-23 09:06:38 UTC
Created attachment 777240 [details]
/etc/fstab

Comment 7 Artur Szymczak 2013-07-23 09:07:13 UTC
Created attachment 777241 [details]
/sys/block/sda/queue/scheduler

Comment 8 Artur Szymczak 2013-07-23 09:08:19 UTC
Q: Did you get an exception?
A: No exception.

Q: Was the SSD detected?
A: Yes.

Q: Was the file system corrupt?
A: No.

Comment 9 Artur Szymczak 2013-07-23 09:09:56 UTC
(In reply to Steve Tyler from comment #2)
> FYI, you can configure mount options and file system tuning in a kickstart
> file:
> 
(...)

End user, ould expect, that one's ssd wold be treated as expected automatically by anaconda, without kickstart intervention. But, thanks for you input.

Comment 10 Artur Szymczak 2013-07-23 09:22:11 UTC
I expect, that if anaconda would detect SSD drive as a 'target' drive, then it will:
- detect erase block for this ssd (using /sys or using https://github.com/bradfa/flashbench)
- properly align partition/lvm/luks on this drive (using information from above)
- use correct mkfs options to enhance performance (eg. http://wiki.gentoo.org/wiki/SSD)

Those steps, are essential, because it is hard to change it after installation.

And anaconda optionally could (it is not required, because one can change it after system is boot):
- activate trime on all LUKS/LVM/FS
- change I/O scheduler (eg. noop)

Comment 11 Steve Tyler 2013-07-23 11:56:40 UTC
Thanks, Artur.

  model: ATA OCZ-AGILITY4  path: /dev/sda  type: 1
http://ocz.com/consumer/agility-4-sata-3-ssd

Comment 12 Thomas Holmquist 2013-10-14 20:23:28 UTC
I think this is a dupe of bug#759920

Anyways, short of doing regex on the model of the drive you can fairly accurately detect SSDs through a combination of:

cat /sys/block/sdX/queue/rotational
and
cat /sys/block/sdX/removable

Comment 13 Thomas Holmquist 2013-11-21 21:48:59 UTC
It looks like Ubuntu will be integrating this into their installer: http://www.phoronix.com/scan.php?page=news_item&px=MTUxOTY

Comment 14 David Tonhofer 2014-05-15 13:57:10 UTC
Additional problems that are likely to be of interest:

1) Does the SSD need a block of unallocated data to function appropriately?
   - How can that be decided?
   - How can anaconda do that automagically (because doing it manually is a PITA)

2) What happens to an SSD if the partition is marked as "encrypted". Is
   encryption weakened? Is the SSD inappropriately used? Currently, the
   partition is not filled with random data in the first place, and thus
   most of the space allocated to the partition can be used by SSD controller
   during write consolidation, but is this really a good thing?

Comment 15 Fedora Admin XMLRPC Client 2015-09-28 20:25:13 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 16 Artur Szymczak 2018-06-21 09:15:02 UTC
Please close this.

Comment 17 Fedora Admin user for bugzilla script actions 2023-04-26 00:29:44 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.

Comment 18 Fedora Admin user for bugzilla script actions 2023-04-26 12:05:42 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.