AIX: NTP Service Basics

Hi all,
I always forget the command and have to search it again. For further searches, I expect to found in my own posts… ūüôā

> To start Service

startsrc -s xntpd

> To stop Service

stopsrc -s xntpd

> Configuration File

/etc/ntpd.conf

Expect it be useful to you too.
See ya!
Matheus.

Advertisements

Linux: Resizing Swap Online

Hi all!
Quick one to resize swap online:

[root@server-db ~]# swapon -s
Filename                                Type            Size    Used    Priority
/dev/mapper/rootvg-lvswap              partition       5242872 373624  -1
[root@server-db ~]# vgs
VG                #PV #LV #SN Attr   VSize   VFree
[...]
rootvg              1   6   0 wz--n- 135.69G 5.69G
[...]
[root@server-db ~]# lvextend -L +2048M /dev/mapper/rootvg-lvswap
Extending logical volume lvswap to 7.00 GB
Logical volume lvswap successfully resized
[root@server-db ~]# vgs
VG                #PV #LV #SN Attr   VSize   VFree
[...]
rootvg              1   6   0 wz--n- 135.69G 3.69G
[...]
[root@server-db ~]# mkswap /dev/mapper/rootvg-lvswap
Setting up swapspace version 1, size = 7516188 kB
[root@server-db ~]# swapoff /dev/mapper/rootvg-lvswap
[root@server-db ~]# swapon /dev/mapper/rootvg-lvswap
[root@server-db ~]# swapon -s
Filename                                Type            Size    Used    Priority
/dev/mapper/rootvg-lvswap              partition       7516188 373624  -1

See ya!
Matheus.

Linux Basic: Creating a Filesystem

From disk to filesystem:

> Rescan on scisi controller to detect the disk (controller id 0, in  this example)

echo "- - -" > /sys/class/scsi_host/host0/scan

– List disks

fdisk -l

> Fdisk choosing options n -> new p->partition 1-> partition number

fdisk /dev/sdm

> Create physcal volume

pvcreate /dev/sdm1

> Create Volume Group

vgcreate oracle /dev/sdb1

> Rename Volume Group

vgrename oracle vgoracle

> Create LV

lvcreate -L 19G -n lvoracle vgoracle

> Extend LV

lvextend -L +990M /dev/vgoracle/lvoracle

> Make FileSystem

mkfs.ext3 -m 0 -v /dev/vgoracle/lvoracle

OBS: m 0 is the journal (for recovery in case of crash).¬† “0” because I don’t want it now. So, 100% of disco will be available for using on fs.

> Mount filesystem on Directory

mount -t ext3 /dev/vgoracle/lvoracle /oracle/

> Just to check:

$ df -h
/dev/mapper/vgoracle-lvoracle
20G  173M   20G   1% /oracle

 

Have a nice day!
Matheus.