I'm pretty sure fstab needs to be edited, can someone please tell me how to mount my 2nd hard drive at startup?
I download using sda but move torrents to sdb when they are done. Need sdb to attach to /media/STORAGE/
I'm not totally a newbie, but not far from one. Mostly used Fedora before now. I'm sorry if this is in some FAQ but I don't know what it is I don't know.
Thanks so much for any assistance you can offer!
How to mount my 2nd drive at startup?
Moderators: MattKingUSA, khz
-
- Established Member
- Posts: 6
- Joined: Thu May 11, 2017 4:00 am
-
- Established Member
- Posts: 528
- Joined: Thu Sep 01, 2011 9:07 pm
- Has thanked: 88 times
- Been thanked: 23 times
Re: How to mount my 2nd drive at startup?
Well, it depends... Can you show us your current /etc/fstab?
I prefer to use UUID to identify the disk. You can find it with:
See what is pointing to sdb. Then, remove (or edit) the previous sdb line and add something like:
(Assuming that sdb is formatted as ext4.)
Be careful: if you are using systemd, it seems that errors in fstab makes the system unbootable in regular mode. (I think you have to start on safe-mode to fix it.)
I prefer to use UUID to identify the disk. You can find it with:
Code: Select all
ls -l /dev/disk/by-uuid/
Code: Select all
UUID=<UUID you found here> /media/STORAGE ext4 auto,users,rw,exec,noatime 0 2
Be careful: if you are using systemd, it seems that errors in fstab makes the system unbootable in regular mode. (I think you have to start on safe-mode to fix it.)
-
- Established Member
- Posts: 6
- Joined: Thu May 11, 2017 4:00 am
Re: How to mount my 2nd drive at startup?
Thanks for the response. This is what I have in fstab now::
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda1 during installation
UUID=499efdba-1d68-4009-983d-4bcc21268eaa / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=cbba5c5c-818b-4487-a001-5be3527c7e0f none swap sw 0 0
After mounting sdb manually, here's the output from blkid:
/dev/sda1: UUID="499efdba-1d68-4009-983d-4bcc21268eaa" TYPE="ext4"
/dev/sda5: UUID="cbba5c5c-818b-4487-a001-5be3527c7e0f" TYPE="swap"
/dev/sdb1: UUID="499efdba-1d68-4009-983d-4bcc21268eaa" TYPE="ext4"
/dev/sdb2: LABEL="STORAGE" UUID="42d4b973-b6d6-4537-a512-16ffccec877b" TYPE="ext4"
I'm trying to attach sdb2 to sda5 at /media/STORAGE/
Thanks!
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda1 during installation
UUID=499efdba-1d68-4009-983d-4bcc21268eaa / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=cbba5c5c-818b-4487-a001-5be3527c7e0f none swap sw 0 0
After mounting sdb manually, here's the output from blkid:
/dev/sda1: UUID="499efdba-1d68-4009-983d-4bcc21268eaa" TYPE="ext4"
/dev/sda5: UUID="cbba5c5c-818b-4487-a001-5be3527c7e0f" TYPE="swap"
/dev/sdb1: UUID="499efdba-1d68-4009-983d-4bcc21268eaa" TYPE="ext4"
/dev/sdb2: LABEL="STORAGE" UUID="42d4b973-b6d6-4537-a512-16ffccec877b" TYPE="ext4"
I'm trying to attach sdb2 to sda5 at /media/STORAGE/
Thanks!
Last edited by armchair_rambo on Thu May 11, 2017 5:12 pm, edited 1 time in total.
-
- Established Member
- Posts: 528
- Joined: Thu Sep 01, 2011 9:07 pm
- Has thanked: 88 times
- Been thanked: 23 times
Re: How to mount my 2nd drive at startup?
So, I think (don't hold me responsible if something goes wrong!) your /etc/fstab should look something like this:armchair_rambo wrote:Thanks for the response. This is what I have in fstab now::
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda1 during installation
UUID=499efdba-1d68-4009-983d-4bcc21268eaa / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=cbba5c5c-818b-4487-a001-5be3527c7e0f none swap sw 0 0
After mounting sdb manually, here's the output from blkid:
/dev/sda1: UUID="499efdba-1d68-4009-983d-4bcc21268eaa" TYPE="ext4"
/dev/sda5: UUID="cbba5c5c-818b-4487-a001-5be3527c7e0f" TYPE="swap"
/dev/sdb1: UUID="499efdba-1d68-4009-983d-4bcc21268eaa" TYPE="ext4"
/dev/sdb2: LABEL="STORAGE" UUID="42d4b973-b6d6-4537-a512-16ffccec877b" TYPE="ext4"
Code: Select all
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda1 during installation
UUID=499efdba-1d68-4009-983d-4bcc21268eaa / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=cbba5c5c-818b-4487-a001-5be3527c7e0f none swap sw 0 0
UUID=42d4b973-b6d6-4537-a512-16ffccec877b /media/STORAGE ext4 auto,users,rw,exec,noatime 0 2
I don't understand this sentence... (sda5 is swap... what do you mean to attach?) Anyway, the above should automatically mount sdb2 to /media/STORAGE.armchair_rambo wrote: I'm trying to attach sdb2 to sda5 at /media/STORAGE/
-
- Established Member
- Posts: 6
- Joined: Thu May 11, 2017 4:00 am
Re: How to mount my 2nd drive at startup?
Ha yes I got it wrong, not gonna be using a swap drive for storage.
I appreciate the advice, I know enough to be dangerous but know
enough to make a backup of fstab first. Thanks for the info,
caveat emptor! I'll give it a try and report back.
I appreciate the advice, I know enough to be dangerous but know
enough to make a backup of fstab first. Thanks for the info,
caveat emptor! I'll give it a try and report back.
-
- Established Member
- Posts: 6
- Joined: Thu May 11, 2017 4:00 am
Re: How to mount my 2nd drive at startup?
It worked perfectly, thanks a lot! I used your code without changing anything in it.
Can't tell you how annoying it was to manually mount the drive at every boot!
Cheers, friend.
Can't tell you how annoying it was to manually mount the drive at every boot!
Cheers, friend.