[SOLVED] Partitioning and Using SSD with Slackware
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm assembling a new server/workstation. It has a 60G solid state drive (SSD) that I would like to efficiently partition and configure. Assuming that my subscription delivers 14.1 soon I'll install that; otherwise 14.0.
Other than /boot, what partitions should I place on this drive? Are there tweaks or tuning that I should do to optimize its use with Slackware?
Suggestions and recommendations appreciated as I've not before used a SSD.
I don't use a separate /boot, I think it is unnecessary. You should in any case put the /-partition on the SSD, using a filesystem that supports the TRIM-feature, for example ext4, jfs or btrfs. After the install you should add the discard option in /etc/fstab to those partitions residing on the SSD to activate TRIM on them.
I also prefer to have the swap partition on the SSD, but opinions on that differ between users.
You may want to put your data partition (many people use /home for that, I have a separate /data and keep /home in the root-filesystem) on a mechanical disk, since usually storage space is on such partitions more important than speed.
One important thing: Don't use cfdisk to partition the disk. For some unknown reason cfdisk still creates the first partition starting at sector 63, which would misalign the partition with the physical layout of the SSD. Better use plain fdisk.
You can put swap partitions on both SSD and HDD with different priorities. That's what they're meant for.
With a 60 GB SSD I would not complicate things too much and stay with a single '/' using ext4. Performance-wise on a SSD the simplest filesystem with the least overhead is the fastest.
If you're building a new computer anyway, I would rather recommend a 240+ GB SSD, because it is definitely worth it. If you're on a budget, then cut back the (currently expensive) SDRAM. While on a HDD-powered system more DRAM buffer cache means a way faster system, with a SSD you won't notice that much difference.
I'd use the /(root) for the SSD since the /(root) partition is rarely changed, and /boot might do well on it also. /usr, /root(admin), /home, /var, /tmp, and /swap should be on the HDD due to how much they'll be in use.
Wearing SSDs out massively with having things like /var on it is a thing from the past with modern SSDs and moving that is nothing that should be considered solely for that reason anymore. What would be the point of fast storage if you don't use it for the things that are the bottleneck?
I'd use the /(root) for the SSD since the /(root) partition is rarely changed, and /boot might do well on it also. /usr, /root(admin), /home, /var, /tmp, and /swap should be on the HDD due to how much they'll be in use.
Actually to get the most performance benefit out of a SSD you want to have the most used files on it - and of course swap.
Yes, you will wear the SSD, but that's the point of having one. Otherwise you could just save the money and leave it on the shelf in the store...
One important thing: Don't use cfdisk to partition the disk. For some unknown reason cfdisk still creates the first partition starting at sector 63, which would misalign the partition with the physical layout of the SSD. Better use plain fdisk.
:|
Code:
Partition Table for /dev/sda
First Last
# Type Sector Sector Offset Length Filesystem Type (ID) Flag
-- ------- ----------- ----------- ------ ----------- -------------------- ----
1 Primary 0 7807589 63 7807590 Linux swap (82) None
2 Primary 7807590 31246424* 0 23438835*Linux (83) Boot
3 Primary 31246425* 54685259 0 23438835*Linux (83) None
4 Primary 54685260 125045423* 0 70360164*Linux (83) None
What are the implications, exactly?
Also, I have had problems in other distros with having /boot in its own partition, so I didn't attempt it with Slackware
IF this is newer system and you intend to use UEFI firmware, you will of course need to create your (GPT) partitions using gdisk of cgdisk and set first partition as EFI type EF00. This is recommended to be about 200MB which will hold several kernels.
John
Thanks, everyone. I need to learn about TRIM and consider all the good information you've provided.
The hardware is a bit more than a year old; there's a 750G hard drive in addition to the 60G SSD (which was pricey at the time). Since I'm the only user of the system absolute speed is not a concern; the statistical and spatial models I run do so primarily in memory.
For the past decade or so I've set 10 partitions so access is quicker and fsck runs more quickly. That's a personal preference and I realize that we all have different preferences for organizing hard drives and our data.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.