You are not logged in.

#1 2015-05-20 02:14:37

shicky256
Member
Registered: 2014-11-26
Posts: 13

Is there any way to disable TRIM during installation?

I have a ThinkPad T43, which due to its unorthodox setup for IDE drives (Internal SATA converted to IDE) doesn't work too well with IDE to mSATA adapters. They work fine until you try to use TRIM. Then, you just get a bunch of read errors because of the limitations in converting SATA to IDE to SATA. This means that I can't install without the system giving me read errors. Is there a way to disable TRIM during the installation so that I don't have to install Arch on a hard drive and somehow get it onto the SSD without the SSD freezing up?

Offline

#2 2015-05-20 08:19:36

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: Is there any way to disable TRIM during installation?

According to https://wiki.archlinux.org/index.php/So … rives#TRIM, you need to enable TRIM via mount flags. It's up to you what mount flags you use to mount partitions you install onto.

Offline

#3 2015-05-20 14:11:34

shicky256
Member
Registered: 2014-11-26
Posts: 13

Re: Is there any way to disable TRIM during installation?

lucke wrote:

According to https://wiki.archlinux.org/index.php/So … rives#TRIM, you need to enable TRIM via mount flags. It's up to you what mount flags you use to mount partitions you install onto.

The problem is, it doesn't even get to that part. It gives me read errors when I try to format the drive to ext4. The drive and adapter aren't the problem, as they both work.

Last edited by shicky256 (2015-05-20 14:12:08)

Offline

#4 2015-05-20 14:56:02

Spider.007
Member
Registered: 2004-06-20
Posts: 1,175

Re: Is there any way to disable TRIM during installation?

Could this be related to mkfs' default to discard? From the man

discard
                          Attempt  to  discard blocks at mkfs time (discarding
                          blocks initially is useful on  solid  state  devices
                          and  sparse  /  thin-provisioned  storage). When the
                          device advertises that discard also zeroes data (any
                          subsequent  read  after the discard and before write
                          returns zero), then mark  all  not-yet-zeroed  inode
                          tables  as  zeroed.  This  significantly  speeds  up
                          filesystem initialization. This is set as default.

                   nodiscard
                          Do not attempt to discard blocks at mkfs time.

You should try with -E nodiscard, see if it helps

Offline

#5 2015-05-25 03:13:19

shicky256
Member
Registered: 2014-11-26
Posts: 13

Re: Is there any way to disable TRIM during installation?

Well, formatting worked on the version of PartedMagic included with Hiren's. Thanks anyway.

Offline

#6 2015-05-25 18:57:15

shicky256
Member
Registered: 2014-11-26
Posts: 13

Re: Is there any way to disable TRIM during installation?

Never mind. Even though the "discard" option is out of my fstab, I still get hangs and

ata1.00: failed command: DATA SET MANAGEMENT

errors. I even put the "nodiscard" option in my fstab and still get these errors. Is there any way to disable TRIM at the kernel level?

Offline

#7 2015-05-26 04:10:45

shicky256
Member
Registered: 2014-11-26
Posts: 13

Re: Is there any way to disable TRIM during installation?

It's definitely an Arch issue as well (I tried installing Debian, and everything worked fine).

Offline

#8 2015-05-26 16:23:43

Spider.007
Member
Registered: 2004-06-20
Posts: 1,175

Re: Is there any way to disable TRIM during installation?

shicky256 wrote:

It's definitely an Arch issue as well (I tried installing Debian, and everything worked fine).

lol. Arch does not cause these issues. This is probably caused by a kernel or e2fsprogs bug that isn't present in the version shipped by debian. So if you want to be constructive, figure out what package(version) causes this so you can report an actual bug (probably upstream, not with Arch).

What filesystem are you using, how did you create it and what are the current fstab options?

Last edited by Spider.007 (2015-05-26 16:26:38)

Offline

#9 2015-05-26 18:07:25

shicky256
Member
Registered: 2014-11-26
Posts: 13

Re: Is there any way to disable TRIM during installation?

My filesystem was ext4, I created it with the "mkfs.ext4" command with the "nodiscard" option, and my fstab was whatever Arch generated automatically plus nodiscard.

Offline

#10 2015-05-26 18:22:02

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: Is there any way to disable TRIM during installation?

shicky256 wrote:

my fstab was whatever Arch generated automatically plus nodiscard.

The fstab is generated by *you* running the `gen-fstab` script and then checking it (and modifying it, if necessary) afterwards.
https://wiki.archlinux.org/index.php/Be … e_an_fstab
If you prefer, you can write the fstab manually (I do this).

You can remount the filesystem manually with whatever options you want using:

# mount -o remount,<options> /<mountpoint>

See mount(8)

Offline

#11 2015-05-26 18:27:17

shicky256
Member
Registered: 2014-11-26
Posts: 13

Re: Is there any way to disable TRIM during installation?

I know how the fstab works. It's just that my laptop is on Debian now (what's the point of having a broken install?), so I don't know what was in my fstab (the system wouldn't even boot up due to the mount timing out because of read errors, so I couldn't read the fstab anyway). The disk was mounted with the default options that the genfstab command gives, appended by "nodiscard".

Offline

#12 2015-05-26 19:19:39

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: Is there any way to disable TRIM during installation?

Are you sure trim is to blame? It seems one either enables it via mount options or runs "fstrim" manually.

You could try installing Arch from Debian (https://wiki.archlinux.org/index.php/In … ting_Linux), installing linux-lts (which is at version 3.14; jessie uses 3.16) and booting into it.

Offline

#13 2015-05-26 19:21:55

shicky256
Member
Registered: 2014-11-26
Posts: 13

Re: Is there any way to disable TRIM during installation?

lucke wrote:

Are you sure trim is to blame? It seems one either enables it via mount options or runs "fstrim" manually.

I'm positive.

TRIM is implemented under the DATA SET MANAGEMENT command (opcode 06h) the draft ACS-2 specification.

Offline

#14 2015-05-29 22:56:56

shicky256
Member
Registered: 2014-11-26
Posts: 13

Re: Is there any way to disable TRIM during installation?

And it's not a kernel issue either (posting this from Debian sid, which uses the 4.0.4 kernel. It works fine).

Offline

Board footer

Powered by FluxBB