Monday, December 29, 2014

How to check sudo activities

To check the sudo user activities , enable the logging.


To check who ran what commands, you may want to enable sudo log.
Check following value on your sudoers file.
# visudo
Defaults        log_host,log_year,logfile=/var/log/sudolog
 

Monday, December 22, 2014

म पिएर पीइने मान्छे होइन, 
म पिएर पीइने मान्छे होइन,
आँफैलाई टुक्रा पारी,
जिउने मान्छे होइन !!!

म सम्बन्ध तोद्ने मान्छे होइन,
म सम्बन्ध तोद्ने मान्छे होइन,
सम्बन्ध तोडी जानेलाई
फर्काउने मान्छे होइन !!!

म मिठो कुराले फकाउने मान्छे होइन,
म मिठो कुराले फकाउने मान्छे होइन,
मुटुलाई नै दु:खने गरी
तिखो छुरा रोप्ने होइन !!!

म हल्ला-हल्लामा दौड्ने मान्छे होइन,
म हल्ला-हल्लामा दौड्ने मान्छे होइन,
बजारमा चल्ने हल्ला कुरा
पत्त्याउने मान्छे होइन !!!

म  सध्भावना तोद्ने मान्छे होइन,
म  सध्भावना तोद्ने मान्छे होइन,
अन्तर मन्को भित्री कुरा
बुझ्न सक्ने मान्छे होइन !!!

म आफ्ना पीडा सुनाउने मान्छे होइन,
म आफ्ना पीडा सुनाउने मान्छे होइन,
सुनाएर मन्को कुरा
हल्का पार्ने मान्छे होइन !!!

असफलतामा दु:ख मानी
रुँदै हिँद्ने मान्छे होइन !!!

FS Creation on AIX

login as:
$ sudo su -
Enter your LAN Password:
root@my-aix-server-2 /
> lspv | grep -i power
hdiskpower0     00f95dd987d53177                    udbxsrcp_vg1    active
hdiskpower1     00f95dd987cf16f7                    udbxsrcp_vg1    active
hdiskpower2     00f95dd987d7446c                    udbxsrcp_vg1    active
hdiskpower3     00f95dd987d299fd                    udbxsrcp_vg1    active
hdiskpower4     00f95dd987cbbcc2                    udbxsrcp_vg1    active
hdiskpower5     00f95dd987d6c3c6                    udbxsrcp_vg1    active
hdiskpower6     00f95dd987d0f8de                    udbxsrcp_vg1    active
hdiskpower7     00f95dd987cd427a                    udbxsrcp_vg1    active
hdiskpower8     00f95dd987ca1850                    udbxsrcp_vg1    active
hdiskpower9     00f95dd987d35617                    udbxsrcp_vg1    active
hdiskpower10    00f95dd987cca3e2                    udbxsrcp_vg1    active
hdiskpower11    00f95dd987d6b982                    udbxsrcp_vg1    active
hdiskpower12    00f95dd987d0c93e                    udbxsrcp_vg1    active
hdiskpower13    00f95dd987cc4864                    udbxsrcp_vg1    active
hdiskpower14    00f95dd987d52387                    udbxsrcp_vg1    active
hdiskpower15    00f95dd987cf3daa                    udbxsrcp_vg1    active
hdiskpower16    00f95dd987d8a3de                    udbxsrcp_vg1    active
hdiskpower17    00f95dd987d5b900                    udbxsrcp_vg1    active
hdiskpower18    00f95dd987cf86c4                    udbxsrcp_vg1    active
hdiskpower19    00f95dd987d7eb4e                    udbxsrcp_vg1    active
hdiskpower20    00f95dd987d13451                    udbxsrcp_vg1    active
hdiskpower21    00f95dd987cc0f32                    udbxsrcp_vg1    active
hdiskpower22    00f95dd987d68ce7                    udbxsrcp_vg1    active
hdiskpower23    00f95dd987d1db2f                    udbxsrcp_vg1    active
hdiskpower24    00f95dd987cd538f                    udbxsrcp_vg1    active
hdiskpower25    00f95dd987d87a28                    udbxsrcp_vg1    active
hdiskpower26    00f95dd987d1947d                    udbxsrcp_vg1    active
hdiskpower27    00f95dd987cc506d                    udbxsrcp_vg1    active
hdiskpower28    00f95dd987d48c01                    udbxsrcp_vg1    active
hdiskpower29    00f95dd987cebcc6                    udbxsrcp_vg1    active
hdiskpower30    00f95dd987ccffb7                    udbxsrcp_vg1    active
hdiskpower31    00f95dd987d541dc                    udbxsrcp_vg1    active
hdiskpower32    00f95dd987d95e38                    udbxcasp_vg1    active
hdiskpower33    00f95dd987d272a5                    udbxcasp_vg1    active
hdiskpower34    00f95dd987ced468                    udbxprcp_vg1    active
hdiskpower35    00f95dd987d955e3                    udbxprcp_vg1    active
hdiskpower36    00f95dd987d2280d                    udbxprcp_vg1    active
hdiskpower37    00f95dd987d31008                    udbxprcp_vg1    active
hdiskpower38    00f95dd987dad3f8                    udbxprcp_vg1    active
hdiskpower39    00f95dd987cee69f                    udbxmonp_vg1    active
hdiskpower40    00f95dd987d7ad0b                    udbxmonp_vg1    active
hdiskpower41    00f95dd987d1157f                    udbxmonp_vg1    active
hdiskpower42    00f95dd987d8b814                    tempspace_vg1   active
hdiskpower43    00f95dd987d172bc                    tempspace_vg1   active
hdiskpower44    00f95dd987d7facb                    tempspace_vg1   active
hdiskpower45    00f95dd987d277d0                    tempspace_vg1   active
hdiskpower46    00f95dd987dc31d5                    tempspace_vg1   active
hdiskpower47    00f95dd987d093f2                    tempspace_vg1   active
hdiskpower48    00f95dd987d48539                    tempspace_vg1   active
hdiskpower49    00f95dd987cfe8d4                    tempspace_vg1   active
hdiskpower50    00f95dd987da1c44                    tempspace_vg1   active
hdiskpower51    00f95dd987d40fd4                    tempspace_vg1   active
hdiskpower52    00f95dd987db5d3e                    tempspace_vg1   active
hdiskpower53    00f95dd987d0a125                    udbbackup_vg1   active
hdiskpower54    00f95dd987d7cf51                    udbbackup_vg1   active
hdiskpower55    00f95dd987d23e64                    udbbackup_vg1   active
hdiskpower56    00f95dd987db6d10                    udbbackup_vg1   active
hdiskpower57    00f95dd987d5e046                    udbbackup_vg1   active
hdiskpower58    00f95dd987cfe09e                    udbbackup_vg1   active
hdiskpower59    00f95dd987d8e06c                    udbbackup_vg1   active
hdiskpower60    00f95dd987d0fc26                    udbbackup_vg1   active
hdiskpower61    00f95dd987da000f                    udbbackup_vg1   active
hdiskpower62    00f95dd987d51340                    udbbackup_vg1   active
hdiskpower63    00f95dd987ddd591                    udbbackup_vg1   active
hdiskpower64    00f95dd987d54fb4                    udbbackup_vg1   active
hdiskpower65    00f95dd987dbe256                    udbbackup_vg1   active
hdiskpower66    00f95dd987d309e0                    udbbackup_vg1   active
hdiskpower67    00f95dd987da7ca6                    udbbackup_vg1   active
hdiskpower68    00f95dd987d2d76e                    udbbackup_vg1   active
hdiskpower69    00f95dd987db49b0                    udbbackup_vg1   active
hdiskpower70    00f95dd987d453c9                    udbbackup_vg1   active
hdiskpower71    00f95dd987dceeb8                    udbbackup_vg1   active
hdiskpower72    00f95dd987d4ebcc                    udbbackup_vg1   active
hdiskpower73    00f95dd987dd8652                    udbbackup_vg1   active
hdiskpower74    00f95dd987d83071                    toolsvg         active
hdiskpower75    00f95dd98cf0abfc                    pagevg          active
hdiskpower76    none                                None
hdiskpower77    none                                None
hdiskpower78    none                                None
hdiskpower79    none                                None
hdiskpower80    00f95dd98fca6e19                    altinst_rootvg
root@my-aix-server-2 /
> cfgmgr
root@my-aix-server-2 /
> powermt config
root@my-aix-server-2 /
> lspv | grep -i power
hdiskpower0     00f95dd987d53177                    udbxsrcp_vg1    active
hdiskpower1     00f95dd987cf16f7                    udbxsrcp_vg1    active
hdiskpower2     00f95dd987d7446c                    udbxsrcp_vg1    active
hdiskpower3     00f95dd987d299fd                    udbxsrcp_vg1    active
hdiskpower4     00f95dd987cbbcc2                    udbxsrcp_vg1    active
hdiskpower5     00f95dd987d6c3c6                    udbxsrcp_vg1    active
hdiskpower6     00f95dd987d0f8de                    udbxsrcp_vg1    active
hdiskpower7     00f95dd987cd427a                    udbxsrcp_vg1    active
hdiskpower8     00f95dd987ca1850                    udbxsrcp_vg1    active
hdiskpower9     00f95dd987d35617                    udbxsrcp_vg1    active
hdiskpower10    00f95dd987cca3e2                    udbxsrcp_vg1    active
hdiskpower11    00f95dd987d6b982                    udbxsrcp_vg1    active
hdiskpower12    00f95dd987d0c93e                    udbxsrcp_vg1    active
hdiskpower13    00f95dd987cc4864                    udbxsrcp_vg1    active
hdiskpower14    00f95dd987d52387                    udbxsrcp_vg1    active
hdiskpower15    00f95dd987cf3daa                    udbxsrcp_vg1    active
hdiskpower16    00f95dd987d8a3de                    udbxsrcp_vg1    active
hdiskpower17    00f95dd987d5b900                    udbxsrcp_vg1    active
hdiskpower18    00f95dd987cf86c4                    udbxsrcp_vg1    active
hdiskpower19    00f95dd987d7eb4e                    udbxsrcp_vg1    active
hdiskpower20    00f95dd987d13451                    udbxsrcp_vg1    active
hdiskpower21    00f95dd987cc0f32                    udbxsrcp_vg1    active
hdiskpower22    00f95dd987d68ce7                    udbxsrcp_vg1    active
hdiskpower23    00f95dd987d1db2f                    udbxsrcp_vg1    active
hdiskpower24    00f95dd987cd538f                    udbxsrcp_vg1    active
hdiskpower25    00f95dd987d87a28                    udbxsrcp_vg1    active
hdiskpower26    00f95dd987d1947d                    udbxsrcp_vg1    active
hdiskpower27    00f95dd987cc506d                    udbxsrcp_vg1    active
hdiskpower28    00f95dd987d48c01                    udbxsrcp_vg1    active
hdiskpower29    00f95dd987cebcc6                    udbxsrcp_vg1    active
hdiskpower30    00f95dd987ccffb7                    udbxsrcp_vg1    active
hdiskpower31    00f95dd987d541dc                    udbxsrcp_vg1    active
hdiskpower32    00f95dd987d95e38                    udbxcasp_vg1    active
hdiskpower33    00f95dd987d272a5                    udbxcasp_vg1    active
hdiskpower34    00f95dd987ced468                    udbxprcp_vg1    active
hdiskpower35    00f95dd987d955e3                    udbxprcp_vg1    active
hdiskpower36    00f95dd987d2280d                    udbxprcp_vg1    active
hdiskpower37    00f95dd987d31008                    udbxprcp_vg1    active
hdiskpower38    00f95dd987dad3f8                    udbxprcp_vg1    active
hdiskpower39    00f95dd987cee69f                    udbxmonp_vg1    active
hdiskpower40    00f95dd987d7ad0b                    udbxmonp_vg1    active
hdiskpower41    00f95dd987d1157f                    udbxmonp_vg1    active
hdiskpower42    00f95dd987d8b814                    tempspace_vg1   active
hdiskpower43    00f95dd987d172bc                    tempspace_vg1   active
hdiskpower44    00f95dd987d7facb                    tempspace_vg1   active
hdiskpower45    00f95dd987d277d0                    tempspace_vg1   active
hdiskpower46    00f95dd987dc31d5                    tempspace_vg1   active
hdiskpower47    00f95dd987d093f2                    tempspace_vg1   active
hdiskpower48    00f95dd987d48539                    tempspace_vg1   active
hdiskpower49    00f95dd987cfe8d4                    tempspace_vg1   active
hdiskpower50    00f95dd987da1c44                    tempspace_vg1   active
hdiskpower51    00f95dd987d40fd4                    tempspace_vg1   active
hdiskpower52    00f95dd987db5d3e                    tempspace_vg1   active
hdiskpower53    00f95dd987d0a125                    udbbackup_vg1   active
hdiskpower54    00f95dd987d7cf51                    udbbackup_vg1   active
hdiskpower55    00f95dd987d23e64                    udbbackup_vg1   active
hdiskpower56    00f95dd987db6d10                    udbbackup_vg1   active
hdiskpower57    00f95dd987d5e046                    udbbackup_vg1   active
hdiskpower58    00f95dd987cfe09e                    udbbackup_vg1   active
hdiskpower59    00f95dd987d8e06c                    udbbackup_vg1   active
hdiskpower60    00f95dd987d0fc26                    udbbackup_vg1   active
hdiskpower61    00f95dd987da000f                    udbbackup_vg1   active
hdiskpower62    00f95dd987d51340                    udbbackup_vg1   active
hdiskpower63    00f95dd987ddd591                    udbbackup_vg1   active
hdiskpower64    00f95dd987d54fb4                    udbbackup_vg1   active
hdiskpower65    00f95dd987dbe256                    udbbackup_vg1   active
hdiskpower66    00f95dd987d309e0                    udbbackup_vg1   active
hdiskpower67    00f95dd987da7ca6                    udbbackup_vg1   active
hdiskpower68    00f95dd987d2d76e                    udbbackup_vg1   active
hdiskpower69    00f95dd987db49b0                    udbbackup_vg1   active
hdiskpower70    00f95dd987d453c9                    udbbackup_vg1   active
hdiskpower71    00f95dd987dceeb8                    udbbackup_vg1   active
hdiskpower72    00f95dd987d4ebcc                    udbbackup_vg1   active
hdiskpower73    00f95dd987dd8652                    udbbackup_vg1   active
hdiskpower74    00f95dd987d83071                    toolsvg         active
hdiskpower75    00f95dd98cf0abfc                    pagevg          active
hdiskpower76    none                                None
hdiskpower77    none                                None
hdiskpower78    none                                None
hdiskpower79    none                                None
hdiskpower80    00f95dd98fca6e19                    altinst_rootvg
hdiskpower81    none                                None
root@my-aix-server-2 /
> powermt display dev=hdiskpower81
Pseudo name=hdiskpower81
Symmetrix ID=000192603809
Logical device ID=1451
state=alive; policy=SymmOpt; priority=0; queued-IOs=0;
==============================================================================
--------------- Host ---------------   - Stor -   -- I/O Path --  -- Stats ---
###  HW Path               I/O Paths    Interf.   Mode    State   Q-IOs Errors
==============================================================================
   0 fscsi0                   hdisk1313 FA  7eB   active  alive       0      0
   0 fscsi0                   hdisk1314 FA  9eB   active  alive       0      0
   1 fscsi1                   hdisk1315 FA 10eB   active  alive       0      0
   1 fscsi1                   hdisk1316 FA  8eB   active  alive       0      0
   2 fscsi2                   hdisk1317 FA  7eB   active  alive       0      0
   2 fscsi2                   hdisk1318 FA  9eB   active  alive       0      0
   3 fscsi3                   hdisk1319 FA 10eB   active  alive       0      0
   3 fscsi3                   hdisk1320 FA  8eB   active  alive       0      0
   4 fscsi4                   hdisk1321 FA  7eB   active  alive       0      0
   4 fscsi4                   hdisk1322 FA  9eB   active  alive       0      0
   5 fscsi5                   hdisk1323 FA 10eB   active  alive       0      0
   5 fscsi5                   hdisk1324 FA  8eB   active  alive       0      0
   6 fscsi6                   hdisk1325 FA  7eB   active  alive       0      0
   6 fscsi6                   hdisk1326 FA  9eB   active  alive       0      0
   7 fscsi7                   hdisk1327 FA 10eB   active  alive       0      0
   7 fscsi7                   hdisk1328 FA  8eB   active  alive       0      0

root@my-aix-server-2 /
> df -g /udb/data/prcpdb/c1
Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on
/dev/prcpdbc1     90.00      7.19   93%       15     1% /udb/data/prcpdb/c1
root@my-aix-server-2 /
> lslv prcpdbc1
LOGICAL VOLUME:     prcpdbc1               VOLUME GROUP:   udbxprcp_vg1
LV IDENTIFIER:      00f95dd900004c0000000148a49d9ac3.6 PERMISSION:     read/writ                                  e
VG STATE:           active/complete        LV STATE:       opened/syncd
TYPE:               jfs2                   WRITE VERIFY:   off
MAX LPs:            1440                   PP SIZE:        64 megabyte(s)
COPIES:             1                      SCHED POLICY:   parallel
LPs:                1440                   PPs:            1440
STALE PPs:          0                      BB POLICY:      non-relocatable
INTER-POLICY:       minimum                RELOCATABLE:    yes
INTRA-POLICY:       edge                   UPPER BOUND:    1024
MOUNT POINT:        /udb/data/prcpdb/c1    LABEL:          /udb/data/prcpdb/c1
MIRROR WRITE CONSISTENCY: on/ACTIVE
EACH LP COPY ON A SEPARATE PV ?: yes
Serialize IO ?:     NO
INFINITE RETRY:     no
DEVICESUBTYPE:      DS_LVZ
COPY 1 MIRROR POOL: None
COPY 2 MIRROR POOL: None
COPY 3 MIRROR POOL: None
root@my-aix-server-2 /
> lsvg -l udbxprcp_vg1
udbxprcp_vg1:
LV NAME             TYPE       LPs     PPs     PVs  LV STATE      MOUNT POINT
homeudbxprcp        jfs2       3200    3200    4    open/syncd    /udb/home/udbx                                  prcp
logprcpdb           jfs2       256     256     1    open/syncd    /udb/log/prcpd                                  b
prcpdbsyscat        jfs2       48      48      1    open/syncd    /udb/data/prcp                                  db/syscat
prcpdbusrspc        jfs2       32      32      1    open/syncd    /udb/data/prcp                                  db/userspace
prcpdbtoolstmp      jfs2       48      48      1    open/syncd    /udb/data/prcp                                  db/toolstemp
prcpdbc1            jfs2       1440    1440    1    open/syncd    /udb/data/prcp                                  db/c1
prcpdbc2            jfs2       1440    1440    1    open/syncd    /udb/data/prcp                                  db/c2
prcpdbc3            jfs2       1440    1440    1    open/syncd    /udb/data/prcp                                  db/c3
root@my-aix-server-2 /
> lsvg -l udbxprcp_vg1
udbxprcp_vg1:
LV NAME             TYPE       LPs     PPs     PVs  LV STATE      MOUNT POINT
homeudbxprcp        jfs2       3200    3200    4    open/syncd    /udb/home/udbxprcp
logprcpdb           jfs2       256     256     1    open/syncd    /udb/log/prcpdb
prcpdbsyscat        jfs2       48      48      1    open/syncd    /udb/data/prcpdb/syscat
prcpdbusrspc        jfs2       32      32      1    open/syncd    /udb/data/prcpdb/userspace
prcpdbtoolstmp      jfs2       48      48      1    open/syncd    /udb/data/prcpdb/toolstemp
prcpdbc1            jfs2       1440    1440    1    open/syncd    /udb/data/prcpdb/c1
prcpdbc2            jfs2       1440    1440    1    open/syncd    /udb/data/prcpdb/c2
prcpdbc3            jfs2       1440    1440    1    open/syncd    /udb/data/prcpdb/c3
root@my-aix-server-2 /
> extendvg udbxprcp_vg1 hdiskpower81
0516-1254 extendvg: Changing the PVID in the ODM.
root@my-aix-server-2 /
> chfs -a size=+50G /udb/data/prcpdb/c1
0516-787 extendlv: Maximum allocation for logical volume prcpdbc1
        is 1440.
root@my-aix-server-2 /
> lslv prcpdbc1
LOGICAL VOLUME:     prcpdbc1               VOLUME GROUP:   udbxprcp_vg1
LV IDENTIFIER:      00f95dd900004c0000000148a49d9ac3.6 PERMISSION:     read/write
VG STATE:           active/complete        LV STATE:       opened/syncd
TYPE:               jfs2                   WRITE VERIFY:   off
MAX LPs:            1440                   PP SIZE:        64 megabyte(s)
COPIES:             1                      SCHED POLICY:   parallel
LPs:                1440                   PPs:            1440
STALE PPs:          0                      BB POLICY:      non-relocatable
INTER-POLICY:       minimum                RELOCATABLE:    yes
INTRA-POLICY:       edge                   UPPER BOUND:    1024
MOUNT POINT:        /udb/data/prcpdb/c1    LABEL:          /udb/data/prcpdb/c1
MIRROR WRITE CONSISTENCY: on/ACTIVE
EACH LP COPY ON A SEPARATE PV ?: yes
Serialize IO ?:     NO
INFINITE RETRY:     no
DEVICESUBTYPE:      DS_LVZ
COPY 1 MIRROR POOL: None
COPY 2 MIRROR POOL: None
COPY 3 MIRROR POOL: None
root@my-aix-server-2 /
> chlv -x 2880 prcpdbc1
root@my-aix-server-2 /
>  lslv prcpdbc1
LOGICAL VOLUME:     prcpdbc1               VOLUME GROUP:   udbxprcp_vg1
LV IDENTIFIER:      00f95dd900004c0000000148a49d9ac3.6 PERMISSION:     read/write
VG STATE:           active/complete        LV STATE:       opened/syncd
TYPE:               jfs2                   WRITE VERIFY:   off
MAX LPs:            2880                   PP SIZE:        64 megabyte(s)
COPIES:             1                      SCHED POLICY:   parallel
LPs:                1440                   PPs:            1440
STALE PPs:          0                      BB POLICY:      non-relocatable
INTER-POLICY:       minimum                RELOCATABLE:    yes
INTRA-POLICY:       edge                   UPPER BOUND:    1024
MOUNT POINT:        /udb/data/prcpdb/c1    LABEL:          /udb/data/prcpdb/c1
MIRROR WRITE CONSISTENCY: on/ACTIVE
EACH LP COPY ON A SEPARATE PV ?: yes
Serialize IO ?:     NO
INFINITE RETRY:     no
DEVICESUBTYPE:      DS_LVZ
COPY 1 MIRROR POOL: None
COPY 2 MIRROR POOL: None
COPY 3 MIRROR POOL: None
root@my-aix-server-2 /
> chfs -a size=+50G /udb/data/prcpdb/c1
Filesystem size changed to 293601280
Inlinelog size changed to 512 MB.
root@my-aix-server-2 /
> chfs -a size=+50G /udb/data/prcpdb/c2
0516-787 extendlv: Maximum allocation for logical volume prcpdbc2
        is 1440.
root@my-aix-server-2 /
> chlv -x 2880
root@my-aix-server-2 /
> df -g /udb/data/prcpdb/c2
Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on
/dev/prcpdbc2     90.00      7.19   93%       15     1% /udb/data/prcpdb/c2
root@my-aix-server-2 /
> lslv
root@my-aix-server-2 /
> lslv prcpdbc2
LOGICAL VOLUME:     prcpdbc2               VOLUME GROUP:   udbxprcp_vg1
LV IDENTIFIER:      00f95dd900004c0000000148a49d9ac3.7 PERMISSION:     read/write
VG STATE:           active/complete        LV STATE:       opened/syncd
TYPE:               jfs2                   WRITE VERIFY:   off
MAX LPs:            1440                   PP SIZE:        64 megabyte(s)
COPIES:             1                      SCHED POLICY:   parallel
LPs:                1440                   PPs:            1440
STALE PPs:          0                      BB POLICY:      non-relocatable
INTER-POLICY:       minimum                RELOCATABLE:    yes
INTRA-POLICY:       edge                   UPPER BOUND:    1024
MOUNT POINT:        /udb/data/prcpdb/c2    LABEL:          /udb/data/prcpdb/c2
MIRROR WRITE CONSISTENCY: on/ACTIVE
EACH LP COPY ON A SEPARATE PV ?: yes
Serialize IO ?:     NO
INFINITE RETRY:     no
DEVICESUBTYPE:      DS_LVZ
COPY 1 MIRROR POOL: None
COPY 2 MIRROR POOL: None
COPY 3 MIRROR POOL: None
root@my-aix-server-2 /
> chlv -x 2880 prcpdbc2
root@my-aix-server-2 /
> chlv -x 2880 prcpdbc3
root@my-aix-server-2 /
> chfs -a size=+50G /udb/data/prcpdb/c2
Filesystem size changed to 293601280
Inlinelog size changed to 512 MB.
root@my-aix-server-2 /
>  chfs -a size=+50G /udb/data/prcpdb/c3
Filesystem size changed to 293601280
Inlinelog size changed to 512 MB.
root@my-aix-server-2 /
> chfs -a size=+200G /udb/home/udbxprcp
0516-787 extendlv: Maximum allocation for logical volume homeudbxprcp
        is 3200.
root@my-aix-server-2 /
> chlv -x 6400
root@my-aix-server-2 /
> df -g /udb/home/udbxprcp
Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on
/dev/homeudbxprcp    200.00    198.96    1%      324     1% /udb/home/udbxprcp
root@my-aix-server-2 /
> chlv -x 6400 homeudbxprcp
root@my-aix-server-2 /
> chfs -a size=+200G /udb/home/udbxprcp
Filesystem size changed to 838860800
root@my-aix-server-2 /
>

patching aix server

login as:
$ sudo su -
Enter your LAN Password:
root@myaixserver /
> lspv | grep -i root
hdisk5          00f62694c1485fa8                    rootvg          active
hdisk6          00f62694c14fb18f                    old_rootvg
root@myaixserver /
> oslevel -s
6100-09-02-1412
root@myaixserver /
> alt_disk_install -B -C hdisk6
root@myaixserver /
> cd /tmp
root@myaixserver /tmp
> smitty update_all
#---------------------------------------------------------------------
# No installable software products were found on the media.
#---------------------------------------------------------------------
                                                                    COMMAND STATUS
Command: failed        stdout: yes           stderr: no
Before command completion, additional instructions may appear below.
0503-003 geninstall:  The specified device /tmp
        is not a valid device or file.
#---------------------------------------------------------------------
# No installable software products were found on the media.
#---------------------------------------------------------------------





F1=Help                              F2=Refresh                            F3=Cancel                             F6=Command
F8=Image                             F9=Shell                              F10=Exit                              /=Find
n=Find Next




root@myaixserver /tmp
> lspv | grep -i root
hdisk5          00f62694c1485fa8                    rootvg          active
hdisk6          00f62694c14fb18f                    old_rootvg
root@myaixserver /tmp
> bootlist -m normal -o
hdisk5 blv=hd5 pathid=0
root@myaixserver /tmp
> bootlist -m normal hdisk6
root@myaixserver /tmp
>  bootlist -m normal -o
hdisk6 blv=hd5 pathid=0
root@myaixserver /tmp
>  bootlist -m normal hdisk5
root@myaixserver /tmp
>  bootlist -m normal -o
hdisk5 blv=hd5 pathid=0
root@myaixserver /tmp
>
 

Saturday, December 20, 2014

Monday, December 1, 2014

RHEL7: Create filesystem on redhat EL 7

How to Create, mount, unmount, and use vfat, ext4 and xfs file systems.
Prerequisite

Basic Logical volume operation with xfs
# fdisk /dev/sdb
# pvcreate /dev/sdb1
# vgcreate myvg /dev/sdb1

To create a new partition called mylv with a size of 100MB, type:
# lvcreate --size 100M --name mylv /dev/myvg
Ext4 file system
To create an ext4 file system (here called /dev/myvg/mylv), type:
# mkfs.ext4 /dev/myvg/mylv

To mount this file system, type:
# mount /dev/myvg/mylv /mnt
Add entry to /etc/fstab
/dev/myvg/mylv /mnt ext4 defaults 1 2
To check an unmounted file system consistency, type:
# fsck /dev/myvg/mylv
To get details about a file system, type:
# dumpe2fs /dev/myvg/mylv

Playing around XFS.

XFS is default file system on RHEL7.


# lvcreate -n mylv -L 10G myvg
or
# lvcreate --name mylv --size 10G /dev/myvg

# mkfs.xfs /dev/myvg/mylv
Add entry to /etc/fstab file to save off the reboot.
/dev/mapper/myvg-mylv /mnt xfs defaults 1 2
# mount -a
or
# mount /dev/myvg/mylv /mnt
# df -h /mnt


Extending filesystem by 2GB
# vgs //check free space
# lvscan  // get device path
# lvextend -L +2G  /dev/myvg/mylv
# xfs_growfs /mnt
Note: do not use resize2fs, its only for ext fs

Resizing (reducing) filessytem under zfs
You can't resize zfs. If there is a scenario, you have to remove existing fs and create a new one.

To repair an unmounted file system consistency,
# xfs_repair /dev/myvg/mylv
# xfs_info /dev/myvg/mylv

C. create an Vfat file system
# mkfs.vfat /dev/myvg/mylv
Mount the filessystem.
# mount /dev/myvg/mylv /mnt
Add entry to /etc/fstab file
# vi /etc/fstab
/dev/mapper/myvg-mylv /mnt vfat defaults 1 2
To repair an unmounted file system consistency,
# fsck.vfat /dev/myvg/mylv