Moving or Directing directories to different drive

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
MurphCID
Level 15
Level 15
Posts: 5908
Joined: Fri Sep 25, 2015 10:29 pm
Location: Near San Antonio, Texas

Moving or Directing directories to different drive

Post by MurphCID »

Ok, not sure where to put this, or if I can even explain it properly, but here goes:

In Windows I have the C:\ drive and an E:\ drive which is used as my storage drive, and I only use the "C" drive for boot and programs like Word. I have moved my documents, music, downloads, etc to the "E" drive where they are stored. It is pretty easy, I just go into the properties of each directory and tell Windows to look at the "E" drive instead of the "C" drive. So any time I load a document, songs, etc they go to the "E" drive instead of the "C" drive (I hope I am explaining this ok). I have a games disk ("G") which I have all games loaded as well. It is for the most part pretty simple.

In Linux, if I have two drives, how to I make the documents, music, etc move to the storage drive? I guess the storage drive would be SDA2 ( it is an NVME drive)? I have not ever added a second drive in Linux, but the Lemur Pro can take a second drive, which I might add at some point. So instead of keeping all the documents, files, songs, etc on what I mentally still call the "C" drive, how would I point Mint to put all of these on the secondary drive?

Also does Mint auto mount the second drive, or do I have to do it manually each time? Sorry for the exceptionally basic question, but I am attempting to learn this in case I make my desktop computer (with six drives) my Linux machine at some point.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
ugly
Level 5
Level 5
Posts: 592
Joined: Thu Nov 24, 2016 9:17 pm

Re: Moving or Directing directories to different drive

Post by ugly »

You can mount the drives automatically.

Go to 'Disks' (either in the settings or directly from the start menu).

You should see a list of drives on the left side. Click on one of the drives and on the larger right panel you'll see the partitions. Click on the partition you want to automount and click the gear icon. In the menu that pops up select 'Edit Mount Options'. Then check the box that says 'Mount on Startup'. Here you can also change the label of the drive to make it more recognizable to you (I suppose you could even name it 'E' if you wanted it to be familiar to your Windows setup).

You can change the location of the Documents, Music, etc. folders using symlinks.

For example, these folders will be under your home folder (~/Documents, ~/Music). Make sure that any files you have in there are backed up, then you can delete those folders.

Then you can create a symlink in these locations to the folders that you want, which would be something like this in the terminal: ln -s /mnt/E/Music/ ~/Music.

Note, these are just general instructions, and if you are unsure what you are doing, you should ask for clarifications once you have your drives set up the way you like.
ajgreeny
Level 7
Level 7
Posts: 1661
Joined: Mon Nov 19, 2007 3:27 pm

Re: Moving or Directing directories to different drive

Post by ajgreeny »

Just make certain that fast-start is disabled, and stays disabled in Windows or access to that disk will not be possible when running Mint.
Windows can sometimes turn fast-start back on during updates so watch out for that.
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Moving or Directing directories to different drive

Post by Flemur »

MurphCID wrote: Tue May 11, 2021 1:32 pm ...
So any time I load a document, songs, etc they go to the "E" drive instead of the "C" drive (I hope I am explaining this ok). I have a games disk ("G") which I have all games loaded as well. It is for the most part pretty simple.

In Linux, if I have two drives, how to I make the documents, music, etc move to the storage drive? I guess the storage drive would be SDA2 ( it is an NVME drive)? I have not ever added a second drive in Linux, but the Lemur Pro can take a second drive, which I might add at some point.
1st, what windows calls "drives" linux calls "partitions", and you can have more than one "drive" on a physical disk - they're partitions. To be clear, use the term "partition" here when talking about partitions. Windows C:, D:, etc are partitions that windows calls "drives", but they can also be an entire disk (drive). But don't have to be.

2nd, you can use your windows G: "drive" (partition) for data, in linux (do what ajgreeny said), or you can make a new partition, either on the same physical disk or the other of the "two drives" that you mention. FWIW, it could be sda2, but not necessarily.

Do you intend to share the data partition with windows? If not, use a linux-friendly format like ext4, rather than windows' ntfs.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
User avatar
MurphCID
Level 15
Level 15
Posts: 5908
Joined: Fri Sep 25, 2015 10:29 pm
Location: Near San Antonio, Texas

Re: Moving or Directing directories to different drive

Post by MurphCID »

Flemur wrote: Tue May 11, 2021 6:06 pm
MurphCID wrote: Tue May 11, 2021 1:32 pm ...
So any time I load a document, songs, etc they go to the "E" drive instead of the "C" drive (I hope I am explaining this ok). I have a games disk ("G") which I have all games loaded as well. It is for the most part pretty simple.

In Linux, if I have two drives, how to I make the documents, music, etc move to the storage drive? I guess the storage drive would be SDA2 ( it is an NVME drive)? I have not ever added a second drive in Linux, but the Lemur Pro can take a second drive, which I might add at some point.
1st, what windows calls "drives" linux calls "partitions", and you can have more than one "drive" on a physical disk - they're partitions. To be clear, use the term "partition" here when talking about partitions. Windows C:, D:, etc are partitions that windows calls "drives", but they can also be an entire disk (drive). But don't have to be.

2nd, you can use your windows G: "drive" (partition) for data, in linux (do what ajgreeny said), or you can make a new partition, either on the same physical disk or the other of the "two drives" that you mention. FWIW, it could be sda2, but not necessarily.

Do you intend to share the data partition with windows? If not, use a linux-friendly format like ext4, rather than windows' ntfs.
Yes, I know I can put multiple partitions on the same drive. However I am one of those folks who uses the whole drive as one partition. So I was not clear, if I add a second drive as a storage drive, how do I put my documents, music etc on that drive rather than the boot drive? I am sorry that I have been unclear, I have a hard time describing this. Thanks everyone for the help.
Petermint
Level 9
Level 9
Posts: 2983
Joined: Tue Feb 16, 2016 3:12 am

Re: Moving or Directing directories to different drive

Post by Petermint »

Start a Linux machine and open file /etc/fstab in any text editor. You are looking at the mount instructions for partitions on storage devices.

Code: Select all

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=0a315ee9-2e54-43ee-de43-7cae3298927e /               ext4    errors=remount-ro 0       1
/swapfile                                 none            swap    sw              0       0
A storage device can start as something like sda then become sdb when you add an extra disk. The partition sda1 could become sda2 when you insert an extra partition. You give partitions a UUID, using Disks, which does not change when you move disks and partitions around.

The partition can then be inserted anywhere in the storage directory structure, as, for example, /home/me/Pictures.

To move the data from /home/me/Pictures to the new partition, you follow a few steps. Here is approximately what I did.
* Format the new partition with a UUID and the label Pictures.
* Mount the new Pictures as /media/me/Pictures.
* Copy everything from /home/me/Pictures to /media/me/Pictures.
* Mount the new Pictures as /home/me/Pictures.
* Create a link for /home/me/Pictures.

/media/me/ has the same permissions as /home/me/ and is the location where Linux mounts USB storage. You can mount backups there. Backup, backup, and backup before you delete the old Pictures.

After looking at fstab, File System TABle, you are now an "old hand" at Linux, a move from Learner plates, to Provisional plates. There are Linux users with decades of experience who have never looked at fstab or used a UUID.
deepakdeshp
Level 20
Level 20
Posts: 12341
Joined: Sun Aug 09, 2015 10:00 am

Re: Moving or Directing directories to different drive

Post by deepakdeshp »

Drive naming https://www.debian.org/releases/wheezy/ ... 04.html.en
When I mounted partitions in gayab, I used drive names and not UUID. Uuid naming is a bit messy. That said it's better to stick to uuid in fstab.Then the drive numbers can change when you make or delete partitions.

Code: Select all

 sudo parted -l
will give information about your drives.
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help.
Regards,
Deepak

Mint 21.1 Cinnamon 64 bit with AMD A6 / 8GB
Mint 21.1 Cinnamon AMD Ryzen3500U/8gb
User avatar
MurphCID
Level 15
Level 15
Posts: 5908
Joined: Fri Sep 25, 2015 10:29 pm
Location: Near San Antonio, Texas

Re: Moving or Directing directories to different drive

Post by MurphCID »

Thank you all. I am still a little lost, but I will muddle through, and succeed eventually.
Ivy_Pool
Level 2
Level 2
Posts: 59
Joined: Fri Feb 26, 2021 5:45 pm

Re: Moving or Directing directories to different drive

Post by Ivy_Pool »

I moved my home directory to another partition by following the directions below:
https://www.howtogeek.com/442101/how-to ... rd-drive/
If you go that route, back everything up first.
User avatar
MurphCID
Level 15
Level 15
Posts: 5908
Joined: Fri Sep 25, 2015 10:29 pm
Location: Near San Antonio, Texas

Re: Moving or Directing directories to different drive

Post by MurphCID »

Ivy_Pool wrote: Thu May 13, 2021 9:59 am I moved my home directory to another partition by following the directions below:
https://www.howtogeek.com/442101/how-to ... rd-drive/
If you go that route, back everything up first.
Thanks
Locked

Return to “Beginner Questions”