LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-10-2017, 12:42 PM   #16
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930

Quote:
Originally Posted by rtmistler View Post
Once again, since this doesn't seem to be well understood or agreed upon. The attached image is one of those Western Digital My Passport drives, about 1TB. I have not put much on it yet. It is not mounted. Gparted knows how much space is used in that NTFS file system.
Attached Thumbnails
Click image for larger version

Name:	gparted-image.jpg
Views:	25
Size:	59.4 KB
ID:	24747  
 
Old 04-10-2017, 03:36 PM   #17
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,996

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
I haven't worked building gparted but I'll suspect that it does mount the drive for "exclusive" or "locked" use.
It does scan the drive.
There is no way it could do the things it does without doing that.
It is not in the traditional used phrase of "mount".

Think we lost the OP long ago.
 
Old 04-10-2017, 10:18 PM   #18
TheEzekielProject
Member
 
Registered: Dec 2016
Distribution: arch
Posts: 668

Rep: Reputation: 190Reputation: 190
Well, considering that there are is an entire computer science dedicated to obscuring it, I guess it would be most accurate to say, "It depends."
Is the system encrypted? If yes, then no, unless you can the break the encryption.

Otherwise, absolutely.
 
Old 04-10-2017, 10:48 PM   #19
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,781

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
Quote:
Originally Posted by jefro View Post
I haven't worked building gparted but I'll suspect that it does mount the drive for "exclusive" or "locked" use.
It does scan the drive.
There is no way it could do the things it does without doing that.
For "that" == "scan the drive", of course it does that. For "that" == "mount the filesystem", sorry, but no. In fact, much of what gparted does (resizing or moving filesystems) requires that the filesystem not be mounted. Why is it so hard to imagine that some of the same code that exists in the kernel for parsing filesystem structures might also exist in other programs. Actually, gparted is just a front end for parted. The filesystem-specific stuff is in libparted.

It's not hard to run gparted (or parted) under strace and note the lack of any use of the mount(2) system call.
 
Old 04-11-2017, 03:20 PM   #20
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,996

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
Did you look at gparted or parted to see how it calls the drive????
 
Old 04-11-2017, 04:34 PM   #21
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,781

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
Quote:
Originally Posted by jefro View Post
Did you look at gparted or parted to see how it calls the drive????
OK, if you insist. Looking at the output from "strace -f -e trace=file,desc gparted /dev/vda" (where /dev/vda is a virtual disk with one partition, formatted ext3), I see an open("/dev/vda1",...) followed by a lot of llseek() and read() calls near the beginning and end of the partition looking something to identify the filesystem type and fetching the filesystem super block. At no time does the filesystem get mounted. That strace expression selects all system calls that take a file name or involve a file descriptor number.

There's really no mystery at all. It's a storage device. It contains data that can be read and analyzed. There is no point in asking the kernel to mount a (possibly badly broken) filesystem.
 
Old 04-11-2017, 07:39 PM   #22
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,996

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
Terminology. It may not have used mount command but it did mount the drive. This is what I was talking about earlier. We still have lost the OP long ago.
 
Old 04-11-2017, 08:22 PM   #23
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,781

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
Quote:
Originally Posted by jefro View Post
Terminology. It may not have used mount command but it did mount the drive. This is what I was talking about earlier.
In this context, "mount" has a very specific meaning and refers to attaching a filesystem to a point in the system's directory hierarchy. In your view, "dd" also "mounts" the filesystem (i.e., calls open() on the device). This is not Alice in Wonderland, where you can claim that words have any meaning that you choose.
 
Old 04-11-2017, 09:54 PM   #24
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,996

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
https://en.oxforddictionaries.com/definition/mount

"4.3Computing Make (a disk or disk drive) available for use."

It was made available for use by the program gparted.

It is clear to me that it conforms to the definition.
 
Old 04-11-2017, 10:49 PM   #25
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,781

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
Quote:
Originally Posted by jefro View Post
https://en.oxforddictionaries.com/definition/mount

"4.3Computing Make (a disk or disk drive) available for use."

It was made available for use by the program gparted.

It is clear to me that it conforms to the definition.
You will find that counter to what just about everyone else here means when they talk about a drive being "mounted" or not, but go ahead and enjoy your definition.

Last edited by rknichols; 04-11-2017 at 10:53 PM.
 
Old 04-13-2017, 07:23 AM   #26
Jjanel
Member
 
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
Blog Entries: 12

Rep: Reputation: 364Reputation: 364Reputation: 364Reputation: 364
Not available, to `cp` &relatives anyway. `man -s 2 mount` gets very upset
if you attempt to speak English, instead of machine, language to a CPU
"Look inside", search (Section) 4.2.3 $35penalty
 
Old 04-13-2017, 08:33 AM   #27
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Moderator response

Quote:
Originally Posted by Jjanel View Post
Not available, to `cp` &relatives anyway. `man -s 2 mount` gets very upset
if you attempt to speak English, instead of machine, language to a CPU
"Look inside", search (Section) 4.2.3 $35penalty
I would suggest that you follow the LQ Rules;
Quote:
All member-created content should be in English. This allows our moderators to ensure all content complies with all LQ rules. In addition, we recommend you avoid sms/l33t speak in the technical fora. Avoiding sms/l33t speak will improve question clarity and increase the chance of receiving a helpful response.
Maybe English is not your first language but please consider composing a quality response without any shorthand or personal representations so that everyone can understand your response in that anyone can possibly contribute too your post(s).

While recommendation of using a commercial product is not against the rules but we do have loads of free information that could be referenced that would allow everyone access too.

Simple DuckDuckgo search provided this link that should provide some help to members to facilitate the operations requested;

https://unix.stackexchange.com/quest...mounted-device

For others that wish to understand more about the Linux Filesystem.
Plus everyone should remember TLDP as a great resource for Linux Documentation.

Last edited by onebuck; 04-13-2017 at 05:53 PM. Reason: typo
 
Old 04-13-2017, 03:13 PM   #28
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,996

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
Didn't we lose the OP???
 
Old 04-13-2017, 05:13 PM   #29
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,671
Blog Entries: 4

Rep: Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945
Quote:
Originally Posted by rknichols View Post
You will find that counter to what just about everyone else here means when they talk about a drive being "mounted" or not, but go ahead and enjoy your definition.
Indeed. "Mounted," in all common usage that I have ever known, very specifically refers to "the mount command," which causes the contents of the drive (partition) to be made available as part of the overall file system.

Many programs, including the grub(2) boot loader, know how to read filesystems. The formats are entirely public, as is the source-code used within those filesystems' drivers. It is therefore possible to craft an external program, if you are so inclined, which supports every nuance of the on-disk format exactly.

This is an extremely useful capability for a program to have. Nonetheless, it is not what is universally understood to be meant by the term, "mounted."

For a program like gparted to be successful, it is crucial that the drive/partition in question must not be "mounted," so that a filesystem cannot possibly be accessing it while the utility program does.

Last edited by sundialsvcs; 04-13-2017 at 05:14 PM.
 
Old 04-13-2017, 08:30 PM   #30
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,996

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
I've used many OS's and mount has referred to any use of a media. Raw drives and other devices mounted didn't use mount command but made them available. Guess I've been doing this stuff too long and on too many things.
 
  


Reply

Tags
disk



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
unable to find disk space in root file system. manoj.linux Solaris / OpenSolaris 2 09-13-2013 06:35 AM
how to free the disk space for root file system in rhel4 bhaskar1967 Linux - Newbie 2 09-01-2013 01:41 PM
How do you locate superblocks in an unmounted disk image file? serutan Linux - General 1 02-07-2010 10:24 PM
File system root low disk space prickee Ubuntu 6 11-20-2009 04:06 AM
Large tar file taking huge disk space in ext3 file system pcwulf Linux - General 2 10-20-2003 07:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:10 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