LinuxQuestions.org
Visit Jeremy's Blog.
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 07-25-2013, 09:04 PM   #31
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,337

Rep: Reputation: 1408Reputation: 1408Reputation: 1408Reputation: 1408Reputation: 1408Reputation: 1408Reputation: 1408Reputation: 1408Reputation: 1408Reputation: 1408

Since you are planning to use this drive to backup your Ubuntu filesystem (or part of it) why not resize the ntfs partition and create a smaller (10GB) Linux (ext4) partition and format it and see how that works.
 
Old 07-25-2013, 09:19 PM   #32
NTH
LQ Newbie
 
Registered: Jul 2013
Posts: 23

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by yancek View Post
Since you are planning to use this drive to backup your Ubuntu filesystem (or part of it) why not resize the ntfs partition and create a smaller (10GB) Linux (ext4) partition and format it and see how that works.
Sounds good!. Is there a good guide on this that I can follow?
 
Old 07-25-2013, 09:20 PM   #33
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian
Posts: 2,208

Rep: Reputation: 341Reputation: 341Reputation: 341Reputation: 341
Not "echo $", "echo $?" ("echo space dollar question mark")

Code:
root@ubuntu:~# mount -t ntfs-3g /dev/sdc1 /mnt/external
root@ubuntu:~# echo $
$
 
Old 07-25-2013, 09:23 PM   #34
NTH
LQ Newbie
 
Registered: Jul 2013
Posts: 23

Original Poster
Rep: Reputation: Disabled
[QUOTE=haertig;4996866]Not "echo $", "echo $?" ("echo space dollar question mark")

Here it is:
Code:
root@ubuntu:~# mount -t ntfs-3g /dev/sdc1 /mnt/external
root@ubuntu:~# echo $?
2
So it says that mount has not been successful.
 
Old 07-25-2013, 09:26 PM   #35
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian
Posts: 2,208

Rep: Reputation: 341Reputation: 341Reputation: 341Reputation: 341
From the "man mount" command (scroll down to near the bottom of the output):

Quote:
RETURN CODES

mount has the following return codes (the bits can be ORed):

0 success

1 incorrect invocation or permissions

2 system error (out of memory, cannot fork, no more loop devices)

4 internal mount bug

8 user interrupt

16 problems writing or locking /etc/mtab

32 mount failure

64 some mount succeeded

 
Old 07-25-2013, 09:28 PM   #36
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian
Posts: 2,208

Rep: Reputation: 341Reputation: 341Reputation: 341Reputation: 341
Post the output of "vmstat 1 5"

And the output of "ps -ef | wc -l"
 
Old 07-25-2013, 09:31 PM   #37
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian
Posts: 2,208

Rep: Reputation: 341Reputation: 341Reputation: 341Reputation: 341
Post the output of "ls -al /dev/loop*"
 
Old 07-25-2013, 09:33 PM   #38
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian
Posts: 2,208

Rep: Reputation: 341Reputation: 341Reputation: 341Reputation: 341
Post the output of "losetup -a"
 
Old 07-25-2013, 11:56 PM   #39
NTH
LQ Newbie
 
Registered: Jul 2013
Posts: 23

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by haertig View Post
Post the output of "vmstat 1 5"

And the output of "ps -ef | wc -l"
Code:
root@ubuntu:~# vmstat 1 5
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa
 0  0      8 2852756 196368 2914292    0    0     4    10    6    0  3  0 97  0
 0  0      8 2852748 196376 2914284    0    0     0    36 2310 4334  0  0 100  0
 1  0      8 2852316 196376 2914292    0    0     0     0 2665 4724  0  0 100  0
 0  0      8 2852448 196376 2914304    0    0     0     0 2792 4327  0  0 100  0
 0  0      8 2852340 196376 2914364    0    0     0     0 2062 4342  0  0 100  0
Code:
root@ubuntu:~# ps -ef | wc -l
478
Code:
root@ubuntu:~# ls -al /dev/loop*
brw-rw---- 1 root disk 7, 0 Jul 22 17:44 /dev/loop0
brw-rw---- 1 root disk 7, 1 Jul 22 17:44 /dev/loop1
brw-rw---- 1 root disk 7, 2 Jul 22 17:44 /dev/loop2
brw-rw---- 1 root disk 7, 3 Jul 22 17:44 /dev/loop3
brw-rw---- 1 root disk 7, 4 Jul 22 17:44 /dev/loop4
brw-rw---- 1 root disk 7, 5 Jul 22 17:44 /dev/loop5
brw-rw---- 1 root disk 7, 6 Jul 22 17:44 /dev/loop6
brw-rw---- 1 root disk 7, 7 Jul 22 17:44 /dev/loop7
Code:
root@ubuntu:~# losetup -a
root@ubuntu:~#
From the output of "losetup -a" can I assume there are no loop devices? but "ls -al /dev/loop*" shows 7 loop devices.
 
Old 07-26-2013, 02:01 AM   #40
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian
Posts: 2,208

Rep: Reputation: 341Reputation: 341Reputation: 341Reputation: 341
(1) vmstat shows you have plenty of memory

(2) ps shows you don't have that many processes running (not enough to cause a fork error)

(3) ls shows you have eight loopback devices

(4) losetup shows you are not using any of those eight loopback devices.

Therefore, I have no idea why your mount command failed with an exit code saying the problem could be "out of memory", "cannot fork", or "no more loop devices". None of those suggested conditions exist on your system. I doubt this is an all-inclusive list of things that could cause mount to have an exit code of 2. But I don't personally know any other conditions that might cause that, I was just following what the manpage suggested. Maybe some Google searching might turn up other reasons for exit code 2. At this point, I don't have any more suggestions for you. Maybe someone else will, or I'll think of something later. If this is something that you must get fixed quickly, that might warrant a reboot of the system, just to see if that helps. But if it does, you will probably never figure out what the problem was. A reboot *may* fix it, but you would lose the ability to troubleshoot it any further. So I'd skip the reboot and keep troubleshooting myself, unless you really need to get this working quickly (if it's a production system at work, etc.)
 
1 members found this post helpful.
Old 07-26-2013, 02:04 AM   #41
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian
Posts: 2,208

Rep: Reputation: 341Reputation: 341Reputation: 341Reputation: 341
I mounted an iso on one of my loopback devices so you can see what losetup would return. The output below shows that I have eight loopbacks (same as you) and I am using one of those, leaving seven still available:

Code:
# ls -l /dev/loop*
brw-rw---- 1 root disk  7,   0 Jul 21 22:40 /dev/loop0
brw-rw---- 1 root disk  7,   1 Jul 22 01:26 /dev/loop1
brw-rw---- 1 root disk  7,   2 Jun 21 10:11 /dev/loop2
brw-rw---- 1 root disk  7,   3 Jun 13 08:55 /dev/loop3
brw-rw---- 1 root disk  7,   4 Jun 13 08:55 /dev/loop4
brw-rw---- 1 root disk  7,   5 Jun 13 08:55 /dev/loop5
brw-rw---- 1 root disk  7,   6 Jun 13 08:55 /dev/loop6
brw-rw---- 1 root disk  7,   7 Jun 13 08:55 /dev/loop7
crw------- 1 root root 10, 237 Jun 13 08:55 /dev/loop-control
# losetup -a
/dev/loop0: [0804]:22282243 (/media/Warcraft2BNE.iso)
#
 
Old 08-13-2013, 01:13 PM   #42
NTH
LQ Newbie
 
Registered: Jul 2013
Posts: 23

Original Poster
Rep: Reputation: Disabled
OK, I decided to go ahead with recommendations to change the filesystem. So I booted into live CD and noted that my external drive automounts in live CD with no issues. I then created an ext2 partition and that ext2 partition automounts in ubuntu with no problem. I am going to upgrade my ubuntu and hopefully that will fix the problem with NTFS filesystem as well. Thanks for all the help.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
External Hard Drive not Mounting beetleman64 Linux - Hardware 1 05-15-2010 11:02 AM
mounting external hard drive perrywillis@cox.net SUSE / openSUSE 5 10-16-2006 02:22 AM
mounting an external hard drive adin Linux - Hardware 1 01-04-2005 05:18 AM
external hard drive mounting. gonus Debian 5 08-27-2004 03:51 PM
external hard drive mounting blahJake Debian 3 04-02-2004 07:30 PM

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

All times are GMT -5. The time now is 03:40 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration