2

I have a desktop machine running Ubuntu for a few years.

I needed more space for my files and for that purpose I purchased and installed a brand new HDD in it.

Everything is working great. The only issue is that the HDD is not mounting when the computer boots.

In order to my applications to find the files in the new HDD I have to click on the icon of the new HDD to cause it to mount. I have been clicking on that thing for a long time because I can't figure out how to manage fstab.

I followed the instructions from the following link: Auto mount a drive that located on Ubuntu and auto share that drive for Window

When I follow the instruction it does not seem to mount the HDD in the same place as if I had clicked on the icon of the HDD in Nautilus and Unity.

This is what I put on my fstab

/dev/sdb1 /media/jean/2 ext4 users,user 0 0

Note that my user name account is jean. I wrote on fstab what I believe should work to mount the HD on boot and allow access to the files and folders within that hard drive by my applications. The applications do not seem to be able to handle the files and folders. Do I need to set permissions? Is the path correct? What does users,user 0 0 means?

That application "Disks" have no use either! Could not make it happen.

0

There are a number of different approaches that will resolve your problem. The simplest one to describe would be to copy the original drive to the larger drive using dd or dc3dd. Another option is to determine what is using the most space and moving all that data to the new drive and mounting the new drive in the location on the tree where the data came from. du can help you determine usage by directory. du -h ~/Documents from a terminal prompt will give you the disk usage of your documents directory. Changing the command to ~/Downloads, ~/Pictures, ~/Music or ~/Videos will give you the usage for those directories as well. Comparing the totals will tell you where you are using all your space. If you have multiple users on the system it may be appropriate to move the entire /home directory to the new drive and mount that in fstab. Fair warning: dd dc3dd and du are all CLI tools that are run from the terminal and dd & dc3dd if improperly used can wipe your data. To understand permissions see How do file permissions work? The /media directory is usually used for temporarily connected storage like flash drives and external drives. Your data lives at /home/yourusername or perhaps /home/jean. the ~ in the above is shorthand for that and literally means my home directory (so if you are jean it means /home/jean and if you are bob it means /home/bob). When deciding where to mount your new drive you might find How to understand the Ubuntu file system layout? useful. For a rundown on fstab options open a terminal and issue the command man fstab

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.