LinuxQuestions.org

LinuxQuestions.org (http://www.linuxquestions.org/questions/index.php)
-   Linux - Software (http://www.linuxquestions.org/questions/forumdisplay.php?f=2)
-   -   Filesystem for SSD drive (http://www.linuxquestions.org/questions/showthread.php?t=751008)

Changes 08-28-2009 10:28 PM

Filesystem for SSD drive
 
I just bought a netbook that comes with a standard hard drive (EeePC 1005HA-M). My plan is to replace the HD with a SSD to have better battery life and resistance to shock, but it'll be some time before I buy it and they deliver it to me, so I'm using it with the original HD in the meantime.

On said HD I've installed CrunchBang Linux, after repartitioning everything in ext4.
The easiest way to convert to SSD without having to waste time reinstalling everything is, if I'm not mistaken, simply to hook up both the drive and the SSD to another computer and DD the former's system partition to the latter's. However, this would mean having ext4 partitions on a SSD, and I've heard it said that you should only use ext2 on flash drives in order to preserve it (since they last a limited number of write cycles).

Is this true? Do I have to redo everything in ext2, or can I just leave it as it is?

Thanks.

jschiwal 08-28-2009 10:37 PM

You don't want to use a journaling filesystem. Also use the "noatime" mount option to disable updating the access timestamp every time you read a file.

You can simply partition the new drive and copy all of the files over. If you already created an image backup, such as onto an external drive, you could mount the partitions on it using losetup & mount, and copy files from the image. Don't bother copying /proc, /sys, /dev/ or /tmp. The first two are psuedo filesystems. /dev/ is created when you boot, and the files in /tmp aren't important.

Look at the tar info manual. It has an example piping tar'ed files to copy one filesystem to another. Using "cp -a" will work as well but using tar might work out better going from computer to computer via rsh or ssh. There is also rsync.
Another option is to put one of the drives in an enclosure, then partition & format it. Next copy the files.
You could backup the old drive (HD), replace it with the new drive (SSD), partition and format the SSD drive and finally restore the files from the backup.

You might want to use "df -h" on each partition to see how much free space you have. Maybe you want to make adjustments to the sizes of your partitions,

i92guboj 08-29-2009 12:16 AM

Quote:

Originally Posted by Changes (Post 3661548)
The easiest way to convert to SSD without having to waste time reinstalling everything is, if I'm not mistaken, simply to hook up both the drive and the SSD to another computer and DD the former's system partition to the latter's.

I'd rather use cp -a, rsync, or whatever fits you. Format the partition the way you want, copy everything preserving permissions, and then just reinstall the bootloader.

Quote:

However, this would mean having ext4 partitions on a SSD, and I've heard it said that you should only use ext2 on flash drives in order to preserve it (since they last a limited number of write cycles).
If you have a recent kernel (at least 2.6.30_rc1 or later), I'd give nilfs a try. It's supposed to improve the handling of this kind of devices.

choogendyk 08-29-2009 09:04 AM

Quote:

Originally Posted by Changes (Post 3661548)
I've heard it said that you should only use ext2 on flash drives in order to preserve it (since they last a limited number of write cycles).

Is this true?

Quote:

Originally Posted by jschiwal (Post 3661552)
You don't want to use a journaling filesystem. Also use the "noatime" mount option to disable updating the access timestamp every time you read a file.

While it may once have been an issue, the write life cycle concern with SSD has become FUD. Apple has been selling the MacBook Air since January 2008, which is their ultra-thin laptop with an SSD. Going a step further into intense use, Sun introduced it's 7000 series storage systems last year and has been beating out NetApp in price/performance in part by using ZFS and putting ZFS's write intent log on SSD's.

I found an in depth analysis of the issue here http://www.storagesearch.com/ssdmyths-endurance.html. About halfway down that story, he does a calculation for a 64G SSD with a write endurance of 2 million writes. Assuming a rogue data logger putting blocks of data to the SSD at rate of 80MB/sec non-stop, he comes up with a life for the SSD of 51 years. The numbers have improved over time and also improve with size of SSD. And, I mean, who is going to let a rogue data logger run non-stop for 51 years?

That article was dated 2007.

Changes 08-30-2009 08:49 AM

Hmm. Based on Choogendyk's post, it would seem I don't need to bother with a non-journaling filesystem, and I can just do a hard copy of everything on the SSD.
How much data does a journaling filesystem write during normal operation, anyway?

Also, if I understand correctly, journaling basically means the partition doesn't need a filesystem check everytime the computer gets switched off without everything having been properly unmounted. I assume there's more to it than simply this?

Edit: another question that has just come to me - should I disable caching from Firefox? People have told me I should, but if 80 M/s nonstop lasts 51 years, I don't think a 50MB browsing cache can make much of a difference.

jschiwal 09-02-2009 10:18 AM

The ssd drive in a netbook may not be the more expensive type that may be better in this regard. Also, the writes may be distributed across the entire drive and not for example a swap partition. IMHO, at least mount any partition with the `noatime' option.


All times are GMT -5. The time now is 08:39 AM.