Rabu, 24 April 2019

How to change file size limit on JFS2 and user file size limit on AIX 6

  Tidak ada komentar
Check the user file size limit
bash-4.4# lsuser -a fsize root
root fsize=2097151
bash-4.4#
bash-4.4# ulimit -a
core file size          (blocks, -c) 1048575
data seg size           (kbytes, -d) 131072
file size               (blocks, -f) 1048575
max memory size         (kbytes, -m) 32768
open files                      (-n) 2000
pipe size            (512 bytes, -p) 64
stack size              (kbytes, -s) 32768
cpu time               (seconds, -t) unlimited
max user processes              (-u) unlimited
virtual memory          (kbytes, -v) unlimited
bash-4.4#
bash-4.4# ulimit -f 104857500
bash-4.4#
bash-4.4# ulimit -a
core file size          (blocks, -c) 1048575
data seg size           (kbytes, -d) 131072
file size               (blocks, -f) 104857500
max memory size         (kbytes, -m) 32768
open files                      (-n) 2000
pipe size            (512 bytes, -p) 64
stack size              (kbytes, -s) 32768
cpu time               (seconds, -t) unlimited
max user processes              (-u) unlimited
virtual memory          (kbytes, -v) unlimited
bash-4.4#
bash-4.4# lsuser -a fsize root
root fsize=2097151
bash-4.4#
bash-4.4#
bash-4.4# lsuser -help
lsuser: Not a recognized flag: h
Usage: lsuser [-R load_module] [ -c | -C | -f ] [ -a attr attr ... ] { "ALL" | user1,user2 ... }
bash-4.4#
bash-4.4# vi /etc/security/limits
bash-4.4#
bash-4.4# cat /etc/security/limits

*
* Sizes are in multiples of 512 byte blocks, CPU time is in seconds
*
* fsize      - soft file size in blocks
* core       - soft core file size in blocks
* cpu        - soft per process CPU time limit in seconds
* data       - soft data segment size in blocks
* stack      - soft stack segment size in blocks
* rss        - soft real memory usage in blocks
* nofiles    - soft file descriptor limit
* fsize_hard - hard file size in blocks
* core_hard  - hard core file size in blocks
* cpu_hard   - hard per process CPU time limit in seconds
* data_hard  - hard data segment size in blocks
* stack_hard - hard stack segment size in blocks
* rss_hard   - hard real memory usage in blocks
* nofiles_hard - hard file descriptor limit
*
* The following table contains the default hard values if the
* hard values are not explicitly defined:
*
*   Attribute        Value
*   ==========    ============
*   fsize_hard    set to fsize
*   cpu_hard      set to cpu
*   core_hard         -1
*   data_hard         -1
*   stack_hard      8388608
*   rss_hard          -1
*   nofiles_hard      -1
*
* NOTE:  A value of -1 implies "unlimited"
*

default:
        fsize = 209715100
        core = 2097151
        cpu = -1
        data = 262144
        rss = 65536
        stack = 65536
        nofiles = 2000

root:

daemon:

bin:

sys:

adm:

uucp:

guest:

nobody:

lpd:

pconsole:
        stack_hard = 131072
        data = 1280000
        data_hard = 1280000

esaadmin:
        stack = 393216
        stack_hard = 393216
bash-4.4#
bash-4.4# lsuser -a fsize root
root fsize=209715100
bash-4.4#
bash-4.4#

How to install epel-release and centos allarch on Redhat 7.3 ppc

  Tidak ada komentar
Change working directory to /tmp and download the epel-release package
[root@myhost ~]# cd /tmp
[root@myhost tmp]# ls
anaconda.log                                      packaging.log
[root@myhost tmp]#
[root@myhost tmp]# wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
--2019-04-24 16:35:25--  https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Resolving dl.fedoraproject.org (dl.fedoraproject.org)... 209.132.181.23, 209.132.181.24
Connecting to dl.fedoraproject.org (dl.fedoraproject.org)|209.132.181.23|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 15080 (15K) [application/x-rpm]
Saving to: ‘epel-release-latest-7.noarch.rpm.1’

100%[============================================================================================>] 15,080      70.9KB/s   in 0.2s

2019-04-24 16:35:26 (70.9 KB/s) - ‘epel-release-latest-7.noarch.rpm.1’ saved [15080/15080]

[root@myhost tmp]#

Install the epel-release package

[root@myhost tmp]# ls
anaconda.log                                      
epel-release-latest-7.noarch.rpm                  packaging.log
[root@myhost tmp]#
[root@myhost tmp]# rpm -ivh epel-release-latest-7.noarch.rpm
warning: epel-release-latest-7.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:epel-release-7-11                ################################# [100%]
[root@myhost tmp]#
Create repo named centos with following content


[root@myhost tmp]# vi /etc/yum.repos.d/centos.repo
[root@myhost tmp]# cat /etc/yum.repos.d/centos.repo
[Centos]
name=CentOS $releasever – $basearch
baseurl=http://mirror.centos.org/altarch/7.6.1810/os/ppc64le/$basearch/
baseurl=http://mirror.centos.org/altarch/7/os/$basearch/
enabled=1
gpgcheck=1
http://mirror.centos.org/altarch/7.6.1810/os/ppc64le/RPM-GPG-KEY-CentOS-SIG-AltArch-7-ppc64le
[root@myhost tmp]#
[root@myhost tmp]#
Check repo list



[root@myhost tmp]# yum repolist all
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
repo id                                  repo name                                                                     status
Centos/ppc64le                           CentOS 7Server – ppc64le                                                      enabled:  7,477
epel/ppc64le                             Extra Packages for Enterprise Linux 7 - ppc64le                               enabled: 12,496
epel-debuginfo/ppc64le                   Extra Packages for Enterprise Linux 7 - ppc64le - Debug                       disabled
epel-source/ppc64le                      Extra Packages for Enterprise Linux 7 - ppc64le - Source                      disabled
epel-testing/ppc64le                     Extra Packages for Enterprise Linux 7 - Testing - ppc64le                     disabled    
epel-testing-debuginfo/ppc64le           Extra Packages for Enterprise Linux 7 - Testing - ppc64le - Debug             disabled
epel-testing-source/ppc64le              Extra Packages for Enterprise Linux 7 - Testing - ppc64le - Source            disabled
repolist: 20,635
[root@myhost tmp]#
Perform installation of a package with yum




[root@myhost tmp]# yum install xinetd
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Centos                                                                                                         | 3.6 kB  00:00:00
Resolving Dependencies
--> Running transaction check
---> Package xinetd.ppc64le 2:2.3.15-13.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

======================================================================================================================================
 Package                      Arch                          Version                                Repository                    Size
======================================================================================================================================
Installing:
 xinetd                       ppc64le                       2:2.3.15-13.el7                        Centos                       129 k

Transaction Summary
======================================================================================================================================
Install  1 Package

Total size: 129 k
Installed size: 349 k
Is this ok [y/d/N]: y
Downloading packages:
warning: /var/cache/yum/ppc64le/7Server/Centos/packages/xinetd-2.3.15-13.el7.ppc64le.rpm: Header V4 RSA/SHA1 Signature, key ID f533f4fa: NOKEY
Retrieving key from http://mirror.centos.org/altarch/7.6.1810/os/ppc64le/RPM-GPG-KEY-CentOS-SIG-AltArch-7-ppc64le
Importing GPG key 0xF533F4FA:
 Userid     : "CentOS AltArch SIG - PowerPC (https://wiki.centos.org/SpecialInterestGroup/AltArch) <[email protected]>"
 Fingerprint: bafa 3436 fc50 768e 3c3c 2e4e a963 bbdb f533 f4fa
 From       : http://mirror.centos.org/altarch/7.6.1810/os/ppc64le/RPM-GPG-KEY-CentOS-SIG-AltArch-7-ppc64le
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
  Installing : 2:xinetd-2.3.15-13.el7.ppc64le                                                                                     1/1
  Verifying  : 2:xinetd-2.3.15-13.el7.ppc64le                                                                                     1/1

Installed:
  xinetd.ppc64le 2:2.3.15-13.el7

Complete!
[root@myhost tmp]#

How to extend physical volume disk mapper root

  Tidak ada komentar
Check the disk block
[root@myhost ~]# lsblk
NAME          MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda             8:0    0  50G  0 disk
├─sda1          8:1    0   4M  0 part
├─sda2          8:2    0   1G  0 part /boot
└─sda3          8:3    0  49G  0 part
  ├─rhel-root 253:0    0  44G  0 lvm  /
  └─rhel-swap 253:1    0   4G  0 lvm  [SWAP]
sr0            11:0    1   3G  0 rom
[root@myhost ~]#
[root@myhost ~]#
Check disk size
[root@myhost ~]# df -h
Filesystem             Size  Used Avail Use% Mounted on
/dev/mapper/rhel-root   17G  4.3G   13G  26% /
devtmpfs               7.5G     0  7.5G   0% /dev
tmpfs                  7.5G     0  7.5G   0% /dev/shm
tmpfs                  7.5G   18M  7.5G   1% /run
tmpfs                  7.5G     0  7.5G   0% /sys/fs/cgroup
/dev/sda2             1014M  198M  817M  20% /boot
tmpfs                  1.5G     0  1.5G   0% /run/user/0
[root@myhost ~]#
Check disk mapper
[root@myhost ~]# fdisk -l

Disk /dev/sda: 53.7 GB, 53687091200 bytes, 104857600 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 label type: dos
Disk identifier: 0x000ab94b

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048       10239        4096   41  PPC PReP Boot
/dev/sda2           10240     2107391     1048576   83  Linux
/dev/sda3         2107392   104857599    51375104   8e  Linux LVM

Disk /dev/mapper/rhel-root: 47.2 GB, 47236251648 bytes, 92258304 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 /dev/mapper/rhel-swap: 4294 MB, 4294967296 bytes, 8388608 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

[root@myhost ~]#
Check the logical volume
[root@myhost ~]# lvs
  LV   VG   Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  root rhel -wi-ao---- 43.99g
  swap rhel -wi-ao----  4.00g
[root@myhost bin]# pvs
  PV         VG   Fmt  Attr PSize  PFree
  /dev/sda3  rhel lvm2 a--  48.99g 1.00g
[root@myhost bin]#
[root@myhost bin]# xfs_growfs /dev/rhel/root
meta-data=/dev/mapper/rhel-root  isize=512    agcount=4, agsize=1113600 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=0 spinodes=0
data     =                       bsize=4096   blocks=4454400, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
log      =internal               bsize=4096   blocks=2560, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
data blocks changed from 4454400 to 11532288
[root@myhost ~]#
Check the disk size again
[root@myhost ~]# df -h
Filesystem             Size  Used Avail Use% Mounted on
/dev/mapper/rhel-root   44G  5.6G   39G  13% /
devtmpfs               7.5G     0  7.5G   0% /dev
tmpfs                  7.5G     0  7.5G   0% /dev/shm
tmpfs                  7.5G   18M  7.5G   1% /run
tmpfs                  7.5G     0  7.5G   0% /sys/fs/cgroup
/dev/sda2             1014M  198M  817M  20% /boot
tmpfs                  1.5G     0  1.5G   0% /run/user/0
[root@myhost ~]#

How to install apache tomcat on Redhat PPC 7.3

  Tidak ada komentar
Change directory to opt and extract the installer file
[root@myhost ~]# cd /opt/
[root@myhost opt]# ls
apache-tomcat-7.0.86.tar.gz  rh
[root@myhost opt]#
[root@myhost opt]# tar -xzf apache-tomcat-7.0.86.tar.gz
[root@myhost opt]#
[root@myhost opt]# ls
apache-tomcat-7.0.86  apache-tomcat-7.0.86.tar.gz  rh
[root@myhost opt]#
Change directory to apache tomcat
[root@myhost opt]# cd apache-tomcat-7.0.86/
[root@myhost apache-tomcat-7.0.86]#
[root@myhost apache-tomcat-7.0.86]# ls
bin  conf  lib  LICENSE  logs  NOTICE  RELEASE-NOTES  RUNNING.txt  temp  webapps  work
[root@myhost apache-tomcat-7.0.86]#
[root@myhost apache-tomcat-7.0.86]# cd bin/
[root@myhost bin]# ls
bootstrap.jar       commons-daemon.jar            daemon.sh         setclasspath.sh  startup.sh            tool-wrapper.sh
catalina.bat        commons-daemon-native.tar.gz  digest.bat        shutdown.bat     tomcat-juli.jar       version.bat
catalina.sh         configtest.bat                digest.sh         shutdown.sh      tomcat-native.tar.gz  version.sh
catalina-tasks.xml  configtest.sh                 setclasspath.bat  startup.bat      tool-wrapper.bat
[root@myhost bin]#

Check the selinux status
[root@myhost bin]# sestatus
SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   enforcing
Mode from config file:          enforcing
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Max kernel policy version:      28
[root@myhost bin]#


Disable the selinux
[root@myhost bin]# setenforce 0
[root@myhost bin]#
[root@myhost bin]# sestatus
SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   permissive
Mode from config file:          enforcing
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Max kernel policy version:      28
[root@myhost bin]#



Start the tomcat
[root@myhost bin]# ./startup.sh
Using CATALINA_BASE:   /opt/apache-tomcat-7.0.86
Using CATALINA_HOME:   /opt/apache-tomcat-7.0.86
Using CATALINA_TMPDIR: /opt/apache-tomcat-7.0.86/temp
Using JRE_HOME:        /usr
Using CLASSPATH:       /opt/apache-tomcat-7.0.86/bin/bootstrap.jar:/opt/apache-tomcat-7.0.86/bin/tomcat-juli.jar
Tomcat started.
[root@myhost bin]#
[root@myhost bin]# netstat -ant
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN
tcp        0      0 192.168.72.61:22        192.168.72.234:30930    ESTABLISHED
tcp        0     64 192.168.72.61:22        192.168.72.234:31762    ESTABLISHED
tcp        0      0 192.168.72.61:22        192.168.72.234:50764    ESTABLISHED
tcp        0      0 192.168.72.61:22        192.168.72.234:55573    ESTABLISHED
tcp        0      0 192.168.72.61:22        192.168.72.234:57338    ESTABLISHED
tcp        0      0 192.168.72.61:22        192.168.72.234:51059    ESTABLISHED
tcp6       0      0 127.0.0.1:8005          :::*                    LISTEN
tcp6       0      0 :::8009                 :::*                    LISTEN
tcp6       0      0 :::111                  :::*                    LISTEN
tcp6       0      0 :::8080                 :::*                    LISTEN
tcp6       0      0 :::22                   :::*                    LISTEN
tcp6       0      0 ::1:631                 :::*                    LISTEN
tcp6       0      0 ::1:25                  :::*                    LISTEN
tcp6       0      0 :::44127                :::*                    LISTEN
[root@myhost bin]#



Curl the port
[root@myhost bin]# curl localhost:8080

<!DOCTYPE html>


<html lang="en">
    <head>
        <title>Apache Tomcat/7.0.86</title>
        <link href="favicon.ico" rel="icon" type="image/x-icon" />
        <link href="favicon.ico" rel="shortcut icon" type="image/x-icon" />
        <link href="tomcat.css" rel="stylesheet" type="text/css" />
    </head>

    <body>
        <div id="wrapper">
            <div id="navigation" class="curved container">
                <span id="nav-home"><a href="http://tomcat.apache.org/">Home</a></span>
                <span id="nav-hosts"><a href="/docs/">Documentation</a></span>
                <span id="nav-config"><a href="/docs/config/">Configuration</a></span>
                <span id="nav-examples"><a href="/examples/">Examples</a></span>
                <span id="nav-wiki"><a href="http://wiki.apache.org/tomcat/FrontPage">Wiki</a></span>
                <span id="nav-lists"><a href="http://tomcat.apache.org/lists.html">Mailing Lists</a></span>
                <span id="nav-help"><a href="http://tomcat.apache.org/findhelp.html">Find Help</a></span>
                <br class="separator" />
            </div>
            <div id="asf-box">


How to resize swap disk redhat 7.3 lvm

  Tidak ada komentar
Before we resize the swap partition, resize the swap lvm first, make sure you have enough volume group
[root@myhost ~]# pvscan
  PV /dev/sda3   VG rhel            lvm2 [18.99 GiB / 0    free]
  Total: 1 [18.99 GiB] / in use: 1 [18.99 GiB] / in no VG: 0 [0   ]
[root@myhost ~]#
[root@myhost ~]# pvresize /dev/sda3
  Physical volume "/dev/sda3" changed
  1 physical volume(s) resized / 0 physical volume(s) not resized
[root@myhost ~]#
[root@myhost ~]# pvs
  PV         VG   Fmt  Attr PSize  PFree
  /dev/sda3  rhel lvm2 a--  48.99g 30.00g
[root@myhost ~]#
[root@myhost ~]# lvs
  LV   VG   Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  root rhel -wi-ao---- 16.99g
  swap rhel -wi-ao----  2.00g
[root@myhost ~]#
Extend the lvm
[root@myhost ~]# lvextend -L +27G /dev/rhel/root
  Size of logical volume rhel/root changed from 16.99 GiB (4350 extents) to 43.99 GiB (11262 extents).
  Logical volume rhel/root successfully resized.
[root@myhost ~]#
[root@myhost ~]# lvextend -L +2G /dev/rhel/swap
  Size of logical volume rhel/swap changed from 2.00 GiB (512 extents) to 4.00 GiB (1024 extents).
  Logical volume rhel/swap successfully resized.
[root@myhost ~]#
[root@myhost ~]# lvs
  LV   VG   Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  root rhel -wi-ao---- 43.99g
  swap rhel -wi-ao----  4.00g
[root@myhost ~]#

Check the block disk
[root@myhost ~]# lsblk
NAME          MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda             8:0    0  50G  0 disk
├─sda1          8:1    0   4M  0 part
├─sda2          8:2    0   1G  0 part /boot
└─sda3          8:3    0  49G  0 part
  ├─rhel-root 253:0    0  44G  0 lvm  /
  └─rhel-swap 253:1    0   4G  0 lvm  [SWAP]
sr0            11:0    1   3G  0 rom
[root@myhost ~]#
Check the swap size
[root@myhost ~]# swapon -s
Filename                                Type            Size    Used    Priority
/dev/dm-1                               partition       2097088 0       -1
[root@myhost ~]#
Turn off the swap
[root@myhost ~]# swapoff -v /dev/rhel/swap
swapoff /dev/rhel/swap
[root@myhost ~]#
Make swap
[root@myhost ~]# mkswap /dev/rhel/swap
mkswap: /dev/rhel/swap: warning: wiping old swap signature.
Setting up swapspace version 1, size = 4194240 KiB
no label, UUID=07620b10-fc56-429f-a433-4caa67594d47
[root@myhost ~]#
Check the swap
[root@myhost ~]# swapon -va
swapon /dev/mapper/rhel-swap
swapon: /dev/mapper/rhel-swap: found swap signature: version 1, page-size 64, same byte order
swapon: /dev/mapper/rhel-swap: pagesize=65536, swapsize=4294967296, devsize=4294967296
[root@myhost ~]#
Check the swap size
[root@myhost ~]# swapon -s
Filename                                Type            Size    Used    Priority
/dev/dm-1                               partition       4194240 0       -1
[root@myhost ~]#

Selasa, 16 April 2019

How to extend disk size root partition on Suse Linux 11 SP 4

  Tidak ada komentar
Check the disk size
bpmdb:~ # df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda3       146G  140G  5.2G  97% /
udev             16G  1.2M   16G   1% /dev
tmpfs            16G  1.3M   16G   1% /dev/shm
/dev/sr0        3.3G  3.3G     0 100% /mountdisk
/dev/sr0        3.3G  3.3G     0 100% /cd0
/dev/sr0        3.3G  3.3G     0 100% /mnt/cdrom
/dev/sr1        5.1G  5.1G     0 100% /cd1
bpmdb:~ #
bpmdb:~ # fdisk -l

Disk /dev/sda: 161.1 GB, 161061273600 bytes
255 heads, 63 sectors/track, 19581 cylinders, total 314572800 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: 0xd4cf0800

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048        2854         403+  41  PPC PReP Boot
/dev/sda2          417792     4626431     2104320   82  Linux swap / Solaris
/dev/sda3         4626432   314572799   154973184   83  Linux
bpmdb:~ #
Check the block disk
bpmdb:~ # lsblk
NAME   MAJ:MIN RM   SIZE RO MOUNTPOINT
sda      8:0    0   150G  0
├─sda1   8:1    0 403.5K  0
├─sda2   8:2    0     2G  0 [SWAP]
└─sda3   8:3    0 147.8G  0 /
sr0     11:0    1   3.2G  0 /mountdisk
sr1     11:1    1     5G  0 /cd1
bpmdb:~ #
Extend the phisical disk size

Rescan the disk
bpmdb:~ # echo 1 > /sys/block/sda/device/rescan
bpmdb:~ #
bpmdb:~ # fdisk -l

Disk /dev/sda: 268.4 GB, 268435456000 bytes
255 heads, 63 sectors/track, 32635 cylinders, total 524288000 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: 0xd4cf0800

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048        2854         403+  41  PPC PReP Boot
/dev/sda2          417792     4626431     2104320   82  Linux swap / Solaris
/dev/sda3         4626432   314572799   154973184   83  Linux
bpmdb:~ #
Check the disk list
bpmdb:~ # fdisk -l

Disk /dev/sda: 268.4 GB, 268435456000 bytes
255 heads, 63 sectors/track, 32635 cylinders, total 524288000 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: 0xd4cf0800

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048        2854         403+  41  PPC PReP Boot
/dev/sda2          417792     4626431     2104320   82  Linux swap / Solaris
/dev/sda3         4626432   314572799   154973184   83  Linux
inaportnetbpmdb:~ #
inaportnetbpmdb:~ # fdisk /dev/sda

Command (m for help): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

Command (m for help):
Command (m for help): p

Disk /dev/sda: 268.4 GB, 268435456000 bytes
255 heads, 63 sectors/track, 32635 cylinders, total 524288000 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: 0xd4cf0800

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048        2854         403+  41  PPC PReP Boot
/dev/sda2          417792     4626431     2104320   82  Linux swap / Solaris
/dev/sda3         4626432   314572799   154973184   83  Linux

Command (m for help):
Command (m for help): d
Partition number (1-4): 3

Command (m for help): p

Disk /dev/sda: 268.4 GB, 268435456000 bytes
255 heads, 63 sectors/track, 32635 cylinders, total 524288000 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: 0xd4cf0800

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048        2854         403+  41  PPC PReP Boot
/dev/sda2          417792     4626431     2104320   82  Linux swap / Solaris

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4, default 3): 3
First sector (2855-524287999, default 2855): 4626432
Last sector, +sectors or +size{K,M,G} (4626432-524287999, default 524287999):
Using default value 524287999

Command (m for help): p

Disk /dev/sda: 268.4 GB, 268435456000 bytes
255 heads, 63 sectors/track, 32635 cylinders, total 524288000 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: 0xd4cf0800

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048        2854         403+  41  PPC PReP Boot
/dev/sda2          417792     4626431     2104320   82  Linux swap / Solaris
/dev/sda3         4626432   524287999   259830784   83  Linux

Command (m for help): t
Partition number (1-4): 3
Hex code (type L to list codes): L

 0  Empty           24  NEC DOS         81  Minix / old Lin bf  Solaris
 1  FAT12           27  Hidden NTFS Win 82  Linux swap / So c1  DRDOS/sec (FAT-
 2  XENIX root      39  Plan 9          83  Linux           c4  DRDOS/sec (FAT-
 3  XENIX usr       3c  PartitionMagic  84  OS/2 hidden C:  c6  DRDOS/sec (FAT-
 4  FAT16 <32M      40  Venix 80286     85  Linux extended  c7  Syrinx
 5  Extended        41  PPC PReP Boot   86  NTFS volume set da  Non-FS data
 6  FAT16           42  SFS             87  NTFS volume set db  CP/M / CTOS / .
 7  HPFS/NTFS/exFAT 4d  QNX4.x          88  Linux plaintext de  Dell Utility
 8  AIX             4e  QNX4.x 2nd part 8e  Linux LVM       df  BootIt
 9  AIX bootable    4f  QNX4.x 3rd part 93  Amoeba          e1  DOS access
 a  OS/2 Boot Manag 50  OnTrack DM      94  Amoeba BBT      e3  DOS R/O
 b  W95 FAT32       51  OnTrack DM6 Aux 9f  BSD/OS          e4  SpeedStor
 c  W95 FAT32 (LBA) 52  CP/M            a0  IBM Thinkpad hi eb  BeOS fs
 e  W95 FAT16 (LBA) 53  OnTrack DM6 Aux a5  FreeBSD         ee  GPT
 f  W95 Ext'd (LBA) 54  OnTrackDM6      a6  OpenBSD         ef  EFI (FAT-12/16/
10  OPUS            55  EZ-Drive        a7  NeXTSTEP        f0  Linux/PA-RISC b
11  Hidden FAT12    56  Golden Bow      a8  Darwin UFS      f1  SpeedStor
12  Compaq diagnost 5c  Priam Edisk     a9  NetBSD          f4  SpeedStor
14  Hidden FAT16 <3 61  SpeedStor       ab  Darwin boot     f2  DOS secondary
16  Hidden FAT16    63  GNU HURD or Sys af  HFS / HFS+      fb  VMware VMFS
17  Hidden HPFS/NTF 64  Novell Netware  b7  BSDI fs         fc  VMware VMKCORE
18  AST SmartSleep  65  Novell Netware  b8  BSDI swap       fd  Linux raid auto
1b  Hidden W95 FAT3 70  DiskSecure Mult bb  Boot Wizard hid fe  LANstep
1c  Hidden W95 FAT3 75  PC/IX           be  Solaris boot    ff  BBT
1e  Hidden W95 FAT1 80  Old Minix
Hex code (type L to list codes): 83

Command (m for help): p

Disk /dev/sda: 268.4 GB, 268435456000 bytes
255 heads, 63 sectors/track, 32635 cylinders, total 524288000 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: 0xd4cf0800

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048        2854         403+  41  PPC PReP Boot
/dev/sda2          417792     4626431     2104320   82  Linux swap / Solaris
/dev/sda3         4626432   524287999   259830784   83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.
bpmdb:~ #
bpmdb:~ # partprobe
Error: Partition(s) 3 on /dev/sda have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use.  As a result, the old partition(s) will remain in use.  You should reboot now before making further changes.
Warning: Unable to open /dev/sr0 read-write (Read-only file system).  /dev/sr0 has been opened read-only.
Warning: Unable to open /dev/sr0 read-write (Read-only file system).  /dev/sr0 has been opened read-only.
Warning: The driver descriptor says the physical block size is 512 bytes, but Linux says it is 2048 bytes.
Warning: Unable to open /dev/sr1 read-write (Read-only file system).  /dev/sr1 has been opened read-only.
Warning: Unable to open /dev/sr1 read-write (Read-only file system).  /dev/sr1 has been opened read-only.
bpmdb:~ #
Reboot the machine
Resize the disk
bpmdb:~ # resize2fs /dev/sda3
resize2fs 1.41.9 (22-Aug-2009)
Filesystem at /dev/sda3 is mounted on /; on-line resizing required
old desc_blocks = 10, new_desc_blocks = 16
Performing an on-line resize of /dev/sda3 to 64957696 (4k) blocks.
The filesystem on /dev/sda3 is now 64957696 blocks long.

bpmdb:~ # df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda3       244G  140G  103G  58% /
udev             16G  1.2M   16G   1% /dev
tmpfs            16G  1.9M   16G   1% /dev/shm
bpmdb:~ #
bpmdb:~ # fdisk -l

Disk /dev/sda: 268.4 GB, 268435456000 bytes
255 heads, 63 sectors/track, 32635 cylinders, total 524288000 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: 0xd4cf0800

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048        2854         403+  41  PPC PReP Boot
/dev/sda2          417792     4626431     2104320   82  Linux swap / Solaris
/dev/sda3         4626432   524287999   259830784   83  Linux
bpmdb:~ #
bpmdb:~ # lsblk
NAME   MAJ:MIN RM   SIZE RO MOUNTPOINT
sda      8:0    0   250G  0
├─sda1   8:1    0 403.5K  0
├─sda2   8:2    0     2G  0 [SWAP]
└─sda3   8:3    0 247.8G  0 /
sr0     11:0    1   3.2G  0
sr1     11:1    1     5G  0
bpmdb:~ #
bpmdb:~ #