You are not logged in.

#1 2014-11-17 07:50:25

Thijxx
Banned
Registered: 2013-08-24
Posts: 18

[SOLVED] SSD not persistent

My SSD forgets data.

Let's say I install an application, all is well. Then after a reboot it is gone, completely gone including all configs, related data, etc.
Also happens when I config fstab for example. I go back to the previous version.

I use an SSD and I must be doing something wrong in the drive setup in fstab..
Only 30% of the disk is partitioned. TRIM is enabled. It's using cfq i/o scheduler.
Drive is a Crucial-M4.

UUID=2bddf92c-de9e-4bbc-bec9-5ba848dea11c / ext4 rw,defaults,noatime,discard 0 1
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0

Followed this wiki:

root@thijspc .:08:38:. {thijs}>hdparm -I /dev/sdc | grep TRIM
	   *	Data Set Management TRIM supported (limit 8 blocks)
	   *	Deterministic read data after TRIM

And:

[root@thijspc ~]# cat /sys/block/sdc/queue/scheduler
noop deadline [cfq] 

fdisk

Disk /dev/sdc: 238.5 GiB, 256060514304 bytes, 500118192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 04171B1D-F083-4569-AFD9-5AC6B38C6063

Device         Start       End   Sectors  Size Type
/dev/sdc1       2048 204802047 204800000 97.7G Linux filesystem
/dev/sdc2  204802048 204804095      2048    1M BIOS boot

Have I forgotten some important step in the installation progress regarding SSD's maybe?
Because this happens not always, verifying a solution will be an issue so please bare with me.

Last edited by Thijxx (2014-11-25 09:49:53)

Offline

#2 2014-11-17 07:52:26

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] SSD not persistent

Not an Installation issue, moving to Kernel & Hardware...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2014-11-17 11:11:07

tsh
Member
From: Munich
Registered: 2014-07-25
Posts: 41
Website

Re: [SOLVED] SSD not persistent

Do you see any ATA errors/warning in

dmesg

output?

Offline

#4 2014-11-17 11:20:35

mich41
Member
Registered: 2012-06-22
Posts: 796

Re: [SOLVED] SSD not persistent

This shouldn't be happening. Can you run fsck with the most pedantic error checking options available for your filesystem? What about smartctl -a?

Offline

#5 2014-11-17 14:32:13

Thijxx
Banned
Registered: 2013-08-24
Posts: 18

Re: [SOLVED] SSD not persistent

tsh wrote:

Do you see any ATA errors/warning in

dmesg

output?


grep 'ata' from dmesg (it's on ata4)

[    0.000000] ACPI: SSDT 0x00000000DDE30378 00036D (v01 SataRe SataTabl 00001000 INTL 20120711)
[    0.000000] Memory: 16374176K/16718360K available (5381K kernel code, 909K rwdata, 1712K rodata, 1140K init, 1176K bss, 344184K reserved)
[    0.799859] Write protecting the kernel read-only data: 8192k
[    0.847719] libata version 3.00 loaded.
[    0.902244] ata1: SATA max UDMA/133 abar m2048@0xf7f16000 port 0xf7f16100 irq 27
[    0.902245] ata2: DUMMY
[    0.902246] ata3: SATA max UDMA/133 abar m2048@0xf7f16000 port 0xf7f16200 irq 27
[    0.902248] ata4: SATA max UDMA/133 abar m2048@0xf7f16000 port 0xf7f16280 irq 27
[    0.902251] ata5: SATA max UDMA/133 abar m2048@0xf7f16000 port 0xf7f16300 irq 27
[    0.902254] ata6: SATA max UDMA/133 abar m2048@0xf7f16000 port 0xf7f16380 irq 27
[    0.902845] ata7: SATA max UDMA/133 abar m512@0xf7b00000 port 0xf7b00100 irq 28
[    0.902848] ata8: SATA max UDMA/133 abar m512@0xf7b00000 port 0xf7b00180 irq 28
[    1.220536] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[    1.220545] ata7: SATA link down (SStatus 0 SControl 300)
[    1.220557] ata5: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[    1.220573] ata3: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[    1.220597] ata6: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[    1.220620] ata4: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[    1.221035] ata4.00: ATA-9: M4-CT256M4SSD2, 040H, max UDMA/100
[    1.221054] ata4.00: 500118192 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
[    1.221182] ata3.00: ATA-9: WDC WD30EFRX-68EUZN0, 80.00A80, max UDMA/133
[    1.221183] ata3.00: 5860533168 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
[    1.221483] ata4.00: configured for UDMA/100
[    1.221685] ata3.00: configured for UDMA/133
[    1.226793] ata1.00: ATA-8: SAMSUNG HN-M101MBB, 2AR10001, max UDMA/133
[    1.226794] ata1.00: 1953525168 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
[    1.233054] ata1.00: configured for UDMA/133
[    1.272606] ata5.00: ATA-8: ST9500325ASG, 0006APM2, max UDMA/133
[    1.272608] ata5.00: 976773168 sectors, multi 16: LBA48 NCQ (depth 31/32)
[    1.274900] ata5.00: configured for UDMA/133
[    1.596559] ata6.00: ATA-8: TOSHIBA MK2553GSX, LW005B, max UDMA/100
[    1.596560] ata6.00: 488397168 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
[    1.597550] ata6.00: configured for UDMA/100
[    1.916759] ata8: SATA link down (SStatus 0 SControl 300)
[    2.248735] EXT4-fs (sdc1): mounted filesystem with ordered data mode. Opts: (null)

Offline

#6 2014-11-17 14:39:07

Thijxx
Banned
Registered: 2013-08-24
Posts: 18

Re: [SOLVED] SSD not persistent

mich41 wrote:

This shouldn't be happening. Can you run fsck with the most pedantic error checking options available for your filesystem? What about smartctl -a?

Performed a check without changing anything (for now), are this the options you think are best? force, nochange, verbose

fsck from util-linux 2.25.1
e2fsck 1.42.12 (29-Aug-2014)
Warning!  /dev/sdc1 is mounted.
Warning: skipping journal recovery because doing a read-only filesystem check.
Pass 1: Checking inodes, blocks, and sizes
Deleted inode 31002 has zero dtime.  Fix? no

Inodes that were part of a corrupted orphan linked list found.  Fix? no

Inode 31010 was part of the orphaned inode list.  IGNORED.
Inode 31060 was part of the orphaned inode list.  IGNORED.
Inode 31199 was part of the orphaned inode list.  IGNORED.
Inode 4075151 was part of the orphaned inode list.  IGNORED.
Inode 4075224 was part of the orphaned inode list.  IGNORED.
Inode 4075385 was part of the orphaned inode list.  IGNORED.
Inode 4075637 was part of the orphaned inode list.  IGNORED.
Inode 4075641 was part of the orphaned inode list.  IGNORED.
Inode 4075873 was part of the orphaned inode list.  IGNORED.
Inode 4075874 was part of the orphaned inode list.  IGNORED.
Inode 4075944 was part of the orphaned inode list.  IGNORED.
Inode 4075968 was part of the orphaned inode list.  IGNORED.
Inode 4075973 was part of the orphaned inode list.  IGNORED.
Pass 2: Checking directory structure
Entry 'E575FA3D8C4DFC93DCE2C4BD0E4E6B4B928AE50E' in /home/thijs/.cache/mozilla/firefox/ltoaq0gi.default/cache2/entries (5269454) has deleted/unused inode 5284764.  Clear? no

Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Block bitmap differences:  -(1684521--1684524) -(1685190--1685198) -(2181790--2181798) -(7614052--7614054) -(7615072--7615074) -(7620243--7620250) -(11070148--11070151) -16529433 -(16529439--16529447) -(21100591--21100598) -(21100641--21100648)
Fix? no

Free blocks count wrong (12652279, counted=12643997).
Fix? no

Inode bitmap differences:  -31002 -31010 -31060 -31199 -4075151 -4075224 -4075385 -4075637 -4075641 -(4075873--4075874) -4075944 -4075968 -4075973 -5284764
Fix? no

Free inodes count wrong for group #645 (572, counted=571).
Fix? no

Free inodes count wrong (5515652, counted=5511054).
Fix? no


/dev/sdc1: ********** WARNING: Filesystem still has errors **********


      890492 inodes used (13.90%, out of 6406144)
        2070 non-contiguous files (0.2%)
         365 non-contiguous directories (0.0%)
             # of inodes with ind/dind/tind blocks: 0/0/0
             Extent depth histogram: 869562/388/1
    12947720 blocks used (50.58%, out of 25599999)
           0 bad blocks
           2 large files

      514993 regular files
      339635 directories
           0 character device files
           0 block device files
           2 fifos
        2340 links
       40434 symbolic links (25112 fast symbolic links)
           2 sockets
------------
      897407 files

And smartctl -a

smartctl 6.3 2014-07-26 r3976 [x86_64-linux-3.17.1-1-ARCH] (local build)
Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Crucial/Micron RealSSD m4/C400/P400
Device Model:     M4-CT256M4SSD2
Serial Number:    0000000012530922F762
LU WWN Device Id: 5 00a075 10922f762
Firmware Version: 040H
User Capacity:    256,060,514,304 bytes [256 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
Form Factor:      2.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ACS-2, ATA8-ACS T13/1699-D revision 6
SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Mon Nov 17 15:36:20 2014 CET
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:  (0x84)	Offline data collection activity
					was suspended by an interrupting command from host.
					Auto Offline Data Collection: Enabled.
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: 		(  300) seconds.
Offline data collection
capabilities: 			 (0x7b) SMART execute Offline immediate.
					Auto Offline data collection on/off support.
					Suspend Offline collection upon new
					command.
					Offline surface scan supported.
					Self-test supported.
					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: 	 (  19) minutes.
Conveyance self-test routine
recommended polling time: 	 (   3) 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: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x002f   100   100   050    Pre-fail  Always       -       0
  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       0
  9 Power_On_Hours          0x0032   100   100   001    Old_age   Always       -       4240
 12 Power_Cycle_Count       0x0032   100   100   001    Old_age   Always       -       1010
170 Grown_Failing_Block_Ct  0x0033   100   100   010    Pre-fail  Always       -       0
171 Program_Fail_Count      0x0032   100   100   001    Old_age   Always       -       0
172 Erase_Fail_Count        0x0032   100   100   001    Old_age   Always       -       0
173 Wear_Leveling_Count     0x0033   099   099   010    Pre-fail  Always       -       38
174 Unexpect_Power_Loss_Ct  0x0032   100   100   001    Old_age   Always       -       68
181 Non4k_Aligned_Access    0x0022   100   100   001    Old_age   Always       -       520 386 134
183 SATA_Iface_Downshift    0x0032   100   100   001    Old_age   Always       -       0
184 End-to-End_Error        0x0033   100   100   050    Pre-fail  Always       -       0
187 Reported_Uncorrect      0x0032   100   100   001    Old_age   Always       -       0
188 Command_Timeout         0x0032   100   100   001    Old_age   Always       -       0
189 Factory_Bad_Block_Ct    0x000e   100   100   001    Old_age   Always       -       80
194 Temperature_Celsius     0x0022   100   100   000    Old_age   Always       -       0
195 Hardware_ECC_Recovered  0x003a   100   100   001    Old_age   Always       -       0
196 Reallocated_Event_Count 0x0032   100   100   001    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   100   100   001    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   100   100   001    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x0032   100   100   001    Old_age   Always       -       0
202 Perc_Rated_Life_Used    0x0018   099   099   001    Old_age   Offline      -       1
206 Write_Error_Rate        0x000e   100   100   001    Old_age   Always       -       0

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  Vendor (0xff)       Completed without error       00%      4232         -
# 2  Vendor (0xff)       Completed without error       00%      4219         -
# 3  Vendor (0xff)       Completed without error       00%      1702         -
# 4  Vendor (0xff)       Completed without error       00%      1277         -
# 5  Short offline       Completed without error       00%      1218         -

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
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.

Offline

#7 2014-11-17 21:50:47

defears
Member
Registered: 2010-07-26
Posts: 218

Re: [SOLVED] SSD not persistent

I have an M4 SSD and I had to install new firmware after a certain amount of hours because the drive acted erratic.
http://forum.crucial.com/t5/Crucial-SSD … td-p/80286

Offline

#8 2014-11-18 00:08:12

Pse
Member
Registered: 2008-03-15
Posts: 413

Re: [SOLVED] SSD not persistent

Be sure to update the firmware if an update is available. After doing so, test for a bit. If the problem persists, disable TRIM if you have enabled it for your filesystem (i.e. by setting 'discard' in fstab). Some drives do not handle TRIM commands well (though I can't think of any reasonably recent model with such problem).

Offline

#9 2014-11-18 09:22:38

Thijxx
Banned
Registered: 2013-08-24
Posts: 18

Re: [SOLVED] SSD not persistent

Thanks guys.

I will upgrade the firmware from the current 040H to 070H.
Then I'll just go my way and update this topic in a couple of weeks tops.

[edit]
That didn't take long.. First reboot and I got a configuration of days ago!
Applications missing, directories missing, configs, the works.
This was solved by another reboot, now I have the most recent version of reality again smile

The only sign I got was a 'clean ... blocks' message at startup, like this:

/dev/sda4: clean, 112977/9296096 files, 185427/21217024 blocks

Note that this is an example and not my original message.

Maybe my Grub has some crazy setting..

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-2bddf92c-de9e-4bbc-bec9-5ba848dea11c' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_gpt
        insmod ext2
        set root='hd2,gpt1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd2,gpt1 --hint-efi=hd2,gpt1 --hint-baremetal=ahci2,gpt1  2bddf92c-de9e-4bbc-bec9-5ba848dea11c
        else
          search --no-floppy --fs-uuid --set=root 2bddf92c-de9e-4bbc-bec9-5ba848dea11c
        fi
        echo    'Loading Linux linux ...'
        linux   /boot/vmlinuz-linux root=UUID=2bddf92c-de9e-4bbc-bec9-5ba848dea11c rw  quiet
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initramfs-linux.img
}

--
[edit]

I may have screwed up by migrating from HDD to SSD and not changing the UUID. So I now had two disks with the same UUID. I've changed one with

tuner2fs -U random /dev/sdd1

and now I will do a system upgrade and some tests.

Last edited by Thijxx (2014-11-24 21:33:25)

Offline

#10 2014-11-25 09:49:38

Thijxx
Banned
Registered: 2013-08-24
Posts: 18

Re: [SOLVED] SSD not persistent

I've migrated from HDD to SSD using Gparted earlier. The old disk was not changed when I started to use the new one and so I had two disks with the same UUID. This conflict probably was the main driver behind several problems I had with this installation.

I've fixed it by booting from Live CD and changing the UUID of the old disk:

tuner2fs -U random /dev/sdd1

The upside is that I already ordered a brand-new new SSD which I can now use to run my VM's on.

Offline

Board footer

Powered by FluxBB