LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 03-29-2019, 10:26 PM   #1
BKoster
LQ Newbie
 
Registered: Mar 2019
Posts: 2

Rep: Reputation: Disabled
'umount /dev/sdb1' shows not mounted.


Hello,

Extremely new to Linux and this forum. Recently picked up a Raspberry Pi Zero W and am in the process of setting up samba to use as a NAS. I have two physical hard drives connected to it. I am attempting to mount both hard drives to a directory. First I need to format them correclty. The first drive (1TB) is called sda2. The second drive (320GB) is called sdb1. For the first one I run "umount /dev/sda2" and "sudo mkfs.ext4 /dev/sda2" These run no problem. However when I do the same for sdb1 it returns with "umount: /dev/sdb1: not mounted". I'm pretty confused why it says this especially because the sda2 drive did not

Also if anyone could explain what sda and sdb means that would be nice

Thanks in advance!
 
Old 03-29-2019, 10:48 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,140

Rep: Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123
Exercise you favourite search engine. here is one I found quickly. I'm sure there are better/more expansive answers out there.

/dev/sda is first hard disk/SSD/...
/dev/sdb is the second, and so on. Note these are (correctly) referred to as "drives".
Within a drive you have partition(s) - /dev/sda1, /dev/sda2, ...
Partitions house filesystems - which you create with mkfs, as you appear to know. The mount/umount commands refer to partition, but it's actually the associated filesystem that really gets mounted.
To check what is currently mounted use this command.
Code:
df -hT
 
1 members found this post helpful.
Old 03-30-2019, 04:25 AM   #3
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by BKoster View Post
Hello,
However when I do the same for sdb1 it returns with "umount: /dev/sdb1: not mounted". I'm pretty confused why it says this especially because the sda2 drive did not
It gives this error because, very literally, /dev/sdb1 is not mounted. /dev/sda2 on the other hand was obviously mounted when you launched the umount command.

I am a bit confused and wonder if you do things right. A full disk is not named /dev/sda2. The naming convention is /dev/sda for SCSI disk a. sda2 stands for the second partition on that disk. The same convention is used for /dev/sdb1.
Quote:
Also if anyone could explain what sda and sdb means that would be nice
sd stands for "SCSI disk". A module in the Linux kernel translates SCSI commands to native USB, SATA etc commands, and Linux considers most storage devices as SCSI disks, even if they are not disks or they don't use the SCSI protocol, such as USB thumbdrives.
 
Old 03-30-2019, 05:18 AM   #4
ehartman
Senior Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,674

Rep: Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888
Quote:
Originally Posted by berndbausch View Post
sd stands for "SCSI disk". A module in the Linux kernel translates SCSI commands to native USB, SATA etc commands,
Essentially "sd" is used for all mass-storage devices that are addressed by a direct block number, so NOT by a cilinder/track/sector adress (those are hd's).
SCSI addressing allows for 48-bits, so are large enough for all modern "disk-like" devices.
 
1 members found this post helpful.
Old 03-30-2019, 05:49 AM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,750

Rep: Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928
A little off topic for this thread but when libata (the kernel module as posted above) was implemented all storage media regardless of bus type are given a sd device designation including IDE/PATA. 48 bit logical block addressing was introduced in the ATA-6 standard.

For the OP IDE/PATA was the predecessor to the SATA bus. PATA i.e. Parallel ATA (AT Attachment) and SATA i.e Serial ATA.
 
Old 03-30-2019, 12:55 PM   #6
BKoster
LQ Newbie
 
Registered: Mar 2019
Posts: 2

Original Poster
Rep: Reputation: Disabled
To update this thread I figured out my issue. I was unsure what umount actually did and found later that it unmounts a drive. Also the drives I had connected had several partitions I did not realize about therefore I got confused when sda1, sda2, etc etc. were showing up.

Thank you for your help.
 
1 members found this post helpful.
Old 03-30-2019, 06:09 PM   #7
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,349
Blog Entries: 28

Rep: Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145
As an aside, you would normally unmount the file system, which is normally mounted to a mount point in /mnt, /media, or /run/media/[username], not unmount it from /dev.

In other words, the command would be something like, for example,

Code:
umount /[ mnt | media]/[partition]
See examples here: http://www.linfo.org/umount.html
 
  


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
Data is not visible which is mounted on /dev/sdb1 prakash_kumar Linux - Newbie 18 02-07-2015 09:16 AM
[7.3] umount says: "umount: /very/long/path (/dev/loop0) is unmounted" ? McZ Linux From Scratch 4 03-24-2013 01:29 PM
mdadm --manage /dev/md0 --add /dev/sdb1 returns device busy JeepingAZ Linux - Desktop 2 02-17-2011 12:18 PM
USB Detection; when /dev/sda1 or /dev/sdb1 ravime Linux - Hardware 6 09-12-2007 06:15 AM
Mount. Umount. Mount. Umount. Mount. Umount. Mount.. cwizardone Slackware 10 03-22-2007 09:30 AM

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

All times are GMT -5. The time now is 08:47 PM.

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