Hi gurus
Im a newbie in solaris..I need to extend file system space in solaris 10 which is using SVM..I have a file system /pin02 which is 93% full n needs to be extended..only 3.6 gb avail space left..the file system is not mirrored...normal ufs file system only..can u please tel me t steps for doin it...its urgent... thanks in advance..
Do you have extra disks or existing Free space on your disk?
HAve you read and understood anything from here?
Expanding a File System Using the growfs Command (Solaris Volume Manager Administration Guide) - Sun Microsystems
ya v have extra disks..can u tel me whether t procedure which im gona tel now is t rite one????here i start..first attach a disk and then use growfs command to attach it to the file syatem that has to be expanded...like growfs -M <mt pt tat is /pin02> attached disk name..is this rite???
If u dont use SVM create one way mirror for that
Example ;
Cretate one way mirror
metadb -afc 3 /dev/dsk/cxtxdxsx ( create these on a slice which u dont use and unmounted slice (Slice size can be 256 mb)
metainit -f d21 1 1 /dev/dsk/c14t600A0B8000498E000000062148737EC4d0s6
metainit d20 -m d21
Then u can grow like following
[root@istnbp01 /]>> metattach d21 c14t600A0B800049B18A0000066C49A582EFd0s0
d21: component is attached
[root@istnbp01 /]>> metastat
d20: Mirror
Submirror 0: d21
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 1724448768 blocks (822 GB)
d21: Submirror of d20
State: Okay
Size: 1724448768 blocks (822 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
/dev/dsk/c14t600A0B8000498E000000062148737EC4d0s6 0 No Okay Yes
Stripe 1:
Device Start Block Dbase State Reloc Hot Spare
/dev/dsk/c14t600A0B800049B18A0000066C49A582EFd0s0 16384 No Okay Yes
d13: Mirror
Submirror 0: d14
State: Okay
Submirror 1: d15
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 67110720 blocks (32 GB)
d14: Submirror of d13
State: Okay
Size: 67110720 blocks (32 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
/dev/dsk/c14t5000C5000A6B8603d0s1 0 No Okay Yes
d15: Submirror of d13
State: Okay
Size: 67110720 blocks (32 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
/dev/dsk/c14t500000E01A0B1120d0s1 0 No Okay Yes
d10: Mirror
Submirror 0: d11
State: Okay
Submirror 1: d12
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 75709440 blocks (36 GB)
d11: Submirror of d10
State: Okay
Size: 75709440 blocks (36 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
/dev/dsk/c14t5000C5000A6B8603d0s0 0 No Okay Yes
d12: Submirror of d10
State: Okay
Size: 75709440 blocks (36 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
/dev/dsk/c14t500000E01A0B1120d0s0 0 No Okay Yes
d3: Mirror
Submirror 0: d4
State: Okay
Submirror 1: d5
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 67110720 blocks (32 GB)
d4: Submirror of d3
State: Okay
Size: 67110720 blocks (32 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
/dev/dsk/c14t500000E01A3B3E30d0s1 0 No Okay Yes
d5: Submirror of d3
State: Okay
Size: 67110720 blocks (32 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
/dev/dsk/c14t500000E01A3B77E0d0s1 0 No Okay Yes
d0: Mirror
Submirror 0: d1
State: Okay
Submirror 1: d2
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 75709440 blocks (36 GB)
d1: Submirror of d0
State: Okay
Size: 75709440 blocks (36 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
/dev/dsk/c14t500000E01A3B3E30d0s0 0 No Okay Yes
d2: Submirror of d0
State: Okay
Size: 75709440 blocks (36 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
/dev/dsk/c14t500000E01A3B77E0d0s0 0 No Okay Yes
Device Relocation Information:
Device Reloc Device ID
/dev/dsk/c14t500000E01A0B1120d0 Yes id1,sd@n500000e01a0b1120
/dev/dsk/c14t5000C5000A6B8603d0 Yes id1,sd@n5000c5000a6b8603
/dev/dsk/c14t500000E01A3B77E0d0 Yes id1,sd@n500000e01a3b77e0
/dev/dsk/c14t500000E01A3B3E30d0 Yes id1,sd@n500000e01a3b3e30
/dev/dsk/c14t600A0B8000498E000000062148737EC4d0 Yes id1,ssd@n600a0b8000498e000000062148737ec4
/dev/dsk/c14t600A0B800049B18A0000066C49A582EFd0 Yes id1,ssd@n600a0b800049b18a0000066c49a582ef
[root@istnbp01 /]>> df -h
Filesystem size used avail capacity Mounted on
/dev/md/dsk/d0 36G 22G 13G 62% /
/devices 0K 0K 0K 0% /devices
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 84G 1.7M 84G 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
fd 0K 0K 0K 0% /dev/fd
swap 87G 3.6G 84G 5% /tmp
swap 84G 104K 84G 1% /var/run
/dev/dsk/c14t60A9800043346A364C4A47376545554Ed0s6
2.9T 2.3T 563G 81% /istnbp01_l1_stu1
/dev/dsk/c14t60A9800043346A364C4A47376546384Dd0s6
2.9T 2.3T 623G 79% /istnbp01_l2_stu2
/dev/dsk/c14t60A9800043346A364C4A473765467242d0s6
2.9T 2.4T 455G 85% /istnbp01_l3_stu3
/dev/md/dsk/d10 36G 12G 24G 34% /data
/dev/md/dsk/d20 536G 407G 124G 77% /opt/openv
[root@istnbp01 /]>> growfs -M /opt/openv /dev/md/dsk/d20
devinfo: /dev/md/dsk/d20: Inappropriate ioctl for device
growfs: cannot get partition size
[root@istnbp01 /]>> growfs -M /opt/openv /dev/md/rdsk/d20
/dev/md/rdsk/d20: Unable to find Media type. Proceeding with system determined parameters.
/dev/md/rdsk/d20: 1724448768 sectors in 280672 cylinders of 48 tracks, 128 sectors
842016.0MB in 17542 cyl groups (16 c/g, 48.00MB/g, 5824 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 98464, 196896, 295328, 393760, 492192, 590624, 689056, 787488, 885920,
Initializing cylinder groups:
...............................................................................
...............................................................................
...............................................................................
...............................................................................
..................................
super-block backups for last 10 cylinder groups at:
1723473440, 1723571872, 1723670304, 1723768736, 1723858976, 1723957408,
1724055840, 1724154272, 1724252704, 1724351136
[root@istnbp01 /]>> df -h
Filesystem size used avail capacity Mounted on
/dev/md/dsk/d0 36G 22G 13G 62% /
/devices 0K 0K 0K 0% /devices
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 84G 1.7M 84G 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
fd 0K 0K 0K 0% /dev/fd
swap 87G 3.6G 84G 5% /tmp
swap 84G 104K 84G 1% /var/run
/dev/dsk/c14t60A9800043346A364C4A47376545554Ed0s6
2.9T 2.3T 563G 81% /istnbp01_l1_stu1
/dev/dsk/c14t60A9800043346A364C4A47376546384Dd0s6
2.9T 2.3T 623G 79% /istnbp01_l2_stu2
/dev/dsk/c14t60A9800043346A364C4A473765467242d0s6
2.9T 2.4T 455G 85% /istnbp01_l3_stu3
/dev/md/dsk/d10 36G 12G 24G 34% /data
/dev/md/dsk/d20 810G 407G 397G 51% /opt/openv
[root@istnbp01 /]>>
[root@istnbp01 /]>>
[root@istnbp01 /]>>
[root@istnbp01 /]>>
[root@istnbp01 /]>>
[root@istnbp01 /]>> uname -a
SunOS istnbp01 5.10 Generic_137111-01 sun4u sparc SUNW,SPARC-Enterprise
[root@istnbp01 /]>> sneep
BCF0825030
[root@istnbp01 /]>> df -h
Filesystem size used avail capacity Mounted on
/dev/md/dsk/d0 36G 22G 13G 62% /
/devices 0K 0K 0K 0% /devices
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 80G 1.7M 80G 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
fd 0K 0K 0K 0% /dev/fd
swap 84G 3.6G 80G 5% /tmp
swap 80G 104K 80G 1% /var/run
/dev/dsk/c14t60A9800043346A364C4A47376545554Ed0s6
2.9T 2.3T 562G 81% /istnbp01_l1_stu1
/dev/dsk/c14t60A9800043346A364C4A47376546384Dd0s6
2.9T 2.3T 617G 80% /istnbp01_l2_stu2
/dev/dsk/c14t60A9800043346A364C4A473765467242d0s6
2.9T 2.4T 450G 85% /istnbp01_l3_stu3
/dev/md/dsk/d10 36G 12G 24G 34% /data
/dev/md/dsk/d20 810G 407G 397G 51% /opt/openv
[root@istnbp01 /]>> df -h
Filesystem size used avail capacity Mounted on
/dev/md/dsk/d0 36G 22G 13G 62% /
/devices 0K 0K 0K 0% /devices
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 80G 1.7M 80G 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
fd 0K 0K 0K 0% /dev/fd
swap 84G 3.6G 80G 5% /tmp
swap 80G 104K 80G 1% /var/run
/dev/dsk/c14t60A9800043346A364C4A47376545554Ed0s6
2.9T 2.3T 557G 82% /istnbp01_l1_stu1
/dev/dsk/c14t60A9800043346A364C4A47376546384Dd0s6
2.9T 2.3T 610G 80% /istnbp01_l2_stu2
/dev/dsk/c14t60A9800043346A364C4A473765467242d0s6
2.9T 2.4T 445G 85% /istnbp01_l3_stu3
/dev/md/dsk/d10 36G 12G 24G 34% /data
/dev/md/dsk/d20 810G 408G 397G 51% /opt/openv
Thanks for ur reply..do i def have to create a mirror for extending space for my existing file system which is not mirrored..
Thats what I have come across all these , as fas as I know
As I don't know the layout of your file systems/metadevices, the following may seem a bit theoretical.
Extending a file system with SVM is done in two steps:
first you extend the metadevice in which the filesystem resides, and
secondly you extend the file system itself.
If your file system resides in a "hard" partition (e.g. metadevice d50), you should add a disk to the existing disk or diskgroup (d50) with the metattach command:
metattach d50 cxtydzs2
cxtydzs2 being the new disk to add.
Now extend the file system with the growfs command.
growfs -M <mountpoint> /dev/md/rdsk/d50
It is important to use the "raw" device in this command (hence rdsk).
If, however, the file system is created in a "soft" partition (e.g.d100) that is located in a diskgroup (e.g. d50), you can assign unused space (e.g. 2 GB) from the diskgroup to the metadevice d100 with the same metattach command albeit with different syntax:
metattach d100 2g
Afterwards you can expand the filesystem with the growfs command as shown earlier on.
How do you check if there is any unused space in the diskgroup d50? By using the metarecover command:
metarecover -n -v d50 -p
This command generates quite some output ; the lines with the word FREE contain (expressed in blocks) the free space available in the metadevice. Just add them all together and you have the total free space left in your diskgroup d50.