LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Comparing SSD and Compact Flash Memories (https://www.linuxquestions.org/questions/linux-newbie-8/comparing-ssd-and-compact-flash-memories-4175535710/)

Dustin Cook 03-04-2015 02:29 AM

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.

fatmac 03-04-2015 02:38 AM

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

Dustin Cook 03-04-2015 03:00 AM

I am using "ext2" filesystem for all partitions except "/boot" which is using "ext4".

Would I be better changing this?

Dustin Cook 03-04-2015 03:13 AM

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?

veerain 03-04-2015 04:20 AM

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.

Dustin Cook 03-04-2015 04:46 AM

Quote:

Originally Posted by veerain (Post 5326657)
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?

onebuck 03-04-2015 09:45 AM

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

suicidaleggroll 03-04-2015 09:55 AM

Quote:

Originally Posted by Dustin Cook (Post 5326631)
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.

fatmac 03-04-2015 12:33 PM

Quote:

Originally Posted by Dustin Cook (Post 5326638)
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.

Dustin Cook 03-06-2015 02:29 AM

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.


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