1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Options for quicker HD access?

Discussion in 'Linux & Open Source' started by FatRakoon, Oct 26, 2018.

  1. FatRakoon

    Sgarrista

    Joined: Oct 18, 2002

    Posts: 9,890

    Location: Behind you... Naked!

    Right, I have a bad habit of waffling so I wil try to keep this to a minimum.

    Please trust me when I say that I have typed this out a couple of times now and so I decided to just give the facts...

    My Main Linux Laptop is an ASUS ROG and I have taken the DVD Out, and so this has allowed me to have 3 Hard Disks in it.

    my Drives are :-

    250GB SSD = / and 8GB Swap
    2TB = /home
    2TB = /mnt/etc

    I would love to get software RAID to make the 2x2TB into a single 4TB /home, but for some reason, Im kind of lost on that with newer distros, and while I have setup my main Linux Desktop with LVM, it does not help with the speed of the disk access so its useless to me.


    See? Im still waffling on...

    What can I do to make things load up faster?

    Can I setup Software RAID with these 2 HDs AFTER I have installed Linux ( My current distro of choice is Mint Cinnamon as I seem to have taken to it with mint 19 )
     
  2. SMN

    Wise Guy

    Joined: Nov 2, 2008

    Posts: 2,391

    Location: The ether

    Yep. You'd need to blat the disks though, so make sure you dont have any sensitive data on them (i.e. data you want to keep).

    There are a tonne of guides online, but the generally process to get them into software raid would be using the 'mdadm' command:
    mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdc1 /dev/sdd1

    (where /dev/sdc and /dev/sdd are your actually hard disks. You can view these using fdisk -l, i believe).

    --level=1 means RAID1, so with 2x2TB in RAID1 you'd have around 2TB (just under) of usable storage, but should have some speed benefits. Level 0 would span across both disks, but you'd have no resiliency or perf benefits.

    After this command you'd need to put something on your new volume (/dev/md0). I use LVM, so you'd need to create a Physical Volume, then Volume Groups, then Logical Volumes.

    I wrote a guide here https://www.everybodyhertz.co.uk/rhce-lvm-modification/ but its a bit detailed. This is probably a better intro: https://www.howtoforge.com/linux_lvm

    You essentially would do something like:
    * pvcreate /dev/md0
    * vgcreate /dev/md0 <options>
    * lvcreate 200GB vg-name lv-name

    (Again, off the top of my head i'm not sure on the options).

    Once you have your logical volumes created (run the command 'lvs' for logical volumes, 'vgs' to view volume groups, and 'pvs' to view physical volumes) you can then create file systems on them (mkfs.ext4 /dev/vg-name/lv-name), and mount them (i recommend using UUID in the /etc/fstab file).

    Once you've got it working, you'll love it.
     
  3. Buffalo2102

    Hitman

    Joined: Jun 9, 2004

    Posts: 607

    If you just want to make 2 x 2TB look like 1 x 4TB, you could just use btrfs.

    I use Debian but this is the same on Ubuntu and other Debian-based distros;

    1. Install btrfs-tools - apt-get install btrfs-tools
    2. With clean disks, just create btrfs file systems on the 2 x 2TB disks - mkfs.btrfs /dev/sdb /dev/sdc
    3. Mount the volume - mount /dev/sdb /mnt
    4. Add it to fstab if you want it to mount on boot - /dev/sdb /mnt btrfs defaults 0 1

    That's it - simple.
     
  4. DeeJay-Mo

    Hitman

    Joined: Jul 20, 2005

    Posts: 551

    Location: the dirty souf

    RAID 1 in a laptop doesn't seem like a great idea to me. If all you want is a single 4TB volume, I would use LVM. If speed is an issue, get your wallet out and pony up for SSDs. How come you need 4TB of local storage anyway? Editing a 4K feature film?
     
  5. FatRakoon

    Sgarrista

    Joined: Oct 18, 2002

    Posts: 9,890

    Location: Behind you... Naked!

    I have recently been toying about with LVM on the test Linux PC and I have learned a great deal, but speed on the Laptop is fairly horrid for some reason?

    Get my wallet out? LOL I have 13 PCs and 5 Laptops, all fairly high end and they all have SSDs as their boot drives with the exception of my main 3 PCs and they have M2 drives to boot from.

    As for wanting 4TB, its a 2-fold answer

    1. I just have mass storage because I have my entire steam collection on there, plus all my MP3 collection and ,well, its a copy of my main Linux PC really... That being a Desktop has a 4TB for /home and so its really only that I want to copy that Machine

    2. Eve nthough the disks I am using are Seagate Hybrids, they should be a little quicker than they are, and so I was hoping that striping them, might speed them up.

    WD Blacks or the Toshibas might be in order instead, but hey... Big SSDs are comign down, so who knows?

    Bigger 2.5" Drives are too thick to fit.