How to increase space of filesystem under SVM

This entry was posted in Unix and tagged on June 17, 2012, by

* Following is the scenarios . File system is mounted on SVM *

# df -ah

/dev/md/dsk/d60 135G 170M 133G 1% /a01 —–> Make this 25G

/dev/md/dsk/d40 16g 16G 373M 98% /u01 —–> Make this 100G

d60 is mirrored with d61 d62
d40 is mirrored with d41 d42

Steps to follow to increase the Size of file system

1. Take the backup of directory /a01 and /u01

2. Take a copy of /etc/vfstab

# cp -r /etc/vfstab /etc/vfstab.10.30.2010

3. unmount the partion

# umount /a01
# umount /u01

4. Detach the mirror with metadetach command

# metadetach -f d60 d61
d60:submirror d61 is detached

# metadetach -f d40 d41
d40: submirror d41 is detach

5. Run the metaclear command

# metaclear -f d60 d61 d62
d60:Mirror is cleared
d61:Concat/stripe is cleared
d62:Concate/stripe is cleared

# metaclear -f d40 d41 d42
d40:Mirror is cleared
d41:Concat/stripe is cleared
d42:Concate/stripe is cleared

6. Create new slices with format command

# format

Create the partition , select the slices according to requirement, label it and save it.
Select one slice to be 25G and other to be 100G

7. Run prtvtoc command to mirror the newly format hardrive to second one .

# prtvtoc /dev/rdsk/c0t2d0s2 | fmthard -s /dev/rdsk/c0t3d0s2

8. Run the metainit command to create metadevices on the newly slice

# metainit -f d80 1 1 c0t2d0s0

# metainit -f d70 1 1 c0t2d0s3

9. create the mirror d80 and d70

# metainit d80 -m d81
d80: mirror is setup

# metainit d80 d82
d80:d82 submirror is attached

# metainit d70 -m d71
d70: mirror is setup

# metainit d70 d72
d70:d72 submirror is attached

10. Run metstat -p to verify mirror is created or not

# metastat -p

11. Create new filesystem

# newfs /dev/md/rdsk/d80

# newfs /dev/md/rdsk/d70

Mount it.

12. Update new filesystem on /etc/vfstab

13. Run the metastat command to check the sync state. dont reboot the system until it is 100%

# metstat | more

14. Copy the original data on the newly mounted point.

15. check the output of df -ah

# df -ah

Leave a Reply

Your email address will not be published. Required fields are marked *

Copyright 2017 ©Aceadmins. All rights reserved.