Popular Posts

Oct 8, 2016

resize root partition in solaris 10 - down time is required

resize root partition in solaris 10 - down time is required


     -  A 146 GB disk is completely assigned to c0d0s0 slice as root file system
     -  Need to split the slice to have another 20GB slice as c0d0s1 and mount it as /data

1. Add a temporary disk c1d0s0 and mount in /mnt

2. create ufs dump of root slice to a file in the temporary disk
ufsdump 0uf /mnt/rootbkp.ufs /dev/dsk/c0d0s0

3. shutdown the server and boot the server using cdrom or ISO for ldoms
boot cdrom1

4. format the disk and create 120GB space in c0d0s0 slice

5. format the disk and create a 20GB space in c0d0s1 slice

6. label the disk and quit

7. create new FS in c0d0s0 slice
newfs /dev/rdsk/c0d0s0

8. Create new fs in c0d0s1 slice
newfs /dev/rdsk/c0d0s1

9. Mount the c0d0s0 in /a
comment out "/" in /a/etc/vfstab
mount /dev/dsk/c0d0s0 /a

10. mount the temporary disk c1d0s0 in /mnt
mount /dev/dsk/c1d0s0 /mnt

11. restore the dump in root slice c0d0s0 from file
ufsrestore rf /mnt/rootbkp.ufs /a

12. install the boot block to make available the disk as boot disk
installboot /a/usr/platform/sun4v/lib/fs/ufs/bootblk /dev/rdsk/c0d0s0

13. edit and un comment the "/" in /a/etc/vfstab

14. add the below line in /a/etc/vfstab to mount the c0d0s1 slice as /data_stuff
/dev/dsk/c0d0s1    /dev/rdsk/c0d0s1    /data_stuff    ufs     2       yes     logging

15. boot the server in normal mode, server will boot in c0d0 disk,



~
how to resize FS in solaris 10
how to resize root file system in solaris 10
how to resize ufs FS online in solaris 10
how to resize root file system online in solaris 10
~

Oct 6, 2016

nfs share using zfs and mounts options

nfs share using zfs and mounts options




1. Create a zfs volume and mount as /data_stuff
zfs create -o mountpoint=/data_stuff rpool/data_stuff

2. set quota for 20GB - This volume has restricted to 20GB not more than that
zfs set quota=20G rpool/data_stuff

3. Reserved dedicated 20GB space in rpool for the zfs data_stuff, other volumes cannot use this space
zfs set refquota=20G rpool/data_stuff

3. Share the zfs as nfs
zfs set sharenfs=on rpool/data_stuff

4. Set nfs permisssion for the zfs
zfs set share=name=some_description,path=/data_stuff,prot=nfs,anon=0,sec=sys, \
rw=@192.168.0.1:@192.168.0.2,root=@192.168.0.2:@192.168.0.2 rpool/data_stuff

5. View the config updated automatically in /etc/dfs/sharetab
/data_stuff  some_description   nfs     anon=0,sec=sys,rw=@192.168.0.1:@192.168.0.2,root=@192.168.0.2:@192.168.0.2

6. Entry in vfstab to mount a nfs share
judi-test-01:/vol/Oracle_migration/Oracle      -             /Oracle_migration          nfs       -        yes       -


~Judi~

~
nfs in zfs
nfs share in zfs
nfs - Sharing and Unsharing ZFS File Systems
How to share ZFS as NFS in solaris 11
Creating a ZFS network share over NFS
zfs performance
zpool
zfs share
zfs set sharenfs
zfs share nfs
~

Oct 5, 2016

zpool and zfs

zpool root disk mirroring - attach a disk zpool named rpool


1. Create a Mirrored Root Pool (Post Installation)
zpool attache <pool-name> <current-device> <new-device>
zpool attach rpool c2t5000CCA07047CEB9d0 c6t5000CCA07047E089d0

2. Check the status for resilvering
zpool status rpool

3. Apply boot blocks to the second disk after resilvering is complete
installboot -F zfs /usr/platform/`uname -i`/lib/fs/zfs/bootblk /dev/rdsk/<new-device>
installboot -F zfs /usr/platform/`uname -i`/lib/fs/zfs/bootblk /dev/rdsk/c6t5000CCA07047E089d0




Create new zpool and zfs filesystem


1. Create a new pool name ldom1 that consists of disk c1t0d0
zpool create ldom1 c1t0d0

2. Create a new pool / zfs in same name and mount it - single command
zpool create -f -m /opt/oracle opt_oracle c1d1

3. Create new zfs in a existing pool
zfs create -o mountpoint=/opt/oracle/ora opt_oracle/ora

4. Destroy a zpool
zpool destroy opt_oracle

5. To View / List the zfs snapshots zfs list -t snap 6. Delete a a zfs snapshot ; user -R for cloned snapshot zfs destroy -R rpool/ROOT/solaris 

set / unset quota in zfs filesystem

1. set zfs quota in a file system zfs set quota=50M oracle/data001

1. unset zfs quota in a file system zfs set quota=none oracle/data001

Oct 4, 2016

Solaris 11 Configuring IP / IPMP / Aggregation

Solaris 11 configuring IP / IPMP / Aggreation

List physical interfaces
judi-test-01# dladm show-phys
LINK              MEDIA                STATE      SPEED  DUPLEX    DEVICE
net4              Ethernet             up         10000  full      ixgbe0
net10             Ethernet             up         10000  full      ixgbe6
net12             Ethernet             up         10     full      usbecm2
net6              Ethernet             up         1000   full      igb0
net3              Ethernet             up         1000   full      ixgbe5
net7              Ethernet             up         1000   full      igb1
net8              Ethernet             up         1000   full      igb2
net11             Ethernet             up         10000  full      ixgbe7
net9              Ethernet             down       0      unknown   igb3
net5              Ethernet             up         10000  full      ixgbe1
net0              Ethernet             down       0      unknown   ixgbe2
net2              Ethernet             up         1000   full      ixgbe4
net1              Ethernet             up         1000   full      ixgbe3
judi-test-01# 

Configure an Active-Standby IPMP Group
1. Create an IPMP interface
              ipadm create-ip net1
              ipadm create-ip net2
              ipadm create-ipmp ipmp0

2. Add the physical interfaces net1 and net2 to the ipmp group.
              ipadm add-ipmp -i net1 -i net2 ipmp0

3. Assign the test IP address for the interface for probe-based failure detection
              ipadm create-addr -T static -a 192.168.1.10/24 net1
              ipadm create-addr -T static -a 192.168.1.11/24 net2

4. Assign IP address to ipmp interface
              ipadm create-addr -T static -a 192.168.1.9/24 ipmp0

5. Configure one of the physical interface as standby interface (here net2)
              ipadm set-ifprob -p standby=on -m ip net2

6. Check the staus of the IPMP interfaces:
              ipmpstat -a
              ipmpstat -g
              ipmpstat -t
Create an aggregation and assign IP address
1. create a aggregated network port using two physical interface
              dladm create-aggr -l net1 -l net2 aggr0

2. View the aggreation details
              dladm show-aggr

3. View the aggreation link
              dladm show-link

4. Create/plumb the aggr interface
              ipadm create-ip aggr0

5. Create a IP address in the aggreated link
              ipadm create-addr -T static -a 192.168.1.9/24 aggr0/v4

6. View the IP details
              ipadm show-addr

7. Print information about the interfaces that are attached to the system.
              ipadm show-if

judi-test-01# dladm show-link
LINK                CLASS     MTU    STATE    OVER
net4                phys      1500   up       --
net10               phys      1500   up       --
net12               phys      1500   up       --
net6                phys      1500   up       --
net3                phys      1500   up       --
net7                phys      1500   up       --
net8                phys      1500   up       --
net11               phys      1500   up       --
net9                phys      1500   down     --
net5                phys      1500   up       --
net0                phys      1500   down     --
net2                phys      1500   up       --
net1                phys      1500   up       --
aggr0               aggr      1500   up       net1 net2
judi-test-01#


judi-test-01# ipadm show-addr
ADDROBJ           TYPE     STATE        ADDR
lo0/v4            static   ok           127.0.0.1/8
aggr0/v4          static   ok           192.168.1.9/24
net12/v4          static   ok           169.254.182.77/24
lo0/v6            static   ok           ::1/128
judi-test-01#

Active-Standby IPMP Group in Solairs 10
1. Plumb the Physical testa interface
              ifconfig e1000g0 plumb

2. Assign the testa IP address to the testa interface
              ifconfig e1000g0 192.168.2.10 netmask 255.255.255.0 broadcast + up   (OR)
              ifconfig e1000g0 192.168.2.10/24 broadcast + up

3. Create a IPMP group named failover with testa interface               ifconfig e1000g0 group failover

4. Add the testa interface to IPMP group named failover                                             ifconfig e1000g0 addif 192.168.2.9 netmask 255.255.255.0 broadcast 192.168.2.255 -failover deprecated up

5. Add the testb interface to IMPMP group named failover as standby
                            ifconfig nxge0 plumb 192.168.2.11 netmask 255.255.255.0 broadcast 192.168.2.255 group failover deprecated -failover standby up


6. Add the below configuraiont in the mentioned files
                /etc/hostname.e1000g0                                 Judi-dev-001-testa/24 broadcast + group failover -failover deprecated up addif Judi-dev-001/24 broadcast + up
                /etc/hostname.nxge0                                 Judi-dev-001-testb/24 broadcast + group failover -failover deprecated up standby


Network driver version
Verify the Driver Version (Oracle Solaris 11)
              strings /kernel/drv/<arch>/igb | grep igb 
              where arch is amd64 for 64-bit Intel systems or sparcv9 for Oracle SPARC systems.

              strings /kernel/drv/sparcv9/ixgbe  | grep ixgbe
                            ixgbe 1.1.59
                                          If the version number is not at least 1.1.9, you must install the latest driver, 


              strings /kernel/drv/sparcv9/igb  | grep igb
                            igb 2.3.19
                                          If the version number is not 2.2.2 or later, you must install the latest driver,

~
How to configure IPMP in solaris 11
How to configure aggregation in solaris 11
How to configure IP address in solaris 11
~


Oct 3, 2016

Quota in Solaris 10 UFS

Quota in Solaris 10 UFS

1.    Copy /etc/vfstab configuration file
               cp -p /etc/vfstab /etc/vfstab-`date +%d-%b-%Y`

2.    Edit the /etc/vfstab file and add an "rq" in mount option for the FS you like to enable quota
               /dev/dsk/c0d0s0 /dev/rdsk/c0d0s0        /       ufs     1       no      rq

3.    Here we enabled quota in root "/" FS
Use the mount command and make available the quota option online
               mount -o remount,quota /

4.    Get into root directory of the respective FS ( here / is the FS )
               cd /

5.    Create a file name quotas and change the permission
               touch quotas
               chmod 600 quotas

6.    edquota is a editor command for updating quotas ( here the user is judi)
               edquota <user-name>
               edquota judi

7.    Update the soft and hard lmit values in blocks ( here given is 2 GB - 2097152 blocks
               fs / blocks (soft = 2097152, hard = 2097152) inodes (soft = 0, hard = 0)

8.    Enable the quota for "/" FS
               quotaon -v /

9.    Login to the user or switch that user and see
Now try to write data more than 2GB, It will not allow us to write
                 $ /usr/sbin/mkfile 1g file1
                 $ /usr/sbin/mkfile 800m file2
                 $ /usr/sbin/mkfile 500m file3
                                quota_ufs: over hard disk limit (pid 29154, uid 120, inum 298862, fs /)
                                file3: initialized 233783296 of 524288000 bytes: Disc quota exceeded
                $
                 $
                 $ du -sh .
                      2.0G   .
                 $

10.   The quota command display a user’s ufs file system disk quota and usage
               quota -v vivek

11.   The repquota command displays a summary of the disk usage and quotas for the specified ufs file systems such as /export/home, enter:
               repquota /export/home

12.   To display quota information of all users, type:
               repquota -va


We will get an error in /var/adm/messages
Oct  3 17:01:48 judi-test-01 genunix: [ID 800400 kern.notice] quota_ufs: over hard disk limit (pid 10644, uid 120, inum 298868, fs /)


~
how to enable quota in solaris 10
how to enable quota for a user in solaris 10
enable user quota in solairs 10 ufs
ufs user quota in solaris 10
~

Popular Posts