![]() |
Re: SSD drives under Linux
Zenous - normally an SSD drive will be recognized just as any other disk.
Try running gparted to create/view the partition table. or ls -l /dev/disk/by-id to see the recognized disks. ---------- Post added at 06:32 AM ---------- Previous post was at 06:15 AM ---------- Quote:
Quote:
No synic, "discard" does not imply any "data=..." journal policy. |
Re: SSD drives under Linux
Quote:
P.S rc5 is out ;) Code:
[leigh@main_pc ~]$ uname -r |
Re: SSD drives under Linux - efficient partioning
Quote:
The PROs for swap on SSD is that it will have about the best performance possible in the bad situation when you are low on DRAM, but it still will be slow. The CONs are that you are wearing your SSD drive. As a general philosophy I will suggest that if your (nonserver) system swaps often it's time to buy more DRAM. Swaping performance will be poor in any case, so it's reasonable to put swap on a non-SSD volume (if you have one). We probably don't care much about optimizing I/O if we are swapping memory pages. On F15 /var/log and /tmp can be made from tmpfs with fstab lines like Quote:
/usr contains libraries and binaries where you want a fast disk - so this belongs on SSD. Quote:
Quote:
/tmp has many trivially small files and also acts as temporary store for browser downloads (.pdfs, .jpg, and even streaming vids). Altogether these rarely add up to more than a 100MB (ymmv). Since the tmpfs is dram, then /tmp is deleted/cleaned at every reboot. You could also use the "size=10%" tmpfs option to prevent it from getting too large. It's your choice A/ limit /tmp on tmpfs size and accept possible ".tmp is full" errors, B/ let /tmp on tmpfs fill (rare) causing potential swapping and potential "out of swap" OOM kills, C/ leave /tmp on SSD and accept slower speed (than DRAM) and more SSD wear, but little chance of filling. If you are looking for speed you'd better buy some DRAM at the first signs of swapping. ---------- Post added at 10:40 AM ---------- Previous post was at 09:00 AM ---------- Quote:
You cannot set the journal mode (the data=... parameter) for an ext3 or ext4 file system once it is mounted by using a remount option. You actually have to umount and then mount. In 2.6.35... kernels this prohibition was ignored if the filesys is mounted read-only. On 3.0 kernels this restriction is enforced causing the remount to fail. So if you put a "data=writeback" in fstab for "/" then any remount (that picks up the fstab params) will fail with a 3.0 kernel. Normally during boot the initramfs mounts root read-only and with any parameters from the kernel command line. Then after the pivot a command like: mount -o remount,rw / occurs. But this form of the command picks up the fstab parameters. If fstab has "data=..." for root and the kernel is 3.0 then the remount fails and root remains read-only. This causes many things to fail. The correct solutionis to specify the root file system journal mode in the /boot/grub/grub.conf file on the kernel line, by appending: kernel .... rootflags=data=writeback and removing any "data=..." from the fstab for the root file system only. === SYNOPSIS: DO NOT use "data=..." options in /etc/fstab for the root "/" file system. INSTEAD use "rootflags=data=..." appended to kernel line in grub.conf |
Re: SSD drives under Linux
Quote:
lrwxrwxrwx. 1 root root 9 Jun 30 10:49 ata-OCZ-VERTEX2_OCZ-1N916OJ8CDPH29KU -> ../../sda lrwxrwxrwx. 1 root root 10 Jun 30 10:49 ata-OCZ-VERTEX2_OCZ-1N916OJ8CDPH29KU-part1 -> ../../sda1 lrwxrwxrwx. 1 root root 10 Jun 30 10:49 dm-name-live-osimg-min -> ../../dm-1 lrwxrwxrwx. 1 root root 10 Jun 30 10:49 dm-name-live-rw -> ../../dm-0 lrwxrwxrwx. 1 root root 9 Jun 30 10:49 scsi-SATA_OCZ-VERTEX2_OCZ-1N916OJ8CDPH29KU -> ../../sda lrwxrwxrwx. 1 root root 10 Jun 30 10:49 scsi-SATA_OCZ-VERTEX2_OCZ-1N916OJ8CDPH29KU-part1 -> ../../sda1 lrwxrwxrwx. 1 root root 9 Jun 30 10:49 usb-_USB_FLASH_DRIVE_07B30507078257CF-0:0 -> ../../sdb lrwxrwxrwx. 1 root root 10 Jun 30 10:49 usb-_USB_FLASH_DRIVE_07B30507078257CF-0:0-part1 -> ../../sdb1 lrwxrwxrwx. 1 root root 9 Jun 30 10:49 wwn-0x5e83a97f925f522f -> ../../sda lrwxrwxrwx. 1 root root 10 Jun 30 10:49 wwn-0x5e83a97f925f522f-part1 -> ../../sda1 btw do i have to set the sata mode to ide? currently it set as ahci how do i enable ahci for ssd? |
Re: SSD drives under Linux
Quote:
If you change from AHCI to no-AHCI the disk contents may become inaccessible -similar to what you have shown. All SSDs I'm aware of support AHCI, some require AHCI to perform firmware updates and other operations. I suggest you set AHCI mod in BIOS the nuse gparte or similar to re-format, set a new partition table, etc. |
Re: SSD drives under Linux
Quote:
tq |
Re: SSD drives under Linux - efficient partioning
Quote:
Code:
none /tmp tmpfs defaults 0 0Code:
tmpfs /tmp tmpfs defaults 0 0Code:
none /tmp tmpfs defaults 0 0Is specifying Code:
tmpfs /var/log tmpfs defaults 0 0 |
Re: SSD drives under Linux
Putting /var/log on tmpfs will use up your memory, and can cause a deadlock when it fills due to some error, or external attack (on something that logs attempted intrusions), or even bad network connections.
The next problem is that if you are forced to boot due to something, you have no records for what it was. This can happen due to bad updates that cause X to fail - It can generate a LOT of log entries as things go south. Without the logs you won't be able to fix it. |
Re: SSD drives under Linux
Please read post #5, 8, 18, 19. You have now repeatedly brought up the same off-topic comment in a sticky thread about configuration for SSDs.
Quote:
Quote:
Quote:
I agree that pushing data onto tmpfs is not ideal for every application, as it comes with at the OBVIOUS cost of losing data at umount and using some memory. But you seem to ignore the main issue that writing to SSD wears out a very expensive resource early. Using DRAM for /tmp and /var/log (and /var/run and /var/tmp) is a not unreasonable approach to avoiding excessive SSD writes. Google will show you that many sources (including fedora developers and kernel developers) have addressed this, including adding SEL contexts to tmpfs. I'll also suggest you study the F15 mount defaults which use tmpfs for many, admittedly tiny directories ... Quote:
If you can propose a BETTER way to avoid SSD writes please post. If you just want to raise the same tired, tangential objection for a 4th time - that tmpfs uses memory, memory use can cause swap, swap overflow causes OOM, don't. Running out of swap is always a possibility; it's not directly relevant to SSD, go start another thread. |
Re: SSD drives under Linux
Steve, I've seen it deadlock. Granted not every time. Guess what happens to Fedora 15 if you don't have enough memory? It deadlocks.
I've also had X totally lock to the point that you cannot change virtual terminals. Especially when the configuration is totally hosed. The only way to recover is to reboot. And if the logs are on tmpfs, they are gone. |
Re: SSD drives under Linux
Thanks for this information stevea; very useful and interesting. I just have one question (for now):
Quote:
Thanks! |
Re: SSD drives under Linux
Quote:
It's my opinion that LVM is not a good choice for most end-users. It makes sense on a server with multiple disks. ---------- Post added at 03:15 AM ---------- Previous post was at 02:42 AM ---------- Quote:
Report it on LKML - it is not specific to SSD drives and does not belong in this thread. Quote:
|
Re: SSD drives under Linux
Yes. And that last is also what you called a kernel bug.
The system deadlocks during boot because there ISN'T enough memory. Adding a swap area early would usually cure it, but systemd can't seem to do that before killing the system. IT doesn't matter whether you have SSD or not. putting logs in tmpfs is the problem. Whether it is an X bug or not, a reboot looses the logs you need to identify if it IS an X bug. And also yes, users without quotas can kill the the system, though it can be quite tricky. |
Re: SSD drives under Linux
Excellent guide, stevea. If I ever do make the jump to an SSD, this is the guide I will use.
|
Re: SSD drives under Linux
if you want to reduce I/O you can also put chromium/opera cache into ram (put it into fstab):
Code:
cache-chromium /home/user/.cache/chromium tmpfs defaults,noatime,mode=1777 0 0 |
| All times are GMT +1. The time now is 10:47 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.