[SOLVED] fstrim fails on LUKS-device

Hello,
today I've encountered a strange issue when installing Arch to my new SSD. I've read a lot about the options you have to set to enable TRIM and tried to configure my system according to these tutorials.
First of all the error:
# fstrim -v /home
fstrim: /home: FITRIM ioctl failed: Operation not supported.
These are my devices:
# blkid
/dev/sda1: UUID="d6e350c2-3b85-4cc8-8802-326f310912d9" TYPE="ext4"
/dev/sda2: UUID="8c3ea242-7b75-41d2-93f9-75b3c65aaa74" TYPE="crypto_LUKS"
/dev/mapper/home: UUID="a6419946-da6f-4ea7-9108-e882fb322fd4" TYPE="ext4"
"/dev/sda1" is the unencrypted root filesystem, "/dev/sda2" is the encrypted LUKS-device for /dev/mapper/home, which is mounted in /home.
I've added the mapped device to my /etc/fstab with the "discard" option:
/dev/sda1 / ext4 rw,discard,noatime 0 1
UUID=a6419946-da6f-4ea7-9108-e882fb322fd4 /home ext4 rw,discard,noatime 0 1
Then I configured this boot option line for GRUB to enable the discard option and updated the grub.cfg, of course:
linux /boot/vmlinuz-linux root=UUID=d6e350c2-3b85-4cc8-8802-326f310912d9 ro cryptdevice=/dev/sda2:home:allow-discards root_trim=yes quiet
Finally I enabled discard in /etc/crypttab:
home UUID=8c3ea242-7b75-41d2-93f9-75b3c65aaa74 none luks,discard
To realize these changes at the next reboot I also made a new initcpio with
# mkinitpcio -p linux
Having then rebooted I tried whether I was successful with
# dmsetup table /dev/mapper/home --showkeys
Some tutorials told me that there had to be "allow_discards" but there wasn't. I assume that I have forgotten something and TRIM doesn't work as a result.
Thank you in advance.
Last edited by daemoon (2013-08-11 12:02:01)

Not sure but you are trying to apply allow-discards to the physical partition (/dev/sda2) rather than the mapped device, right? Whereas the wiki does it the other way - at least the example at https://wiki.archlinux.org/index.php/LU … _.28SSD.29 suggests that.
Note that I have no idea if this matters.
I can tell you that the final figure on your fstab line for /home should be 2 rather than 1 but that is not the cause of your problem. Also, if you have the fsck hook in initramfs, you should change ro to rw on grub's kernel command line. If you don't have the hook, you should leave it as is.

Similar Messages

  • Apple ID verification on iCloud fails on both devices.

    My Apple ID verification on iCloud is failing on both devices.  I am tired of resetting a Password!
    Device iPad
    MC705C/A - Model
    8.1.1 - Version
    Device iPhone 6 Plus
    iOS 8.1.1
    MOdel MGAK2AA/A
    PPlease help.

    Thank you. I found a less drastic solution, even if it required me to read between the lines. At this page: http://www.apple.com/icloud/setup/ios.html, the first step reads, "Make sure your device is running the latest version of iOS." When I encountered my "Verifying" problem, iOS 8.0.2 had just been released.
    So, what solved my problem was, I updated to iOS 8.0.2. After updating, the "Verifying" step completed, and I was able to access my iCloud account settings within the app.
    I would prefer that Apple suggested that one reason I couldn't continue was that I needed to update, but other than that, I am OK with how things turned out.

  • After trying to sync my ipad to a new pc, i get this error message "Attempting to copy to the disk "windows" failed.  the device is not connected."  but it is connected.

    I have been trying sync my ipad to a new pc and I get this message after the sync fails:
    "Attempting to copy to the disk "windows" failed.  The device is not connected."
    The device is connected, what is wrong here?

    This is a common problem that is most likely caused by files that are not marked to have proper read/write permissions.
    To solve this problem, follow these steps.
    1. Close iTunes.
    2. Using the finder, Ctrl-click the folder that contains your music files, then select Get Info.
    3. Ensure that the Owner is set to have Read & Write privileges. Choose to Apple to enclosed items…
    Once you have modified permissions, fire up iTunes and try to sync your music again. If it throws the same error message and still doesn’t work, research more about permissions in Mac OS X, as there could be something else not right with the permissions of your music files.

  • I have an older iMAC that once burned CD's with no issues. Now I get an error message saying "The attempt to burn a disc failed. The device is not accessible, probably because it was removed". I have never had it touched so the device was not removed.Help

    I have an olde iMac that once I have an older iMAC that once burned CD's with no issues. Now I get an error message saying "The attempt to burn a disc failed. The device is not accessible, probably because it was removed". I have never had it touched so the device was not removed. Please advise as to what could be the problem. How to fix. Thanks

    Try resetting the SMC and PRAM first, if that doesn't help try a cleaning disc.....and then buy an inexpensive external burner. Slimline super drive failures are all too common.
    To reset the SMC
    Shut down the computer.
    Unplug the computer's power cord.
    Wait fifteen seconds.
    Attach the computer's power cord.
    Wait five seconds, then press the power button to turn on the computer.
    Resetting NVRAM / PRAM
    Shut down your Mac.
    Locate the following keys on the keyboard: Command (⌘), Option, P, and R. You will need to hold these keys down simultaneously in step 4.
    Turn on the computer.
    Press and hold the Command-Option-P-R keys before the gray screen appears.
    Hold the keys down until the computer restarts and you hear the startup sound for the second time.
    Release the keys.

  • HT2433 I purchased an external CD drive because the internal one died.  When I try using the new drive I get the following msg "The attempt to burn a disc failed.  The device is not accessable, probably because it was removed"

    I purchased an external CD drive for my MacBook,the internaldrive had died.  When I tried using the new drive I got the following msg "The attempt to burn a disc failed.  The device is not accessable, probably because it was removed"  I contacted OWC and tried to work the issue with them, we gave up and OWC sent me a replacement.  I connected the replacement and am getting the same message.  Any thoughts?

    Try resetting the SMC and PRAM first, if that doesn't help try a cleaning disc.....and then buy an inexpensive external burner. Slimline super drive failures are all too common.
    To reset the SMC
    Shut down the computer.
    Unplug the computer's power cord.
    Wait fifteen seconds.
    Attach the computer's power cord.
    Wait five seconds, then press the power button to turn on the computer.
    Resetting NVRAM / PRAM
    Shut down your Mac.
    Locate the following keys on the keyboard: Command (⌘), Option, P, and R. You will need to hold these keys down simultaneously in step 4.
    Turn on the computer.
    Press and hold the Command-Option-P-R keys before the gray screen appears.
    Hold the keys down until the computer restarts and you hear the startup sound for the second time.
    Release the keys.

  • The boot selection failed because a device is inaccessible, not the usual boot error though?? (0xc000000e)

    Hey,
    I need some help fast please. I recently booted up my gaming rig after swapping out a 7970 graphics card and upon system boot up, as the windows 7 logo appeared the system crashes and a BSOD appears for a split millisecond and I'm asked to start up repair windows
    or start windows normally however when I click start up repair a black error screen appears with the following message and error: The boot selection failed because a device is inaccessible error state and an error code:0xc000000e. Now of fixed this before
    multiple times except this instance nothing seems to work Ive tried the following:
    - check for any unplugged or loose cables
    - Re installed my ram
    - Booted with on board graphics
    - unplugged all usb devices and external devices with the exception of the keyboard and mouse
    - Booted with system installation disc and attempted system repair several times only with the same outcome of wanting to restore from a previous system restoration point however it always fails
    - changed the boot type to IDE which made the system boot furhter past the logo screen however it still crashes with the same error
    - From the system installation disc I ran a chkdsk /f and no corruptions or bad sectors were found
    However, I did run from the installation disc a "bcdedit" and my osdevice was  unkown and my boot manager and boot loader were set to two different drives on being D: and the other being C:. So I re-linked all three back to the D: drive as the
    windows installation disc says thats where Windows 7 is installed, although in the actual windows 7 My Computer its listed as C: drive which is weird? anyways after re-linking them using bcdedit /set {default} osdevice partition=D: and the other two commands
    my recovery partition disappeared  which was listed as C:, and now I can only see my local drive? That did not fix the error so I tried one last thing and ran another chkdsk D: /f /r which is taking for ages and I'm assuming my hard drive and its contents
    are still intact ( thank god!!) because its taking so long and there are 612080 files to be processed!
    I thought I might try and rebuild Master Boot Record?
    I don't want to loose any of my data, well I hope I haven't lost any because I have over 150+ games and their saves :(
    Any help or suggestions would be much appreciated :D 
    thanks guys! 

    Hi,
    Repair the current OS using the Windows 2008 / 7 DVD:
    Boot to the Windows DVD
    Select Next > Repair your computer
    Select Next > Command Prompt
    Change directory (cd) to x:\Sources\recovery 
    then type Startrep.exe to launch a quick automated startup repair utility which corrects boot environment values. This step may require more than one attempt and should be repeated a couple of times if the first repair fails.
    If step 3 fails, open the command prompt and type bcdedit This
    will display the values for Windows Boot Manager.
    Review the values for Device. Is it set to unknown, as shown below? If so, proceed to step 7.
    At the command prompt, type the following commands (c: is the default system partition. If your original partition was another drive letter, this value can be set to that drive letter):
    bcdedit
    /set {DEFAULT.EN_US} device partition=c:
    (press enter)
    bcdedit
    /set {DEFAULT.EN_US} osdevice partition=c:
    (press enter)
    bcdedit
    /set {BOOTMGR.EN_US} device partition=c:
    (press enter)
    Reboot the system after removing the OS disk.
    Hope it helps,
    Jan

  • Failed intialize core device got a error whil installting solaris9 through

    Hi All
    iam setuping jumpstart server, i have downloaded free version solaris 10 x86 and i installed
    and i configured,config9(configurations) rules ,profile sysidcfg, hosts evry thing i configured when i run ./check script it is working fine
    server is dell mechine(solaris 10 x86 )
    client model is solaris sun-blade1000 mechine
    and i have taken cd images to the server(normal image not flash archive)
    it is working fine when i run add_client_script .
    when i run boot net - install from client mechine in the ok prompt
    i got a below error please help me in this ,this is very high priroty taks
    configuring devices /dev and /devices
    F
    Fatal error
    failed intilize core devices
    /usr/openwin/bin/xinit: core devices interupted system call error No:4 unable to connec to server
    /usr/openwin/bin/xinit:no such process (error no :3) server error
    and then it is comming to the command prompt
    i got above error please help me
    my mail is :mmuralica78@gmail com
    Note : while installing solaris 10 sparc ,it is working fine
    iam facing problem solaris9 and solaris 8 for sun blade 1000 mechine
    Thanks
    Murali M

    You need to move to 12.1(19)EA1 or later and this problem will be resolved. This is a problem in the IOS not supporting the ENTITY-MIB.

  • "The attempt to burn a disc failed. The device failed to respond properly"

    Hello everyone,
    I have suddenly developed a problem when trying to burn a CD. I get the "Checking playlist" and "Initializing" messages, and then Writing...(the name of the first track)", but about 20 seconds later, just when seems as if it will start burning, the CD is ejected and I get the following message: ""The attempt to burn a disc failed. The device failed to respond properly, unable to recover or retry."
    I have browsed the forums here and it seems that many other people have had similar problems. I am running a Powerbook G4, OS X version 10.2.8, iTunes 6.0.5.
    I have used several different brands of media, and many slower burning speeds, but nothing helps.
    I can still listen to CD's with my computer, just not burn anything.
    My computer is about 5 years old. Do you think that this problem is suddenly occurring simply because my optical drive needs to be replaced?
    Also, another issue, possibly related, but maybe not, is that, after my burn failed for the first time, I put in a completely different CD to see if it would play. It did, but instead of listing the correct tracks on the CD, it showed the tracks of the previous playlist that had the failed burn.
    For example, I imported the tracks from one CD into my Library, then moved them to a playlist. When I tried to burn the contents of that playlist to a CD, I received the "attempt to burn failed" message that I previously described.
    Then, I inserted a completely different disc, but iTunes read it as having the same contents of the playlist that had failed to burn, but when I clicked on the track titles, they played from the new CD that I'd inserted, not the failed playlist. So although the titles indicated that I was working with the failed playlist, the media that played was from the new CD.
    Any suggestions would be greatly appreciated!
    Sarah
    Powerbook G4   Mac OS X (10.2.x)  
    Powerbook G4   Mac OS X (10.2.x)  

    I'm having a similar problem. In my case, the problem started about two months ago. I regularly update software. Currently I'm at 10.4.10 and iTunes 7.3.2(6).
    In my case, I'm trying to backup recent iTunes purchases. I'm unable to burn CDs with the original combo drive (CD) or my internal NEC burner (DVDs). I get a series of coasters. Occasionally .Mac Backup fails as well. Toast 7 works fine. Even stranger, I can burn 1 DVD successfully with an external Pioneer DVD burner (4x) USB 2 using iTunes. (I have a belkin USB 2 card) Multiple DVDs fail. I recently switched to this PowerMac from an iBook and several preference files were copied with my home directory during the transition. The external drive was used with the iBook, but not on this system before which may lend to the preferences file as a possibility.
    However, I find it odd that my external drive works and both internal drives are failing. I was suspecting the IDE controller on the logic board, except that Toast works. This logic board is not as old as the computer. It was a replacement in 2005 when an after market ATI card fried and took it and the power supply out. At first I suspected a hardware problem and replaced the IDE cable which looked warn. The NEC drive is about two years old and the combo drive is the original. They are on the same controller.
    In my case it is certainly possible the drives or controller are starting to fail. I wonder if anyone else might have an external cd/dvd drive they could test that are having the problem.

  • BPM_DATA_COLLECTION fails with (Output device "" not known) error

    Hi all,
    I have an issue with Output BPM_DATA_COLLECTION_1 job in the satellite system  failing with 'Output device "" not known error.  Since it is collecting data for Solution Manager system why does is it trying to find an output device.
    It did not fail before and now I added another key figure (custom one) which is done the same way the other custom monitors are done in "Z_BPM_ECU_COLLECTOR" report and then in /SSA/EXM program, but the collector job started to fail.
    Also, for some reason there are two BPM_DATA_COLLECTION jobs, one is BPM_DATA_COLLECTION_1 and the other is BPM_DATA_COLLECTION_2.  _1 runs every 5 min and _2 is less frequent. They both seem to runt the same job which is /SSA/EXS. Why are there two jobs scheduled from solution manager in my satellite system?
    Thank you very much for your help!

    I am experiencing this same issue in our ECC 6.0 system.  We currently have ST-A/PI release 01M_ECC600 level 0001 applied to our system.  These jobs finish successfully in SM37, but I'm seeing the same error messages in our system logs (SM21).
    When I try to update the output device that is associated with these jobs, the user ID running the jobs is not valid since it's user type is Communication Data.
    Does anyone know if it ok to change the user for this job? Should it be run by DDIC?  I believe the jobs were created automatically when we applied ST-A/PI release 01M_ECC600 level 0001.

  • Whenever I try to sync my iPhone 3Gs it always fails, saying the device timed out. Any suggestions with what to do??

    Whenever I try to sync my iPhone 3Gs it always fails, saying the device timed out. Any suggestions with what to do??

    Did you recently restore or update your iPhone?

  • Sync fails on all devices

    My sync fails with all devices.
    iPhone 5
    iPod 5
    iPad 2
    all previously backed up. Ever since the first backup they have failed. several updates in iOS and iTunes. I am upgrading my HDD on my PC running Win 7. Every piece of software is a fresh install. And still fail. Tried changing USB ports. No change. Is there any log file that is on the devices that could block this, if it is corrupt? I've already done a hard reset on one of the phones and no change. This is rrrrreeeeeaaaalllyyy irritating. I love the phones and iPad. I'm really ticked at iTunes. Always had problems with it. It has always bogged my computer down and never shows you what its doing.
    Please help!!!!!!!!!

    check out funambol or scheduleworld
    or stick with the gmailsync... it will eventually work... it just got released not to long ago... they will work out the bugs... once they do, it will be the next best thing to a BES
    Message Edited by drizzt09 on 05-08-2009 11:39 PM

  • Kernel compiling - mount failed: No such device?

    Hello everyone!
    I'm having an issue with mounting the linux kernel I've just compiled.  What I've done:
    -  I've patched linux-2.6.33.3 with patch-2.6.33.3-rt19 by issuing bzcat ../patch-2.6.33.3-rt19.bz2 | patch -p1
    -  sudo make -j4 all
    -  sudo make modules_install
    -  sudo mkinitcpio -g /boot/kernel26rt.img -k 2.6.33.3-rt19
    -  sudo cp ./arch/x86/boot/bzImage /boot/vmlinuz2.6.33.3x86-rt
    -  sudo cp ./System.map /boot/System.map2.6.33.3x86-rt
    -  sudo rm /boot/System.map
    -  sudo ln -s /boot/System.map2.6.33.3x86-rt /boot/System.map
    -  Edit grub/menu.lst:
    # (0) Arch Linux
    title Arch Linux2
    root (hd0,2)
    kernel /vmlinuz26 root=/dev/disk/by-label/root ro
    initrd /kernel26.img
    # (1) Arch Linux
    title Arch Linux Fallback
    root (hd0,2)
    kernel /vmlinuz26 root=/dev/disk/by-label/root ro
    initrd /kernel26-fallback.img
    # (2) Windows
    title Windows
    rootnoverify (hd0,0)
    makeactive
    chainloader +1
    # (3) RT Kernel
    title RT Linux
    root (hd0,2)
    kernel /vmlinuz2.6.33.3x86-rt root=/dev/disk/by-label/root ro
    initrd /kernel26rt.img
    Now when I select the rt kernel from grub, it fails with:
    mount: mounting /dev/disk/by-label/root on /new_root failed: No such device
    Can anyone help me figure out what went wrong?
    -nonpoly

    http://www.cs.bgu.ac.il/~arik/usail/net … /tips.html
    Look under "Common NFS Errors"
    I'm guessing you haven't installed nfs-utils and portmap on the client. Or you haven't started them. In the right order (portmap, then nfslock - you don't need to start nfsd on the client)

  • "The attempt to burn a disc failed. The device failed to calibrate...."

    Using my "new" used 20inch-iMac G5, I just successfully burned my first music cd.
    Moments later, I tried (repeatedly, with a half-dozen different blank cds) to burn a second music cd, and got the following message each time:
    "The attempt to burn a disc failed. The device failed to calibrate the laser power level for this media."
    1) What does that message mean?
    2) What should I do next to fix the problem?
    thank you

    I'm really getting tired of this, so I decided to bit the bullet and try to get it fixed. (Note that I'm talking about a 2-year old G5 iMac.)
    THE BAD NEWS:
    Apple store genius bars see this error "a lot" (even just this week), and it's usually the optical drive that needs to be replaced.
    THE GOOD NEWS:
    In Apple's article Do It Yourself iMac G5 parts you can install, they say, "iMac G5 computers are designed to make it easy for you to install replacement parts if you need to. These parts are known as Do It Yourself (DIY) parts." Listed among these parts is the optical drive. Apple even provides a PDF manual describing the simple process of replacing the optical drive.
    THE IRONY:
    An Apple store will NOT sell you this part, even at their high price of $221. They insist on doing the installation. And the price for this 10-minute procedure -- described in their online manual as sliding the drive into place and replacing the screws -- is an additional $130 (and I'm guessing they won't do it while you wait). That seems to be a labor rate of around $780 per hour for a "Do It Yourself" replacement that they won't let you do yourself.
    So Apple's $351 price to (maybe) get an old G5 iMac burning CDs again is almost 1/3 of what a brand new aluminum Core 2 Duo iMac costs.
    THE UPSIDE:
    Online third parties will sell you a "genuine Apple" super drive for around $145 (or a combo drive for $95) to install yourself. (Use Google to search for "imac g5 optical drive replacement cost.")

  • Failed to add device to WCS Reason: Object not found in device

    Hi i am adding wlc (ver 7.0.116.0) to WCS (ver 7.0.164.0) and getting bellow error message.
    Failed to add device to WCS  Reason:  Object not found in device
    This controller was successfully added to the WCS before upgrading WLC ios to 7.0.116. Now i am unable to communicate with the controller thru WCS. The controller itself work ok and serve all WAPs with no issue.
    Any ideas would be appreciated.
    Regards.

    You will need to upgrade WCS to Version 7.0.172.0. WCS version 7.0.64.0 does not support or manage WLC version 7.0.116.0. Hope this helps.

  • I am having trouble signing into my adobe account on my tablet it says failed to authorize device?

    I am having trouble signing into my adobe account on my tablet.  When I sign in it says failed to authorize device when I sign in and I have used my adobe account on this tablet in the past.

    I have tried that several times as well. All that I get is a white screen that says "hello" and tells me "Update Completed Your iPhone was updated successfully. There are just a few more steps to follow, and then you're done!" so i click "continue"  it asks for my iCloud password, I put it in and it goes black gives me white apple logo then takes me right back to where I started with the white "hello" screen displaying. Ive tried resetting my password multiple times and nothing is happening, I dont know what else to do.

Maybe you are looking for

  • Default WH via DTW

    Dear Expert, I am trying to assign the default Warehouse via DTW > i am putting the Warehouse code in the field of default warehouse in Item templates but failed . Error is {OITM.DFLT} The Connected value 1 was not found in the table Warehouse Applic

  • What is 'A Hybrid compressor'  tamed the peaks

    I am alos trying to tame the peaks (while mastering) Someone told me 'A hybrid compressor will tame the peaks' What does a hybrid compressor means?? I have lots of the waves plug ins and other ones but I am not clear what a hybrid compressor is and d

  • Exporting AVI in Final Cut pro 7

    I have to export a video I created in fcp 7 in avi format. It's a 20 minute video and when I exported it into quicktime conversion using the avi option, I've found that the video quality is poor. I'm using this to be used on a Web site and would like

  • Can't attach files in yahoo email with Lion

    After installing Lion, I'm unable to attach files from my Yahoo email account.!x? Also, I am unable to print from my Epson NX 400 printer as Epson has provided an update for Mac OS X v10.7+ Anyone have recommendations to correct issues, other than de

  • How to edit my resume from my email

    how to edit my cv from my inbox or my email