Popular Posts

Showing posts with label quota. Show all posts
Showing posts with label quota. Show all posts

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 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