Talk:How to: Reduce Disk Writes to Prolong the Life of your Flash Drive
From EasyPeasy Wiki
Contents |
[edit] notail option and reiser
regarding the hint
Use the "noatime,nodiratime,notail" options for any of your reiserfs partitions in /etc/fstab. This also gives slightly faster filesystem performance.
I do not know if it really makes sense to use the notail option to reduce flash wearout. From what I know the block size of the filesystem is not necessarily the blocksize of the flash memory. I have a good reason not to use the notail option: Small files use less memory on reiserfs without notail compared to ext2. This is especially the reason for thumbnail pictures and icons. I did a small test with two filesystems, one ext2 and one reiser (with no notail option): Both 2GB of size. After unpacking gentoo stage 3 and a gentoo snapshot, the space used is:
/dev/loop/0 2096060 626016 1470044 30% /home/zut/eeepc/mnt_reiser /dev/loop/1 2063184 1108252 850128 57% /home/zut/eeepc/mnt_ext2
The files are mostly small, for a binary system the difference is likely to be smaller, but a difference will be there. I think the notail option would destroy the benefit without prolonging flash life. --zut, 2008-01-29
[edit] Idea
- Of course, you can set up your partitions such that / is on the internal flash drive, and /home, where most of your changing files will be, is on an SD card. That way, you wear out the SD card, which can be easily replaced. But you should still do all of the above, except that you may wish to keep things that will be saved in your home area, such as your bash history and browser cache.
[edit] /etc/mtab and fuse
In step 13 from Debian site it says that you can symlink /proc/mounts to /etc/mtab (rm /etc/mtab; ln -s /proc/mounts /etc/mtab). Done that but when tried to mount something through fuse (avfs, ntfs-3g) an error ocurred: "Acording to mtab /dev/sdd5 is already mounted on /mnt", which wasn't true. After leaving /etc/mtab like a normal file (no symlink: rm /etc/mtab; cp /proc/mounts /etc/mtab) it worked.
I tried it with kernels 2.6.24-2-generic (Eee custom kernel), 2.6.22-14-generic (Ubuntu default) and with libfuse2-2.7.0-1ubuntu5. This is commented in Mount /dev/hda1 --200.87.221.216 04:17, 25 April 2008 (UTC)
[edit] Ubuntu EEE image
Is this already included in the Ubuntu EEE image or is this a further tweak I should make? It should probably be noted in the article.
[edit] What about Rhythmbox?
When I use my eee 900 in ipod mode (suspend disabled, lid closed, and Rhythmbox playing) the disk access frequency is about every two seconds (according to the hdd led and the system monitor applet). This seems pretty ridiculous when I have a gig of ram just waiting to be filled up with an upcoming song cache (this is how a hdd based ipod works). Does anyone have any ideas how to fix this other than creating a ramdisk or moving songs to an SD card? Perhaps a Rhythmbox plugin for this..?
[edit] Updated
I've gone ahead and cleaned up this file to make it more user friendly as there wasn't much instruction included previously, I've also remove the notail option from the reiser fs article, and included the commands from the Debian Administration article directly.
[edit] Un-needed Warning
I disagree with the warning in the page. This information is very usefull for any machine that uses flash disks, and there ere a lot of new machins with flash. Just the page or the warning could be re-written with that in mind.

