You are not logged in.
Hi Arch community,
I'm in the process of adding a second disk to my desktop system. I've been using a single 128 GB SSD until now, but I wanted more space so I added a 3 TB HDD and I guess I'm wondering how to integrate it.
[sam@Sam ~]$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 111.8G 0 disk
├─sda1 8:1 0 243M 0 part /boot
├─sda2 8:2 0 7.4G 0 part [SWAP]
├─sda3 8:3 0 19.8G 0 part /
└─sda4 8:4 0 84.4G 0 part /home
sdb 8:16 0 2.7T 0 disk
Right now my home directory is 78% full, and root is 63% full. The first ideas that seemed most obvious to me were:
1) Put /home on the HDD, and extend root to the rest of the SSD.
2) Create a single partition on the HDD, and mount it somewhere, say /mnt/sdb1. Leave /home on the SSD; selectively move folders from home (e.g. Pictures) to the new disk, then symlink to them from their old locations.
The SSD wiki suggests moving /var to the HDD, so I might do that as well (though I wonder if this might affect performance?).
There also seem to be some other options which I consider more esoteric (at least, they would be more work to set up):
3) Use LVM. Seems complicated, but it looks like you can make the two disks appear as a single one and do other funky stuff.
4) Move everything to the HDD and use the SSD as a cache (EnhanceIO or similar).
I'm sure there are other options that I'm not aware of.
I know there is no right or best answer, but I felt I needed some advice or recommendations and couldn't find any when I searched around. I would like to know what other people are doing. Share your thoughts.
Thanks for your help!
Offline
First option would be the easiest, but then it will waste a lot of space on your SSD as well.
Moving to "Newbie Corner".
Offline
And so, to make better use of the SSD, what would you recommend?
Offline
I would have suggested LVM, but I don't know how it will perform with one SSD and one HDD. Maybe wait for others to chime in with their opinions.
Offline
I do option #2 quite happily but it's your computer.
If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet.
Niels Bohr
Offline
I would copy home to the hard drive and mount as home and resize root. or mount folders within the harddrive to folders within home like pics music storage etc... but resize home and root in this case.
your ssd should be used for system for faster system response storages like mentioned before dont matter too much. i have a 10krpm HD and its fast enough for for home and storage.
Last edited by bleach (2016-01-17 07:42:20)
Offline
I'd go with option 1, in combination with LVM on the HDD, so you can later tinker around with the layout if you feel that 1 partition for 3TB is not your thing.
But definitely not option 3 (combined LVM over SSD and HDD), since you'd like to put system files on the SSD for faster start-up of... well, lots of things (applications, booting, system library loading, ...)
Offline
/etc/fstab
# /dev/sda1 (120GB SSD)
UUID=blah-blah / ext4 rw,relatime,data=ordered 0 1
# /dev/sdb1 (1TB HDD 7200rpm)
UUID=blah-blah /home ext4 rw,relatime,data=ordered 0 2
# /dev/sdc1 (1TB HDD 7200rpm)
UUID=blah-blah /home/me/Music ext4 rw,relatime,data=ordered 0 2
# /dev/sdc2
UUID=blah-blah /home/me/Videos ext4 rw,relatime,data=ordered 0 2
# /dev/sdd1 (2TB HDD 7200rpm)
UUID=blah-blah /mnt/d1rootbkp ext4 rw,relatime,data=ordered 0 2
# /dev/sdd2
UUID=blah-blah /mnt/d2homebkp ext4 rw,relatime,data=ordered 0 2
there's probably a lot better ways to do it, but this works for me....(no swap because 32gb ram)
∞ hard times make the strong, the strong make good times, good times make the weak, the weak make hard times ∞
Offline
From what I can read from your OP you just want to free up some space, keeping the ssd do what it does best. My suggestion is to go for option one or two.
This is just my humble opinion (my newbie powers prevent me from actually know these things): The power of the ssd is really found in the response-time. Regular hdd needs to physical move the read/wlite-heads to be able to do or get what you want. So the power of the ssd is in the end what finally wears it out: A whole lot of really aggressive reads and writes!! The recommendations of moving the /var to the hdd, is to prevent some wearing. It also contains the cache from pacman, holding the *.tar.xz files for your installed system, taking up space.
I use ssd myself, and have done so for a couple of years now. I have the whole system on the ssd, even the home and var folder. From what I can understand from reading this forum, and other, is that "ordinary" users shouldn't think so much about wearing anymore. Your new hdd could actually die before your ssd, even with pretty aggressive use. This is an old article describing some numbers on the ssd.
Last edited by olegabrielz (2016-01-17 14:33:58)
Be aware of my Newbie Powers
Offline
I have a similar setup on my workstation, small SSD and larger HDD.
4 partitions on ssd
-EFI (500 M)
-boot (200 M)
-root (100 G)
-lxc (19G)
several on hdd
-cache (8 G)
-chroot1 (10 G)
-chroot2 (10 G)
-chroot3 (10 G)
-data (rest of HDD)
-cache on the HDD is mounted to /var/cache and I have a bind mount to put /var/log on there too
/var/cache/log /var/log none rw,bind 0 0
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
I would use rsync to copy everything from /home to a new partition on the HDD. I don't know if you have any games, but I would use the old /home for games, or extend your /.
This will, however, make things feel more sluggish. I would keep .local, .cache, and .config on the SSD. I use btrfs and have these in subvolumes in a volume that takes up the first 50GiB of my fastest drives. Alternatively, you could use Bcache. It's super easy to set up and fairly effective. I have an SSD and an HDD in my laptop. the entire HDD block sits ontop of Bcache. It makes things much faster. That, actually, would be my #1 suggestion.
Offline
I use option #2. This way I can also put anything I want to share between distros on the same machine (scripts, for example) in the data partition. I also share the data partition to my other machines with NFS, and regularly copy important files from my root and home to the data partition as a backup.
Your swap partition is also probably much larger than you need.
Offline
Thanks for your inputs. I enjoyed reading your comments. Ultimately, I think LVM is cool. It seems to be able to handle anything you could want to do, including using part of the SSD as cache for the HDD (and you can still decide what goes on the SSD and what goes on the HDD). But for simplicity, I am going to do 2) (because I don't want to redo everything, which I will probably regret some time down the road when I have a lot more data to deal with). I will, however, reduce the size of /home after moving some stuff out of it and then use part of the SSD for Bcache - this seems like a logical way to get better use out of the SSD. As for /var, I think that @olegabrielz is right that it isn't really necessary to move it because SSD wear isn't really an issue (for me anyways). So, it's staying for now, but I may have to rethink things again if root continues to fill up.
The thing I am worrying about now is that I think my SSD is using MBR and not GPT (how can I tell?) and I don't know if I should convert it or if resizing my /home partition will be a problem. So are the adventures of using Linux. Wish me luck!
Offline
The thing I am worrying about now is that I think my SSD is using MBR and not GPT (how can I tell?) and I don't know if I should convert it or if resizing my /home partition will be a problem. So are the adventures of using Linux. Wish me luck!
To tell if you using GPT or MBR, try the following command:
# fdisk -l /dev/sd<X> | grep 'Disklabel type'
Also, in case you don't know already, converting from MBR to GPT or vice-versa will destroy all data on your disk.
Offline
Also, in case you don't know already, converting from MBR to GPT or vice-versa will destroy all data on your disk.
Wat? You mean MIGHT/COULD?
Offline
No, I thought it did. But apparently, the conversion can be done safely! I didn't know there were ways to do so safely. But AFAIK, simply running
mklabel gpt
within the parted shell does lead to data loss.
Thanks for pointing it out.
Offline
I think a key for the conversion to be possible is that, there are enough "unused" spaces at the beginning and the end of the drive, since MBR needs only LBA 0, while GPT needs LBA 0-33 (34 sectors) and the 33 sectors at the end for the backup GPT.
Offline
Yes, that's what I read here: https://wiki.archlinux.org/index.php/GU … MBR_to_GPT
Offline
I do #2, mounting my HD at /mnt/data and using bind mounts instead of symlinks for all of the directories that live on my HD {documents,downloads,isos,pictures,videos,vms,etc..}
I like #2 because all of your ~/.config and ~/.cache files are stilled stored on /home on the SSD, meaning that applications are launched faster if they're not already cached. I don't really mind if my 90 minute video in ~/videos/ takes a tenth of a second longer to start playing.
Offline
I do #2, mounting my HD at /mnt/data and using bind mounts instead of symlinks for all of the directories that live on my HD {documents,downloads,isos,pictures,videos,vms,etc..}
I like #2 because all of your ~/.config and ~/.cache files are stilled stored on /home on the SSD, meaning that applications are launched faster if they're not already cached. I don't really mind if my 90 minute video in ~/videos/ takes a tenth of a second longer to start playing.
I didn't see that in #2 but would /home/user then be on the SSD and mount the rest of the non-dot folders in it from the HDD?
Last edited by WFV (2016-01-23 07:54:46)
∞ hard times make the strong, the strong make good times, good times make the weak, the weak make hard times ∞
Offline
slithery wrote:I do #2, mounting my HD at /mnt/data and using bind mounts instead of symlinks for all of the directories that live on my HD {documents,downloads,isos,pictures,videos,vms,etc..}
I like #2 because all of your ~/.config and ~/.cache files are stilled stored on /home on the SSD, meaning that applications are launched faster if they're not already cached. I don't really mind if my 90 minute video in ~/videos/ takes a tenth of a second longer to start playing.
I didn't see that in #2 but would /home/user then be on the SSD and mount the rest of the non-dot folders in it from the HDD?
Correct.
Offline