LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-04-2020, 08:40 AM   #46
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,970

Rep: Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334

yes, actually you cannot mount a drive, but a filesystem. Nothing else, but a filesystem. They are stored within partitions and partitions are used to split a drive into parts.
Sometimes we mix the two expressions (we say mount a drive, but actually we never do that, just mount a filesystem stored on that device). Usually this is the case when we have an usb stick with a single filesystem.

I believe it can be confusing.
 
Old 05-04-2020, 08:42 AM   #47
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,235

Rep: Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860
Quote:
I have created the directory nick/Music/music, and I have put an instruction in fstab to mount SDB1. And then I have issued the command mount -a. So what else is necessary?
Once the sdb1 is mounted, you can access the files normally. Nothing else is to be done.

IF you want to see it mounted, confirmation only, type mount by itself, and mount will list all mounted file systems on your system. keep in mind, this is not necessary, just giving you a way to verify what is mounted.
 
Old 05-04-2020, 08:43 AM   #48
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,970

Rep: Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334
Quote:
Originally Posted by Nuuk View Post
I have created the directory nick/Music/music, and I have put an instruction in fstab to mount SDB1. And then I have issued the command mount -a. So what else is necessary?
would be nice to explain exactly what did you do. Which directory did you create exactly? How did you put what instruction in fstab? What's happened when you executed mount -a? Was that successful at all?
Without details hard to say anything.
 
Old 05-04-2020, 08:58 AM   #49
Nuuk
Member
 
Registered: May 2020
Posts: 62

Original Poster
Rep: Reputation: Disabled
Sorry Cliff - I couldn't see a Wrap button anywhere. This is what is in the fstab file:

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda1
UUID=42007db2-50af-46ae-9f4c-8b87b87c893f / ext4 rw,errors=remount-ro 0 1

# /dev/sdb1
UUID=3b754aac-49bb-46fd-b3fc-e253449a1f62 /nick/Music/music ext4 0 0

and this is the result of lsblk -f

nick@apl2 ~ $ lsblk -f
NAME FSTYPE LABEL MOUNTPOINT
sda
└─sda1 /
sdb
nick@apl2 ~ $


Does the above mean that I should change SDB1 in the fstab file back to SDB?
 
Old 05-04-2020, 09:02 AM   #50
Nuuk
Member
 
Registered: May 2020
Posts: 62

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
would be nice to explain exactly what did you do. Which directory did you create exactly? How did you put what instruction in fstab? What's happened when you executed mount -a? Was that successful at all?
Without details hard to say anything.
I did what I said I was going to do.

In the terminal I used CD /Music then mkdir music to create the directory.

I used gksudo gedit fstab to edit the fstab file. Then I saved it.

Then I typed mount -a
 
Old 05-04-2020, 09:22 AM   #51
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,235

Rep: Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860
Quote:
Quote:
If you using quick reply on LQ, there is a little icon, looks like a comic quote.
Press it once it enters square brace QUOTE and /QUOTE. You paste between the quote and /quote.

Quote:
Does the above mean that I should change SDB1 in the fstab file back to SDB?
No. What you have in fstab looks fine to me, as long as the UUID is correct.

If you got no output when you ran the mount -a command, that is complete success. Typically, commands only return errors, or the data they are asked for.
 
Old 05-04-2020, 09:22 AM   #52
JeremyBoden
Senior Member
 
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,947

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
So you created two directories:-
Code:
/Music
and
Code:
/home/your_username/music
Do you have a directory called
Code:
/nick/Music/music
If you don't, that fstab mount will fail.
Also it would be nice if you mounted the filesystem as ro or rw.
 
Old 05-04-2020, 09:44 AM   #53
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,970

Rep: Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334
Quote:
Originally Posted by Nuuk View Post
I did what I said I was going to do.

In the terminal I used CD /Music then mkdir music to create the directory.

I used gksudo gedit fstab to edit the fstab file. Then I saved it.

Then I typed mount -a
no, this is not the exact story. Unfortunately cd and CD are not the same things, and there are a lot of [other] things which could be important but you did not post.
So would be better to show exactly what did you type into the terminal, what's happened. Also we would like to know what was the response of these commands (if they were successfully executed or there was a message or ....).
 
Old 05-04-2020, 09:48 AM   #54
Nuuk
Member
 
Registered: May 2020
Posts: 62

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by JeremyBoden View Post
So you created two directories:-
Code:
/Music
and
Code:
/home/your_username/music
Do you have a directory called
Code:
/nick/Music/music
If you don't, that fstab mount will fail.
Also it would be nice if you mounted the filesystem as ro or rw.
No, Music is already in the nick directory. I simply added the music (small 'm') directory.
 
Old 05-04-2020, 09:50 AM   #55
Nuuk
Member
 
Registered: May 2020
Posts: 62

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
no, this is not the exact story. Unfortunately cd and CD are not the same things, and there are a lot of [other] things which could be important but you did not post.
So would be better to show exactly what did you type into the terminal, what's happened. Also we would like to know what was the response of these commands (if they were successfully executed or there was a message or ....).
After changing fstab again to change sdb1 to sdb, I tried the mount -a command and was told that mount point /nick/Music/music does not exist. Should it be nick/Music/music, ie without the leading '/'?
 
Old 05-04-2020, 09:54 AM   #56
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,235

Rep: Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860
The system is correct, in that /nick/Music/music doesn't exist. The mount point will be /home/nick/Music/music. ( from the root )

The first / indicates the root ( beginnig of the tree ). That is what you want to feed the kernel.

Last edited by camorri; 05-04-2020 at 10:02 AM.
 
Old 05-04-2020, 10:07 AM   #57
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,970

Rep: Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334
Quote:
Originally Posted by Nuuk View Post
After changing fstab again to change sdb1 to sdb, I tried the mount -a command and was told that mount point /nick/Music/music does not exist. Should it be nick/Music/music, ie without the leading '/'?
The mount point always should begin with / . And should exist. You can easily check it with [for example] ls -l <mount-point>:
Code:
ls -l /nick/Music/music
obviously you need to create this directory before trying to use it as mount point.
 
Old 05-04-2020, 10:12 AM   #58
Nuuk
Member
 
Registered: May 2020
Posts: 62

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by camorri View Post
The system is correct, in that /nick/Music/music doesn't exist. The mount point will be /home/nick/Music/music. ( from the root )

The first / indicates the root ( beginnig of the tree ). That is what you want to feed the kernel.
Just to make sure that I understand; you mean that is what should be in the fstab file?
 
Old 05-04-2020, 10:18 AM   #59
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,235

Rep: Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860
Yes.
 
Old 05-04-2020, 10:24 AM   #60
Nuuk
Member
 
Registered: May 2020
Posts: 62

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
The mount point always should begin with / . And should exist. You can easily check it with [for example] ls -l <mount-point>:
Code:
ls -l /nick/Music/music
obviously you need to create this directory before trying to use it as mount point.
But music is created.

But when I type in ls -l /nick/Music/music it says no such file or directory.

If I type in ls -l /nick/Music the same thing, and also if I just ask for /nick

I have tried doing that using su, and also starting from the / (root)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mount second drive and move Home to second drive edjenn1998 Linux - Newbie 9 07-08-2019 10:50 AM
Second Hard Drive Mounting Problems JC404 Linux - Newbie 16 07-11-2003 06:52 AM
Why does Redhat 8.0 access hard drive second by second? Cyclops Linux - Distributions 5 11-20-2002 07:34 PM
mounting a second hard drive evilRhino Linux - General 2 10-17-2002 01:22 AM
Questions regarding mounting partitions on the second hard drive HoHah Linux - General 15 04-16-2002 08:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration