Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: "discard option is not supported" - why?

  1. #1

    "discard option is not supported" - why?

    Why can't I TRIM my SSD drives? I'm not using dmcrypt or LVM.

    ha11b:~ # fstrim /boot
    fstrim: /boot: the discard operation is not supported

    ha11b:~ # cat /etc/issue

    Welcome to SUSE Linux Enterprise Server 12 SP2 (x86_64) - Kernel \r (\l).

    ha11b:~ # uname -a
    Linux ha11b 4.4.59-92.17-default #1 SMP Thu Apr 6 14:16:09 UTC 2017 (7bc489d) x86_64 x86_64 x86_64 GNU/Linux


    ha11b:~ # df -h
    Filesystem Size Used Avail Use% Mounted on
    devtmpfs 16G 8.0K 16G 1% /dev
    tmpfs 16G 76K 16G 1% /dev/shm
    tmpfs 16G 11M 16G 1% /run
    tmpfs 16G 0 16G 0% /sys/fs/cgroup
    /dev/md0 50G 3.2G 45G 7% /
    /dev/sdc4 479M 61M 389M 14% /boot
    tmpfs 3.2G 20K 3.2G 1% /run/user/0
    /dev/sr1 3.2G 3.2G 0 100% /run/media/root/SLE-12-SP2-Server-DVD-x86_642192

    ha11b:~ # mount
    sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
    proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
    devtmpfs on /dev type devtmpfs (rw,nosuid,size=16360988k,nr_inodes=4090247,mode=7 55)
    securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
    tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
    devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode =000)
    tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
    tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
    cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_age nt=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
    pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
    cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
    cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
    cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
    cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
    cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
    cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
    cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
    cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
    cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
    cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
    /dev/md0 on / type ext4 (rw,relatime,stripe=160,data=ordered)
    systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=22,pgrp=1,timeout=0,minproto=5,max proto=5,direct)
    hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
    mqueue on /dev/mqueue type mqueue (rw,relatime)
    debugfs on /sys/kernel/debug type debugfs (rw,relatime)
    /dev/sdc4 on /boot type ext4 (rw,relatime,data=ordered)
    tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=3274960k,mode=700)
    gvfsd-fuse on /run/user/0/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=0,group_id=0)
    fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
    /dev/sr1 on /run/media/root/SLE-12-SP2-Server-DVD-x86_642192 type iso9660 (ro,nosuid,nodev,relatime,uid=0,gid=0,iocharset=ut f8,mode=0400,dmode=0500,uhelper=udisks2)
    tracefs on /sys/kernel/debug/tracing type tracefs (rw,relatime)
    Last edited by forbin; 02-Jun-2017 at 20:53.

  2. #2

    Re: "discard option is not supported" - why?

    Also...

    ha11b:~ # hdparm -I /dev/sdc | grep TRIM
    * Data Set Management TRIM supported (limit 8 blocks)
    * Deterministic read ZEROs after TRIM

  3. Re: "discard option is not supported" - why?

    Hi
    Trim is taken care of via the fstrim systemd timer/service these days, as well as things like disk scheduler options (dependent of disk type)?

    Suggest you check it's enabled, so you should see it has been run in the logs.

    Also look at adding discard to the mount options for the ext4 partitions.
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  4. #4

    Re: "discard option is not supported" - why?

    I don't want discard in the mount options because of the performance issues.

    Either way, fstrim should still work from the command line, no?

  5. Re: "discard option is not supported" - why?

    Hi
    Yes it should, I have ext4 on my /boot with SLED 12 SP2 and fstrim works fine (OCZ device), / is btrfs. Both versions are the same.. 2.28-44.6.1.

    So I would assume the system is all up to date with packages and patches? If not;
    Code:
    zypper ref
    zypper up
    zypper up -t patch
    If you add the -v option to the fstrim command no further info aside from the error?
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  6. #6

    Re: "discard option is not supported" - why?

    All up to date with zypper.

    ha11b:~ # fstrim -v /boot
    fstrim: /boot: the discard operation is not supported

  7. Re: "discard option is not supported" - why?

    Quote Originally Posted by forbin View Post
    All up to date with zypper.

    ha11b:~ # fstrim -v /boot
    fstrim: /boot: the discard operation is not supported
    Hi
    So what model SSD is this?
    Code:
    smartctl -a /dev/sdc
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  8. #8

    Re: "discard option is not supported" - why?

    ha11b:~ # smartctl -a /dev/sdc
    smartctl 6.2 2013-11-07 r3856 [x86_64-linux-4.4.59-92.17-default] (SUSE RPM)
    Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

    === START OF INFORMATION SECTION ===
    Model Family: Samsung based SSDs
    Device Model: Samsung SSD 840 PRO Series
    Serial Number: S12SNEACB03042W
    LU WWN Device Id: 5 002538 5500af75c
    Firmware Version: DXM06B0Q
    User Capacity: 512,110,190,592 bytes [512 GB]
    Sector Size: 512 bytes logical/physical
    Rotation Rate: Solid State Device
    Device is: In smartctl database [for details use: -P show]
    ATA Version is: ACS-2, ATA8-ACS T13/1699-D revision 4c
    SATA Version is: SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
    Local Time is: Sun Jun 4 21:19:07 2017 PDT
    SMART support is: Available - device has SMART capability.
    SMART support is: Enabled

    === START OF READ SMART DATA SECTION ===
    SMART overall-health self-assessment test result: PASSED

    General SMART Values:
    Offline data collection status: (0x00) Offline data collection activity
    was never started.
    Auto Offline Data Collection: Disabled.
    Self-test execution status: ( 0) The previous self-test routine completed
    without error or no self-test has ever
    been run.
    Total time to complete Offline
    data collection: (53956) seconds.
    Offline data collection
    capabilities: (0x53) SMART execute Offline immediate.
    Auto Offline data collection on/off support.
    Suspend Offline collection upon new
    command.
    No Offline surface scan supported.
    Self-test supported.
    No Conveyance Self-test supported.
    Selective Self-test supported.
    SMART capabilities: (0x0003) Saves SMART data before entering
    power-saving mode.
    Supports SMART auto save timer.
    Error logging capability: (0x01) Error logging supported.
    General Purpose Logging supported.
    Short self-test routine
    recommended polling time: ( 2) minutes.
    Extended self-test routine
    recommended polling time: ( 35) minutes.
    SCT capabilities: (0x003d) SCT Status supported.
    SCT Error Recovery Control supported.
    SCT Feature Control supported.
    SCT Data Table supported.

    SMART Attributes Data Structure revision number: 1
    Vendor Specific SMART Attributes with Thresholds:
    ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
    5 Reallocated_Sector_Ct 0x0033 099 099 010 Pre-fail Always - 12
    9 Power_On_Hours 0x0032 092 092 000 Old_age Always - 38017
    12 Power_Cycle_Count 0x0032 099 099 000 Old_age Always - 262
    177 Wear_Leveling_Count 0x0013 098 098 000 Pre-fail Always - 44
    179 Used_Rsvd_Blk_Cnt_Tot 0x0013 099 099 010 Pre-fail Always - 12
    181 Program_Fail_Cnt_Total 0x0032 100 100 010 Old_age Always - 0
    182 Erase_Fail_Count_Total 0x0032 100 100 010 Old_age Always - 0
    183 Runtime_Bad_Block 0x0013 099 099 010 Pre-fail Always - 12
    187 Uncorrectable_Error_Cnt 0x0032 099 099 000 Old_age Always - 464
    190 Airflow_Temperature_Cel 0x0032 079 060 000 Old_age Always - 21
    195 ECC_Error_Rate 0x001a 200 200 000 Old_age Always - 464
    199 CRC_Error_Count 0x003e 100 100 000 Old_age Always - 0
    235 POR_Recovery_Count 0x0012 099 099 000 Old_age Always - 254
    241 Total_LBAs_Written 0x0032 099 099 000 Old_age Always - 8410739041

    SMART Error Log Version: 1
    No Errors Logged

    SMART Self-test log structure revision number 1
    Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
    # 1 Offline Completed without error 00% 1603 -

    SMART Selective self-test log data structure revision number 1
    SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
    1 0 0 Not_testing
    2 0 0 Not_testing
    3 0 0 Not_testing
    4 0 0 Not_testing
    5 0 0 Not_testing
    255 0 65535 Read_scanning was never started
    Selective self-test flags (0x0):
    After scanning selected spans, do NOT read-scan remainder of disk.
    If Selective self-test is pending on power-up, resume after 0 minute delay.

  9. Re: "discard option is not supported" - why?

    Hi
    Looks like it is still blacklisted due to a firmware bug....
    Code:
    libata-core.c:	{ "Samsung SSD 8*",		NULL,	ATA_HORKAGE_NO_NCQ_TRIM |
    Let me ask my SUSE Contacts if the is a change.
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  10. #10

    Re: "discard option is not supported" - why?

    Supposedly the problem with libata-core.c was fixed in kernel 4.2 and higher. That's the whole reason I went with SUSE instead of Red Hat. The latest version of Red Hat (7.3) ships with kernel 3.10, but the latest version of SUSE ships with kernel 4.4. Also, I don't care about NCQ TRIM. Sequential TRIM is fine.
    Last edited by forbin; 05-Jun-2017 at 14:20.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •