LinuxQuestions.org
Review your favorite Linux distribution.
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 02-27-2009, 02:48 PM   #1
foampile
Member
 
Registered: Feb 2009
Posts: 50

Rep: Reputation: 15
Question problem with using parted on mounted partitions


ok, so this is the situation:
df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 9.9G 1.1G 8.3G 12% /
/dev/sda2 147G 188M 140G 1% /mnt
none 854M 0 854M 0% /dev/shm
i am trying to free up some from /dev/sda2 and allocate it to /dev/sda1.

so i go
parted /dev/sda2

GNU Parted 1.8.6
Using /dev/sda2
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: Unknown (unknown)
Disk /dev/sda2: 160GB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number Start End Size File system Flags
1 0.00B 160GB 160GB ext3
then i tried to shrink 1 by 12G:
(parted) resize 1 0 155189248
Error: Partition /dev/sda2p1 is being used. You must unmount it before you modify it with Parted.
ok, then i go out of parted to umount /dev/sda2, which succeeds.
df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 9.9G 1.1G 8.3G 12% /
none 854M 0 854M 0% /dev/shm
again, i go into parted BUT I GET THE SAME EXACT ERROR AS BEFORE umount /dev/sda2 (Error: Partition /dev/sda2p1 is being used. You must unmount it before you modify it with Parted.).

Last edited by foampile; 02-27-2009 at 03:01 PM.
 
Old 02-27-2009, 03:53 PM   #2
thorkelljarl
Senior Member
 
Registered: Jun 2008
Posts: 1,722

Rep: Reputation: 195Reputation: 195
You can not modify a mounted partition.

You must either unmount, or unmount in the process, a partition before making any changes to it. The usual method for getting around this is to use a Parted Magic live-cd or a copy of GPartedLiveCd..although there are partitioning tools that can be booted from a floppy disk or a USB stick.
 
Old 02-27-2009, 04:15 PM   #3
foampile
Member
 
Registered: Feb 2009
Posts: 50

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by thorkelljarl View Post
making any changes to it. The usual method for getting around this is to use a Parted Magic live-cd or a copy of GPartedLiveCd..although there are partitioning tools that can be booted from a floppy disk or a USB stick.
i do umount that partition but it still does not work.
 
Old 02-27-2009, 04:52 PM   #4
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,362

Rep: Reputation: 171Reputation: 171
You have to umount both partitions.
 
  


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
parted cannot see partitions on 2nd hard disk Gzou Linux - Hardware 4 01-23-2007 02:50 PM
e2fsck: root partitions and ro mounted partitions Clemente Linux - General 4 11-06-2006 09:32 PM
Resizing Partitions useing Parted/cfdisk/fdisk through Knoppix Dralnu Linux - Software 3 05-17-2006 03:33 PM
Help with Parted & Resizing Partitions beley Linux - Hardware 2 02-27-2004 11:42 PM
Parted and Partitions questions Mega Man X Linux - Software 2 09-21-2003 11:22 PM


All times are GMT -5. The time now is 10:46 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration