LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 08-03-2005, 07:07 PM   #1
taiwf
Member
 
Registered: Jun 2005
Distribution: debian, ubuntu, redhat,knoppix
Posts: 194

Rep: Reputation: 31
how to umount /


i accidently mount a remote drive onto / which is mount by dev/sda locally as well. I try to umount the remote drive but then got 3 lines of device busy.

Is there anyway to umount WITHOUT restart linux server?

ps: the remote drive is in NT machine

thanks in advance.
 
Old 08-03-2005, 07:22 PM   #2
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
You have a few options for umount. Try the -l ( Thats a lower case L ) for lazy umount and -f for force. See what happens

Brian1
 
Old 08-03-2005, 07:34 PM   #3
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 270Reputation: 270Reputation: 270
umount the actual share name, not where you mounted it to..

If you try to run 'umount /' it's going to give you the resource busy each and every time.
 
Old 08-04-2005, 12:38 AM   #4
taiwf
Member
 
Registered: Jun 2005
Distribution: debian, ubuntu, redhat,knoppix
Posts: 194

Original Poster
Rep: Reputation: 31
the NT drive mounted onto / is backups. I try to umount //file-share/backups and it said


umount: //file-share/backups: not found
umount: /: not mounted
umount: /dev/sda1: not mounted
umount: //file-share/backups: not found
umount: /: not mounted
 
Old 08-04-2005, 10:07 AM   #5
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 270Reputation: 270Reputation: 270
Quote:
Originally posted by taiwf
the NT drive mounted onto / is backups. I try to umount //file-share/backups and it said


umount: //file-share/backups: not found
umount: /: not mounted
umount: /dev/sda1: not mounted
umount: //file-share/backups: not found
umount: /: not mounted
What is the output of mount?
 
Old 08-04-2005, 12:18 PM   #6
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092
Blog Entries: 1

Rep: Reputation: 90
I think you should print the output of

Code:
mount
 
Old 08-04-2005, 12:24 PM   #7
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 270Reputation: 270Reputation: 270
Quote:
Originally posted by eantoranz
I think you should print the output of

Code:
mount
I asked the same thing about two hours prior, didn't you read my last post?
 
Old 08-04-2005, 12:29 PM   #8
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092
Blog Entries: 1

Rep: Reputation: 90
You're righ. Let's wait for the little grass-hopper to wake up! ;-)
 
Old 08-04-2005, 09:32 PM   #9
taiwf
Member
 
Registered: Jun 2005
Distribution: debian, ubuntu, redhat,knoppix
Posts: 194

Original Poster
Rep: Reputation: 31
the output of mount is

/dev/sda1 81G 71G 5.9G 93% /
tmpfs 441M 0 441M 0% /dev/shm
/dev/sdb1 xxxxx xxxxx
//file-share/backups xxx xxxx xxx /


the tmpfs drive not so sure .. coz i just reboot today coz sth bad happen... But i still like to know the proper umount way...


Last edited by taiwf; 08-04-2005 at 09:37 PM.
 
Old 08-04-2005, 10:36 PM   #10
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092
Blog Entries: 1

Rep: Reputation: 90
I don't find any sense in that mount output. I'm gonna use mine as an example:

Code:
/dev/ide/host0/bus0/target0/lun0/part1 on / type ext3 (rw,noatime)
none on /proc type proc (rw)
none on /proc/bus/usb type usbdevfs (rw)
none on /dev type devfs (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,mode=0620)
/dev/ide/host0/bus0/target0/lun0/part8 on /home type ext3 (rw,noatime)
/dev/ide/host0/bus0/target0/lun0/part9 on /mnt/datos type vfat (rw,uid=501,umask=0022,iocharset=iso8859-1,codepage=850)
/dev/ide/host0/bus0/target0/lun0/part3 on /mnt/xp type vfat (rw,umask=0)
none on /tmp type tmpfs (rw)
/dev/ide/host0/bus0/target0/lun0/part6 on /usr type ext3 (rw,noatime)
/dev/ide/host0/bus0/target0/lun0/part7 on /var type ext3 (rw,noatime)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
You see? it tells you the device and the mount point.

If you wan't to unmount /var, then:

umount /var
 
Old 08-04-2005, 10:40 PM   #11
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092
Blog Entries: 1

Rep: Reputation: 90
But there's a problem. How are you gonna unmount the ROOT directory? I don't think that's possible, man.
 
Old 08-04-2005, 11:16 PM   #12
logosys
Member
 
Registered: Jul 2005
Location: Texas
Distribution: RHEL4 - ES
Posts: 178

Rep: Reputation: 31
Quote:
Originally posted by eantoranz
But there's a problem. How are you gonna unmount the ROOT directory? I don't think that's possible, man.
can you chroot to your new / directory, then unmount the device?
 
Old 08-05-2005, 12:51 AM   #13
taiwf
Member
 
Registered: Jun 2005
Distribution: debian, ubuntu, redhat,knoppix
Posts: 194

Original Poster
Rep: Reputation: 31
sorry i misunderstand... the lines about mount above was actually ones after i type df -h

the actual on look something similiar to this..

/dev/hda1 on / type ext2 (rw,errors=remount-ro)
proc on /proc type proc (rw)
//file-share/backups on / type smbfs (rw)
 
Old 08-05-2005, 01:40 AM   #14
taiwf
Member
 
Registered: Jun 2005
Distribution: debian, ubuntu, redhat,knoppix
Posts: 194

Original Poster
Rep: Reputation: 31
ok chroot really doesn't help...


mkdir -p /candy
cp -av /bin /dev /etc /home /lib /root /sbin /tmp /usr /var
chroot /candy su -

---------------------------------------

debian-dav://# umount /
umount: //file-share/backups: not found
umount: /: not mounted
umount: /dev/hda1: not mounted
debian-dav://# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda1 3.3G 1.3G 1.9G 41% /
df: `/proc': No such file or directory
//file-share/backups 3.3G 1.3G 1.9G 41% /

----------------------------------------

the disk still mounted on / . And the problem back to the origial point

And new issue, how the hell do i get back to the original root? (without reboot, or does reboot even 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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
umount cd in use provkitir Linux - Newbie 3 01-29-2005 08:09 PM
autofs won't umount. RoaCh Of DisCor Linux - Software 1 12-26-2004 07:58 AM
can't umount cdrom ust Linux - General 6 11-07-2003 02:28 AM
is it ok to use umount -l ? ewto Linux - General 5 10-21-2003 02:57 AM
cannot umount... ??? spyghost Linux - Software 9 09-06-2003 10:35 AM

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

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