Slow SSD, part 2: Protecting my Partitions
The beautiful spring weather was denied me by my flaky computer. I would be working away, notice that I needed a new package, and then get an
error: read only file system
failure message when trying it. Once, I even rebooted into an (initrd) prompt telling me to fsck my root partition. Not good…not happy…worried about my system blowing out the magic smoke and getting stuck in the muddy trenches of computer recovery.
To maximize the safety of my system in the short term (after adding the fsck check I described in part one), I decided I might need to reconfigure the particle phase inverter…uh…mount options on my partitions. The first thing to do is to make them use the data_journal option, so that data is written to the journal before being re-written in place in the file-system. Since I’m running SSDs (and I don’t know if the SSDs are going bad or not) this seemed like it would probably be a safe enough thing to do.
First we inject bosons into the nacelle plasma emitter…just turn on the data_journal flag using tune2fs:
$ sudo tune2fs -o data_journal /dev/md1 $ sudo tune2fs -o data_journal /dev/mapper/lv_root $ sudo tune2fs -o data_journal /dev/mapper/lv_var
When I did this, I updated my /etc/fstab file. It’s a good idea to remove any mount option options that would conflict, like: data_journal or data_writeback. Some distros add these options at install time. It makes rebooting a challenge, because it will block the partition from actually mounting. Just remove any data_X mount options and they will be detected on mount.
While I was in the Jefferies tube…fstab, I added the synchronous options to the impulse engines. This option makes your process wait for writing to the disk to finish: sync,dirsync. These are not performance options…you don’t want to game with them, but you can get work done with them. Now my fstab looks more like:
/dev/md0 /boot ext4 noatime,sync,dirsync 0 0 /dev/md1 / ext4 noatime,sync,dirsync 0 0 /dev/md3 /var ext4 noatime,sync,dirsync 0 0
There were other entries, but unrelated.
__ /| / \ \ \ }]::)==-{) / / \ / \|__
And I did an update-grub2, and found it definitely went more slowly. But did it help? I thought it did, until I saw hull integrity drop to 30%…more in part 3.
Leave a Reply