Opened 18 months ago

Last modified 18 months ago

#103 reopened defect

Upgrade CRIN4 to 2GB of RAM

Reported by: chris Owned by: chris
Priority: major Milestone: Maintenance
Component: crin4 Version:
Keywords: Cc: russell, peter
Estimated Number of Hours: 0 Add Hours to Ticket: 0
Billable?: yes Total Hours: 0.3

Description

Ticket to track the upgrading of Crin4 from 1GB to 2GB of RAM.

Change History (5)

comment:1 Changed 18 months ago by chris

  • Cc russell peter added

The server has been shutdown and restarted so the extra RAM is available:

free -h
             total       used       free     shared    buffers     cached
Mem:          2.0G       381M       1.6G        12M        18M       147M
-/+ buffers/cache:       215M       1.8G
Swap:         707M         0B       707M

And this should start to show up on Munin soon.

Looking at the disk, using fdisk we have:

Command (m for help): p
Disk /dev/sda: 32 GiB, 34359738368 bytes, 67108864 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
Disklabel type: dos
Disk identifier: 0xac596b78

Device     Boot  Start      End  Sectors  Size Id Type
/dev/sda1  *      2048   499711   497664  243M 83 Linux
/dev/sda2       501758 33552383 33050626 15.8G  5 Extended
/dev/sda5       501760 33552383 33050624 15.8G 8e Linux LVM

And using pvdisplay:

 pvdisplay 
  --- Physical volume ---
  PV Name               /dev/sda5
  VG Name               CRIN4-vg
  PV Size               15.76 GiB / not usable 2.00 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              4034
  Free PE               0
  Allocated PE          4034
  PV UUID               VkSyeC-iC5r-QTn9-fTwt-21fO-LFSo-m8pKML

And the results of vgdisplay:

  --- Volume group ---
  VG Name               CRIN4-vg
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  3
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               2
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               15.76 GiB
  PE Size               4.00 MiB
  Total PE              4034
  Alloc PE / Size       4034 / 15.76 GiB
  Free  PE / Size       0 / 0   
  VG UUID               nUqP0h-Ss5N-C2Nb-1WJQ-riUf-u5uB-naW2Le

And the advice from 1984.is is:

You first need to add a partition on the free space available to you after
you run it again. This is a good howto
https://www.turnkeylinux.org/blog/extending-lvm , just remember you are
working with a partition not a disk. When you have expanded the lvm volume
you need to expand the file system.

So I think we need to do the following

pvcreate /dev/sda2
vgextend /dev/CRIN4-vg /dev/sda2

But I'll run that past 1984.is before I do anything.

comment:2 Changed 18 months ago by chris

  • Add Hours to Ticket changed from 0 to 0.15
  • Total Hours set to 0.15

I have added a sudo account for 1984 so they can look at extending the root partition.

comment:3 Changed 18 months ago by chris

  • Add Hours to Ticket changed from 0 to 0.15
  • Total Hours changed from 0.15 to 0.3

The notes here were used for adding the account https://trac.crin.org.archived.website/trac/wiki/Crin4#sshaccess

The steps that 1984 followed:

 1  sudo fdisk -l /dev/sda
 2  sudo cfdisk /dev/sda
 3  sudo fdisk -l /dev/sda
 4  sudo partprobe /dev/sda
 5  sudo apt-cache search partprobe
 6  sudo apt-get install parted
 7  sudo partprobe /dev/sda
 8  sudo ls /dev/sda3
 9  sudo pvcreate /dev/sda3
10  sudo vgdisplay --columns
11  sudo vgextend CRIN4-vg /dev/sda3
12  sudo vgdisplay --columns
13  sudo lvdisplay
14  sudo lvextend -l 100%FREE /dev/CRIN4-vg/root
15  sudo vgdisplay --columns
16  sudo lvresize -l +100%FREE /dev/CRIN4-vg/root
17  mount 
18  sudo resize2fs /dev/CRIN4-vg/root 
19  df -hP

And the result:

df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/dm-0        31G  9.9G   20G  34% /
udev             10M     0   10M   0% /dev
tmpfs           402M   21M  382M   6% /run
tmpfs          1005M   92K 1005M   1% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs          1005M     0 1005M   0% /sys/fs/cgroup
/dev/sda1       236M   33M  191M  15% /boot

comment:4 Changed 18 months ago by chris

  • Resolution set to fixed
  • Status changed from new to closed

comment:5 Changed 18 months ago by russell

  • Resolution fixed deleted
  • Status changed from closed to reopened
Thanks Chris,

I'm going to set the big DB sync going now to get dev. in sync with live.

All the best,
Russell



On 17/03/2017 14:42, CRIN Trac wrote:
> #103: Upgrade CRIN4 to 2GB of RAM
> ------------------------------------+-----------------------------------
>                   Reporter:  chris   |                Owner:  chris
>                       Type:  defect  |               Status:  closed
>                   Priority:  major   |            Milestone:  Maintenance
>                  Component:  crin4   |              Version:
>                 Resolution:  fixed   |             Keywords:
> Estimated Number of Hours:  0       |  Add Hours to Ticket:  0
>                  Billable?:  1       |          Total Hours:  0.3
> ------------------------------------+-----------------------------------
> Changes (by chris):
>
>   * status:  new => closed
>   * resolution:   => fixed
>
>
> --
> Ticket URL: <https://trac.crin.org.archived.website/trac/ticket/103#comment:4>
> CRIN Trac <https://trac.crin.org.archived.website/trac>
> Trac project for CRIN website and servers.

Note: See TracTickets for help on using tickets.