Netsus help to expand hard drive

roiegat
Contributor III

So to start with I've checked out the following site:
https://derflounder.wordpress.com/2013/11/16/expanding-available-disk-space-on-jamfs-netsus-vm-appliance/

So we have two Netsus right now that are deployed and I want to resize their hard drives to 500 gb. One is in developement and one is in production. So I'll be testing on the development one. I've checked the settings on ESXi and they are allocated 500 gb each. Doing a DF -h shows they are currenyl using 300 gb.

In step 5 of the directions at the bottom of how to do it on the console itself it says to use the commmand "sudo vgdisplay" to show free space. But when I do it both on the developement and production, it doesn't show any free space. So I can't really continue with these steps.

I have access to both appliances from the vSphere side, so besides checking that 500 was allocoated, not sure if I can resize it within vSphere itself. Any advice would be great.

Thanks.

10 REPLIES 10

Snickasaurus
Contributor

Just a thought. I stopped trying to do the expand and started attaching a secondary virtual drive to the VM and moved my updates folder to it. This way if the NetSUS becomes corrupt due to an update or change to the system files by an admin you don't have to pull down the updates again when you create a new NetSUS applicance. Or if upgrading the NetSUS to another OS (ex: from Ubuntu Server to CentOS or Redhat) you can just attach the secondary VM drive to the new appliance and move on with your day. (there are some settings files of course that have to point to that drive to make things work but it's pretty easy)

roiegat
Contributor III

Not a bad idea actually. Since were using it as a DP as well, I could create a VM drive just for the DP part and use the main drive for SUS and netboot.

So for those who are fairly new to Vsphere, how would I create a new VM drive?

On the ESXi the 500 gb is provisioned as thick so am I able to split that up at all? Ideally I could use 150 gb for the DP.

davidacland
Honored Contributor II
Honored Contributor II

I haven't tried shrinking an existing disk unfortunately. You'll need to make sure the linux OS disk is reduced in size first otherwise that will cause a problem.

I do go for a separate disk if any clients want to run SUS on the appliance. Otherwise the SUS will fill the boot disk and the system won't boot.

Snickasaurus
Contributor

I'll look when I get home for the notes I wrote when I did a hard drive resize on my NetSUS then post them this evening or tonight.

roiegat
Contributor III

That would be awesome @Snickasaurus ...looking foward to it.

Snickasaurus
Contributor

@roiegat I'm looking now. So far I've went through my entire dropbox and it's not where my other docs are. I'm beginning to get worried for both our sakes because it took many tries to get it perfect and I document everything I do. For some reason that file is missing. The only thing I've found is a note I made about the lvextend command...which is one you will be using.

Edit: I recommend downloading the GParted iso so you can boot to it instead of your NetSUS. This, for me, made most of this task a bit easier.

Snickasaurus
Contributor

@roiegat I'm sorry to say (for the both of us) I apparently no longer have my documentation. This really makes me quite sad due to the work I remember putting into it.

From what I remember (this is my instructions for my home NetSUS):

  1. In VMWare Fusion it added the proper amount of disk space I wanted
  2. Attached the GParted iso to the VM and changed the boot order to point to the iso
  3. Resized the partition of the VM and shutdown to remove the iso and change boot order
  4. Within the linux CLI I ran the correct "lvextend" commands to grow the partition to the size disk I changed in VMware Fusion.

My apologies I couldn't be of more help. I'm heading out of town for a birthday party about an hour away but this evening when I return I'll keep looking for that document.

roiegat
Contributor III

@Snickasaurus Thanks for your help. I seem to have run into an issue with Gparted. Following the directions in the link above, I boot up from Gparted and it see's my drives. But the drives are locked (indicating they are mounted). I tried the umount command and it says they aren't there. I did a search and found that I need to use LVscan and LVremove to unmount them. That worked fine. I was able to resize it like the link above said...but then when I reboot it can't find the /dev/mapper/NetSUS-root and doesn't boot up. So I think I'm missing a step here. Hopefully some linux guru can jump in and help.

Snickasaurus
Contributor

@roiegat Truly sorry you're having difficulties. It seems Grub2 might be corrupt (really hope a better nix person will chime in) but you could try repairing it.

roiegat
Contributor III

@Snickasaurus So finally got it working. The things is the fix really isn't consistent in any manner. Basically I had to do the following:
1. Boot Up in Gparted
2. Select the /dev/mapper/NetSUSLP--vg-root partitition and right click and selected deactivate. NOTICE: This step took repeating like 3-6 times before it actually did it. You can tell when it did when the locks don't appear anymore.
3) Selected the /dev/sda2 drive and resized it to the full size. Clicked apply. Locks should re-appear after you click apply, if they don't - hope you had a snapshot to go back to .
4) Resized the /dev/mapper/NetSUSLP--vg-root parition. Click apply.

Then reboot and do the rest of the commands in the original article.

So got it working now....so I'm not so worried about the massive amount of gigabytes that the software updates take.

Thanks for the moral support guys!