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 11-17-2006, 09:04 AM   #1
cnm
Member
 
Registered: Nov 2006
Distribution: RHEL 4
Posts: 34

Rep: Reputation: 15
how to find unmounted partition


I accidently unmounted a partition that I had created when installing Linux. How can I retreive it. doest that hard disk space remain unused.

is there a command to find free hard disk space not used for any partitions?

I should have mentioned this earlier. after unmounting I tried "mkfs -t ext3 /dev/hda19" where /dev/hda19 Label was /ext3Drive1

Last edited by cnm; 11-17-2006 at 10:49 PM.
 
Old 11-17-2006, 09:11 AM   #2
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
You can list the partitions on a device like this (example device is /dev/hda - the primary master IDE drive). Execute this command as root, or with sudo:
Code:
fdisk -l /dev/hda
On my machine, the output looks like this:
Code:
Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1        1816    14586988+  83  Linux
/dev/hda2            1817        7867    48604657+  83  Linux
/dev/hda3            7868        7992     1004062+  82  Linux swap / Solaris
/dev/hda4   *        7993        9729    13952452+  83  Linux
I can see that there are mountable partitions /dev/hda1, /dev/hda2 and /dev/hda4. (hda3 is a swap partition).
 
Old 11-17-2006, 09:39 AM   #3
alphy
LQ Newbie
 
Registered: Nov 2006
Posts: 16

Rep: Reputation: 0
Smile

Well,

you can use,
#sfdisk -s

to list all your partitions,then you use fdisk to list all your active partitions.

comparing these two o/p,you should be able to make an educated guess on the parition name that you had accidentaly umounted.

hope this info helps.

-Alphy
 
Old 11-17-2006, 02:41 PM   #4
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
Just login as root and run mount -a

That will mount all your partitions as specified in /etc/fstab. For those that are already mounted, nothing will happen. For the one that you accidently unmounted, it will be remounted.
 
Old 11-17-2006, 02:47 PM   #5
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
p.s. - It seems you might have some confusion about what "unmounting" means. It does not free up any disk space. Think of it like removing a floppy disk from your floppy drive (if you still have one of those things!) Sure, you can't use the floppy when it's not in the drive ("unmounted"), but there's no damage or major change to your system. When you need the floppy, just stick it back in the drive ("mount" it) and continue on. Mounting/unmounting is no big deal. It's done all the time.
 
Old 11-17-2006, 10:35 PM   #6
cnm
Member
 
Registered: Nov 2006
Distribution: RHEL 4
Posts: 34

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by alphy
Well,

you can use,
#sfdisk -s

to list all your partitions,then you use fdisk to list all your active partitions.

comparing these two o/p,you should be able to make an educated guess on the parition name that you had accidentaly umounted.

hope this info helps.

-Alphy
whta did you mean by "o/p"
 
Old 11-17-2006, 10:39 PM   #7
cnm
Member
 
Registered: Nov 2006
Distribution: RHEL 4
Posts: 34

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by haertig
p.s. - It seems you might have some confusion about what "unmounting" means. It does not free up any disk space. Think of it like removing a floppy disk from your floppy drive (if you still have one of those things!) Sure, you can't use the floppy when it's not in the drive ("unmounted"), but there's no damage or major change to your system. When you need the floppy, just stick it back in the drive ("mount" it) and continue on. Mounting/unmounting is no big deal. It's done all the time.

Great example.
 
Old 11-17-2006, 10:48 PM   #8
cnm
Member
 
Registered: Nov 2006
Distribution: RHEL 4
Posts: 34

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by haertig
Just login as root and run mount -a

That will mount all your partitions as specified in /etc/fstab. For those that are already mounted, nothing will happen. For the one that you accidently unmounted, it will be remounted.
Ok But then it says

mount: special Device LABEL=/ext3Drive1 does not exist
mount: special Device LABEL=/opt1 does not exist
mount: special Device /dev/hda18 does not exist


I should have mentioned this earlier. after unmounting I tried "mkfs -t ext3 /dev/hda19" where /dev/hda19 Label was /ext3Drive1
 
Old 11-18-2006, 12:34 AM   #9
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Quote:
Originally Posted by cnm
whta did you mean by "o/p"
Original poster, i.e. you.
 
Old 11-18-2006, 08:17 AM   #10
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
Quote:
Originally Posted by Nylex
Original poster, i.e. you.
Ah, I'd been wondering that too...
 
  


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
moved files to unmounted drive, cannot find now mrelectron Linux - Software 2 11-13-2006 06:11 PM
how to see unmounted partitions Vensan Linux - General 1 09-07-2006 01:41 AM
creating a directory in unmounted partition pgsmith Linux - Newbie 6 09-07-2005 07:31 PM
Cd-Rom Must Be Unmounted to Eject mooreted Slackware 2 04-06-2004 07:53 PM
help!!! error cleanly unmounted. adam_boz Linux - General 3 07-27-2002 11:37 PM

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

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