PDA

View Full Version : increasing disk size after increasing virtual disk



KeN Etter
25-Oct-2012, 14:32
ZCM 11 Appliance which runs on SLES 11. The appliance is installed on
VMWare 4. When I installed it, I created a second virtual disk for
/var/opt/novell/zenworks. I need to increase that disk now.
(Unfortunately, I don't have enough room to just create a newer larger
one and move everything over). I know how to increase the virtual
disk from the Vsphere client. But how do I tell SLES to expand that
disk to use the added space?

Thanks,
Ken

jmozdzen
25-Oct-2012, 15:27
Hi Ken,

as always, it depends.

You may need to restart the VM in order to pick up the new size of the virtual disk.

If the complete disk was used for the file system (without partition table), then depending on the type of file system in use, YaST may be able to simply expand the FS to the new physical disk size.

If you use a single partition on that disk, you'll need to extend the size of that partition (can YaST do that for you? I don't know, it's been ages I dealt with partition-based file systems :[ ) and after that, use YaST to resize the file system to the new size of the underlying partition.

If you're using LVM,...

If...

...

We'd need more details to be specific.

Regards,
Jens

KeN Etter
25-Oct-2012, 15:51
On Thu, 25 Oct 2012 14:34:02 GMT, jmozdzen
<jmozdzen@no-mx.forums.suse.com> wrote:

>
>Hi Ken,
>
>as always, it depends.
>
>You may need to restart the VM in order to pick up the new size of the
>virtual disk.
>
>If the complete disk was used for the file system (without partition
>table), then depending on the type of file system in use, YaST may be
>able to simply expand the FS to the new physical disk size.
>
>If you use a single partition on that disk, you'll need to extend the
>size of that partition (can YaST do that for you? I don't know, it's
>been ages I dealt with partition-based file systems :[ ) and after that,
>use YaST to resize the file system to the new size of the underlying
>partition.
>
>If you're using LVM,...
>
>If...
>
>...
>
>We'd need more details to be specific.

Sorry, I was a bit vague. I'm still learning Linux, so please bear
with me.

The ZCM appliance installation crated a 65 GB disk. I created a
second virtual disk for it and rebooted so it was available. Then in
Yast Expert Partitioner, I selected the newly created disk and on the
partition tab, selected Add, Primary partition, used the entire disk
and formated it with Ext3.

So if I expand the virtual disk, can I just expand that primary
partition or what steps do I take?

Thanks for the help!
Ken

jmozdzen
25-Oct-2012, 16:25
Hi Ken,

yes, you're basically right. Changing the size of a partition requires rereading the partition table by the kernel, which AFAIK can only be done when there are no mounted partitions etc on the disk.

So you'd basically stop all services using that file system (or go into single user mode, if that's easier to handle), umount the file system, resize the partition, resize the file system, mount the partition, restart the services. Partition and file system modification can be done with YaST, AFAICT.

Regards,
Jens

KeN Etter
25-Oct-2012, 20:27
On Thu, 25 Oct 2012 15:34:01 GMT, jmozdzen
<jmozdzen@no-mx.forums.suse.com> wrote:

>
>Hi Ken,
>
>yes, you're basically right. Changing the size of a partition requires
>rereading the partition table by the kernel, which AFAIK can only be
>done when there are no mounted partitions etc on the disk.
>
>So you'd basically stop all services using that file system (or go into
>single user mode, if that's easier to handle), umount the file system,
>resize the partition, resize the file system, mount the partition,
>restart the services. Partition and file system modification can be done
>with YaST, AFAICT.
>
>Regards,
>Jens

Thanks! I'll give it a shot.

Regards,
Ken

KeN Etter
26-Oct-2012, 13:34
On Thu, 25 Oct 2012 15:34:01 GMT, jmozdzen
<jmozdzen@no-mx.forums.suse.com> wrote:

>yes, you're basically right. Changing the size of a partition requires
>rereading the partition table by the kernel, which AFAIK can only be
>done when there are no mounted partitions etc on the disk.

Jens,

Everything worked great. I shutdown the ZCM services, expanded the
virtual disk from my vSphere client, and then expanded the drive in
SLES. To do the steps in SLES, I used
http://www.howtoforge.com/linux_resizing_ext3_partitions_p2 with a few
modifications.

Thanks for the pointers.

Regards,
Ken

jmozdzen
26-Oct-2012, 19:47
Hi Ken,

good to know it worked for you, and thanks for the feedback - that's the kind of response we forumers feed on ;)

Regards,
Jens