LinuxQuestions.org
Visit Jeremy's Blog.
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, 06:33 AM   #31
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:
Unfortunately that is false.
Please explain how this is done. I don't believe you are correct.
 
Old 05-04-2020, 06:43 AM   #32
Nuuk
Member
 
Registered: May 2020
Posts: 62

Original Poster
Rep: Reputation: Disabled
I probably will need to add new music to the drive from time to time. My username is nick so how about mounting to say /nick/Music/music

And then in terminal mkdir /nick/Music/music to create the mount point.

And then changing the fstab file last entry to:

# /dev/sdb1
UUID=3b754aac-49bb-46fd-b3fc-e253449a1f62 /nick/Music/music ext4 0 0
 
Old 05-04-2020, 07:20 AM   #33
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,969

Rep: Reputation: 7333Reputation: 7333Reputation: 7333Reputation: 7333Reputation: 7333Reputation: 7333Reputation: 7333Reputation: 7333Reputation: 7333Reputation: 7333Reputation: 7333
Quote:
Originally Posted by camorri View Post
Please explain how this is done. I don't believe you are correct.
hm. That is quite simple. When you open any tool like gparted you can format the whole drive as <filesystem>, and also you can use mkfs both on device and partition. And also windows can do that (but I'm not really sure, probably now it creates a partition table anyway).
You can try it with a HDD/SSD or usb stick or an SD card. Whatever you wish.
 
Old 05-04-2020, 07:22 AM   #34
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,969

Rep: Reputation: 7333Reputation: 7333Reputation: 7333Reputation: 7333Reputation: 7333Reputation: 7333Reputation: 7333Reputation: 7333Reputation: 7333Reputation: 7333Reputation: 7333
Quote:
Originally Posted by Nuuk View Post
I probably will need to add new music to the drive from time to time. My username is nick so how about mounting to say /nick/Music/music

And then in terminal mkdir /nick/Music/music to create the mount point.

And then changing the fstab file last entry to:

# /dev/sdb1
UUID=3b754aac-49bb-46fd-b3fc-e253449a1f62 /nick/Music/music ext4 0 0
I posted you the right order. Do not mix the steps.
First make the dir, then edit fstab, mount it and finally you can use it.
Do not use that dir without mounting the filesystem.
 
Old 05-04-2020, 07:25 AM   #35
Nuuk
Member
 
Registered: May 2020
Posts: 62

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
I posted you the right order. Do not mix the steps.
First make the dir, then edit fstab, mount it and finally you can use it.
Do not use that dir without mounting the filesystem.
Thanks, I'll do that as soon as I finish my lunch.
 
Old 05-04-2020, 07:27 AM   #36
Nuuk
Member
 
Registered: May 2020
Posts: 62

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
.Do not use that dir without mounting the filesystem.
I'm not sure what you mean by that bit.
 
Old 05-04-2020, 07:35 AM   #37
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,969

Rep: Reputation: 7333Reputation: 7333Reputation: 7333Reputation: 7333Reputation: 7333Reputation: 7333Reputation: 7333Reputation: 7333Reputation: 7333Reputation: 7333Reputation: 7333
do not put/create any file/dir into that dir or in a subdir under the mount point if the filesystem is not mounted.

probably this helps: https://www.howtogeek.com/444814/how...file-on-linux/

Last edited by pan64; 05-04-2020 at 07:46 AM.
 
Old 05-04-2020, 07:47 AM   #38
Nuuk
Member
 
Registered: May 2020
Posts: 62

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
do not put/create any file/dir into that dir or in a subdir under the mount point if the filesystem is not mounted.

probably this helps: https://www.howtogeek.com/444814/how...file-on-linux/
How do I mount the filesystem?
 
Old 05-04-2020, 07:48 AM   #39
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,969

Rep: Reputation: 7333Reputation: 7333Reputation: 7333Reputation: 7333Reputation: 7333Reputation: 7333Reputation: 7333Reputation: 7333Reputation: 7333Reputation: 7333Reputation: 7333
it was already discussed: use the mount command. Also see the link I posted, everything is explained very well.
 
Old 05-04-2020, 07:55 AM   #40
agillator
Member
 
Registered: Aug 2016
Distribution: Mint 19.1
Posts: 419

Rep: Reputation: Disabled
pan 64 is right. Creating a directory does not mount a file system. A file system must be mounted to be usable. The only file systems that are mounted are those automatically mounted by entries in /etc/fstab and those that are manually mounted by specific mount commands. When you boot a system there is a default file system on a default drive that is mounted according to an entry, usually the first, in fstab. Others may also be mounted according to entries in fstab. Those are the only file systems immediately usable. To get to the information on a drive it must be mounted somewhere, i.e. the system must be told about it. Look at it this way: you can't get water out of a hose unless you attach it to a faucet or some other source of water. The mount point is a directory. Therefore, the directory must exist before you can mount the drive or partition. Not vice versa. And by the way, you don't mount a drive, you mount a partition containing a file system. One drive can contain one, two or many partitions (filesystems),
 
Old 05-04-2020, 08:32 AM   #41
Nuuk
Member
 
Registered: May 2020
Posts: 62

Original Poster
Rep: Reputation: Disabled
Still no go.

When I used mount -a I didn't get any error messages. But there is no sign of the music files in nick/Music/music
 
Old 05-04-2020, 08:35 AM   #42
Nuuk
Member
 
Registered: May 2020
Posts: 62

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
it was already discussed: use the mount command. Also see the link I posted, everything is explained very well.
With respect, it may be well explained to those who are familiar with the Linux OS, but to anybody else is looks like a mass of contradictory instructions.

I thought that I was mounting a second hard drive. All of a sudden we are talking about mounting a file system.
 
Old 05-04-2020, 08:36 AM   #43
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
Post the current contents of /etc/fstab. Copy and paste it, use 'Wrap Quotes' button at the top of the editing screen.

Also run the command lsblk -f and use the Wrap Quotes. This keeps the information formatted for us to see it.
 
Old 05-04-2020, 08:38 AM   #44
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 thought that I was mounting a second hard drive. All of a sudden we are talking about mounting a file system.
In your case, the second drive has one file system. You mount file systems, not drives. SDB is the drive, SDB1 is the first partition and file system on the drive.
 
Old 05-04-2020, 08:39 AM   #45
Nuuk
Member
 
Registered: May 2020
Posts: 62

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by agillator View Post
pan 64 is right. Creating a directory does not mount a file system. A file system must be mounted to be usable. The only file systems that are mounted are those automatically mounted by entries in /etc/fstab and those that are manually mounted by specific mount commands. When you boot a system there is a default file system on a default drive that is mounted according to an entry, usually the first, in fstab. Others may also be mounted according to entries in fstab. Those are the only file systems immediately usable. To get to the information on a drive it must be mounted somewhere, i.e. the system must be told about it. Look at it this way: you can't get water out of a hose unless you attach it to a faucet or some other source of water. The mount point is a directory. Therefore, the directory must exist before you can mount the drive or partition. Not vice versa. And by the way, you don't mount a drive, you mount a partition containing a file system. One drive can contain one, two or many partitions (filesystems),
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?
 
  


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 02:45 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