Resize Partition error

Hello,

I am trying to Resize my ext3 partition and I get the following message when trying to do so:

“The file system is currently mounts on /. It is not possible to resize the file system while it is mounted. Unmount the file system and retry resizing.”

Is there a way to add space to the partition without unmounting and if not, what would the process be to unmount and then re-size and then re-mount?

Thanks,
Andrew

[QUOTE=acshearer;58516]Hello,

I am trying to Resize my ext3 partition and I get the following message when trying to do so:

“The file system is currently mounts on /. It is not possible to resize the file system while it is mounted. Unmount the file system and retry resizing.”

Is there a way to add space to the partition without unmounting and if not, what would the process be to unmount and then re-size and then re-mount?

Thanks,
Andrew[/QUOTE]
Hi Andrew
All you need to do is boot from the install media in rescue mode (basically a live system) so all the partitions are unmounted, from here you can resize as required. What tools are you using?

Hello,

Thanks for the information. I am just trying to use Partitioner in Yast. I was hoping there was a way to do this without having to go into Rescue mode, but if that is the only way then that is what I will do.

Thanks,
Andrew

[QUOTE=acshearer;58520]Hello,

Thanks for the information. I am just trying to use Partitioner in Yast. I was hoping there was a way to do this without having to go into Rescue mode, but if that is the only way then that is what I will do.

Thanks,
Andrew[/QUOTE]
Hi Andrew
Well you could try an openSUSE Live version on USB?

[QUOTE=malcolmlewis;58525]Hi Andrew
Well you could try an openSUSE Live version on USB?[/QUOTE]

Extending LVM can be done live, but requires some additional info.

@author,
Please provide current pvs,vgs & lvs and which partition/disk you want to use to extend.

Hello,

Where would I go to find the pvs, vgs & lvs? I am somewhat new to Linux. I am in the Partitioner and am looking the hard disks and I see the device and the two partitions but I don’t see this info under there. If I click on Volume Management, nothing is in there.

Andrew

You need to get to the console/terminaland runthe following (won’t change anything):

pvs vgs lvs lsblk fdisk -l

Hello,

Here are the results from running those commands…

wy-gwise:~ # pvs
wy-gwise:~ # vgs
No volume groups found
wy-gwise:~ # lvs
No volume groups found
wy-gwise:~ # lsblk
NAME MAJ:MIN RM SIZE RO MOUNTPOINT
cciss!c0d0 104:0 0 683.5G 0
ââcciss!c0d0p1 104:1 0 2G 0 [SWAP]
ââcciss!c0d0p2 104:2 0 544.8G 0 /
sr0 11:0 1 1024M 0
wy-gwise:~ # fdisk -l

Disk /dev/cciss/c0d0: 733.9 GB, 733909245952 bytes
255 heads, 63 sectors/track, 89226 cylinders, total 1433416496 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0008f61b

       Device Boot      Start         End      Blocks   Id  System

/dev/cciss/c0d0p1 63 4209029 2104483+ 82 Linux swap / Solaris
/dev/cciss/c0d0p2 * 4209030 1146732543 571261757 83 Linux
wy-gwise:~ #

Thanks,
Andrew

It is partition 2 that I want to expand, sorry I did not include that.

Andrew

[QUOTE=acshearer;58557]Hello,

Here are the results from running those commands…

wy-gwise:~ # pvs
wy-gwise:~ # vgs
No volume groups found
wy-gwise:~ # lvs
No volume groups found
wy-gwise:~ # lsblk
NAME MAJ:MIN RM SIZE RO MOUNTPOINT
cciss!c0d0 104:0 0 683.5G 0
ââcciss!c0d0p1 104:1 0 2G 0 [SWAP]
ââcciss!c0d0p2 104:2 0 544.8G 0 /
sr0 11:0 1 1024M 0
wy-gwise:~ # fdisk -l

Disk /dev/cciss/c0d0: 733.9 GB, 733909245952 bytes
255 heads, 63 sectors/track, 89226 cylinders, total 1433416496 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0008f61b

       Device Boot      Start         End      Blocks   Id  System

/dev/cciss/c0d0p1 63 4209029 2104483+ 82 Linux swap / Solaris
/dev/cciss/c0d0p2 * 4209030 1146732543 571261757 83 Linux
wy-gwise:~ #

Thanks,
Andrew[/QUOTE]

OK , now I got what you want.
You need to:

  1. [Color=red] Backup ALL data, as the following step is quite dangerous if you
    make a mistake
    [/color]
  2. Run:
fdisk -l /dev/cciss/c0d0

Verify that partition table is old style ‘Dos’ and [color=red]not GPT[/color].

  1. Now delete partition 2 and recreate it in one step !
 fdisk /dev/cciss/c0d0 

Press ‘m’ for help.
Press ‘d’ and select second partition
Then press ‘n’ for new partition, ‘p’ for primary and select number ‘2’ for partition number.
Select start sector to be ‘4209030’ and end → just press ‘Enter’ for the end of the disk .

Last , but not least toggle the partition as bootable via ‘a’ flag.

Last print via ‘p’ and confirm that Second partition has same attributes as before , and only the END is higher number.
If anything differes - press ‘q’ to quit without any changes . If everything is the same and only the end is bigger - then press ‘w’ to write the changes.

  1. Run partprobe to try to redetect the bigger partition:
 partprobe  /dev/cciss/c0d0

Run either ‘lsblk’ or ‘fdisk -l’ and verify that the new partition has been redetected.
Otherwise reboot the system.

  1. Extend your filesystem.
    As you got ext3, you can use:
resize2fs /dev/cciss/c0d0p2

[Color=red]As you will work with storage , Proper backup is needed. It would be easier if you got LVM , as it is quite flexible in that matter.[/color]

Good Luck!