LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-04-2015, 03:29 AM   #1
Dustin Cook
LQ Newbie
 
Registered: Feb 2015
Posts: 28

Rep: Reputation: Disabled
Comparing SSD and Compact Flash Memories


Hi all,

I have a device which has a Compact Flash card and a SSD. The file system is split so that everything except "/home" is stored on the compact flash card.

On the compact flash I am experiencing partition table corruption due to power loses when writing to the CF card.

One solution to this is to move everything onto the solid state drive, but as this is also flash memory - is the rish of corruption still the same as using the CF card?

Thanks in advance for any replies.
 
Old 03-04-2015, 03:38 AM   #2
fatmac
Senior Member
 
Registered: Sep 2011
Location: Surrey/Hants Border, UK
Distribution: BSD & Linux - As long as they are Lightweight
Posts: 1,500

Rep: Reputation: Disabled
Are you using ext4 filesystems, & if so, have you set noatime as an option in fstab.
(There is also a discard option for use with solid state disks.)
 
Old 03-04-2015, 04:00 AM   #3
Dustin Cook
LQ Newbie
 
Registered: Feb 2015
Posts: 28

Original Poster
Rep: Reputation: Disabled
I am using "ext2" filesystem for all partitions except "/boot" which is using "ext4".

Would I be better changing this?
 
Old 03-04-2015, 04:13 AM   #4
Dustin Cook
LQ Newbie
 
Registered: Feb 2015
Posts: 28

Original Poster
Rep: Reputation: Disabled
I've just had a look at my "/etc/fstab" file from a fresh installation.

The SSD drive is listed as I would expect it:

Code:
/dev/sdb1 /home ext2 defaults,noatime
But the CF card is listed as

Code:
UID-random-string-of-numbers-letters /boot ext4 defaults
UID-random-string-of-numbers-letters /usr ext2 defaults,noatime
UID-random-string-of-numbers-letters / ext2 defaults,noatime
Which I then changed to (what I would have expected to see it as:

Code:
/dev/sda1 /boot ext4 defaults
/dev/sda2 /usr ext2 defaults,noatime
/dev/sda3 / ext2 defaults,noatime
And the device has rebooted and kept my updated settings. Have I made changes here that I should not have?
 
Old 03-04-2015, 05:20 AM   #5
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Compared to CF card SSD is lot better. SSD have faster transfer rates and as well longevity in term of wearing.

Also you should not just rely on journalling File Systems like ext3/4.

You must use a UPS (Uninterruptable Power Supply). Most give clean electric power compared to your utility outlet.
 
Old 03-04-2015, 05:46 AM   #6
Dustin Cook
LQ Newbie
 
Registered: Feb 2015
Posts: 28

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by veerain View Post
Compared to CF card SSD is lot better. SSD have faster transfer rates and as well longevity in term of wearing.

Also you should not just rely on journalling File Systems like ext3/4.

You must use a UPS (Uninterruptable Power Supply). Most give clean electric power compared to your utility outlet.
Is using a UUID something that should be changed?
 
Old 03-04-2015, 10:45 AM   #7
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: Slackware®
Posts: 12,549
Blog Entries: 23

Rep: Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943
Member Response

Hi,

You can use UUID by listing via 'ls -l /dev/disk/by-id' as root. This way you will be using a unique identifier(UUID) for system storage placement in '/etc/fstab'.
 
1 members found this post helpful.
Old 03-04-2015, 10:55 AM   #8
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,260

Rep: Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948
Quote:
Originally Posted by Dustin Cook View Post
I am using "ext2" filesystem for all partitions except "/boot" which is using "ext4".

Would I be better changing this?
Absolutely! Why would you be using ext2? ext2 has no journaling, which means no protection against corruption due to sudden power loss. Change everything to at least ext3, if not ext4.

As for CF vs SSD, SSD is significantly better in both speed and durability.

Last edited by suicidaleggroll; 03-04-2015 at 10:56 AM.
 
1 members found this post helpful.
Old 03-04-2015, 01:33 PM   #9
fatmac
Senior Member
 
Registered: Sep 2011
Location: Surrey/Hants Border, UK
Distribution: BSD & Linux - As long as they are Lightweight
Posts: 1,500

Rep: Reputation: Disabled
Quote:
Originally Posted by Dustin Cook View Post
I've just had a look at my "/etc/fstab" file from a fresh installation.

The SSD drive is listed as I would expect it:

Code:
/dev/sdb1 /home ext2 defaults,noatime
But the CF card is listed as

Code:
UID-random-string-of-numbers-letters /boot ext4 defaults
UID-random-string-of-numbers-letters /usr ext2 defaults,noatime
UID-random-string-of-numbers-letters / ext2 defaults,noatime
Which I then changed to (what I would have expected to see it as:

Code:
/dev/sda1 /boot ext4 defaults
/dev/sda2 /usr ext2 defaults,noatime
/dev/sda3 / ext2 defaults,noatime
And the device has rebooted and kept my updated settings. Have I made changes here that I should not have?
Last first, using /dev in fstab is being deprecated, supposedly, however don't worry as it is perfectly good.

Using UID is advisable, especially with removable disks like external HDD/pendrives as you can pair a disk with a specific mount point on your system & it will always mount on that point, whereas using /dev, it could be mounted anywhere.

Regarding your filesystems, it would be advisable to at least use ext4 on your SSD for safety of your files/data.

System files can be re installed, but your data needs to be restored from backups, should anything happen to your disk.

Hope that helps.
 
1 members found this post helpful.
Old 03-06-2015, 03:29 AM   #10
Dustin Cook
LQ Newbie
 
Registered: Feb 2015
Posts: 28

Original Poster
Rep: Reputation: Disabled
Okay, thanks everyone. I'll have a go at changing the filesystem to ext3 or ext4 and see if that makes a difference.

I will try and make all the partitions ext3 both on the SSD and CF.
 
  


Reply

Tags
cf, memory, ssd


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Write Script to partition and flash the compact flash using card reader in linux thirun Linux - Software 4 01-17-2014 06:22 AM
Filesystem for flash memories King_DuckZ Linux - Software 7 06-03-2011 05:38 AM
How do you duplicate a 512 Meg Compact flash to a 1 GB compact flash using dd??? allen00860 Linux - Newbie 5 05-23-2009 09:48 PM
Compact Flash for disk-less PC?? jackstrat Linux - General 2 01-17-2008 01:27 PM
Compact flash mngmd Linux - Hardware 2 11-18-2005 10:57 PM


All times are GMT -5. The time now is 10:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration