Growing a file system-SVM


 
Thread Tools Search this Thread
Operating Systems Solaris Growing a file system-SVM
# 1  
Old 02-19-2010
Growing a file system-SVM

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..
# 2  
Old 02-19-2010
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
# 3  
Old 02-19-2010
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???
# 4  
Old 02-19-2010
If u dont use SVM create one way mirror for that

Example ;

Cretate one way mirror

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

Code:
[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


Last edited by pludi; 02-19-2010 at 06:06 AM.. Reason: code tags, please!!!!!
# 5  
Old 02-19-2010
Thanks for ur reply..do i def have to create a mirror for extending space for my existing file system which is not mirrored..
# 6  
Old 02-19-2010
Quote:
Originally Posted by madanmeer
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
# 7  
Old 02-20-2010
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:

Code:
metattach d50 cxtydzs2

cxtydzs2 being the new disk to add.

Now extend the file system with the growfs command.

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

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

Code:
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Pinned system memory growing constantly

Hi, Pre data: a server running AIX 6.1 TL9 with 2GB memory and a small amount of CPU, running a very light workload. I have a server which crashed on lack of memory. After the crash I found - using nmon analyser - that there was something eating up memory. Nmon referred to it as "system". ... (1 Reply)
Discussion started by: trifo75
1 Replies

2. Solaris

Extending the / file system (SVM)

Hi, I currently have a Solaris 10 server with the / root file system using SVM. Here is the information of the current setup. Filesystem size used avail capacity Mounted on /dev/md/dsk/d0 3.0G 635M 2.3G 22% / bash-3.2# metastat d0 d0: Mirror ... (3 Replies)
Discussion started by: MR.bean
3 Replies

3. UNIX for Dummies Questions & Answers

How to check if my log file is growing properly?

Hi All, I want to check if one my log file is updating properly, how can I achieve it. The approach I am trying is to get the file size at two different interval and than comparing it eg : $ ls -ltr | tail -1 | awk '{print $5}' 20480 (7 Replies)
Discussion started by: mukulverma2408
7 Replies

4. UNIX for Advanced & Expert Users

Incremental extract from growing log file.

We have a log file which has 16 million row. We want to read all the lines appended from the last time we read using sed command sed -n '<START_LINE>,<LAST_LINE>p' abc.csv I can store this last line line so I can give replace that with START_LINE in my next read. The problem is wc -l which... (2 Replies)
Discussion started by: one2connect
2 Replies

5. Solaris

How to extend an existing file system using SVM in solaris 10

Hi All I want to extend this file system to 120Gb: df -h /xyz Filesystem size used avail capacity Mounted on /dev/md/dsk/d80 98G 35G 62G 37% /xyzand the NetApp admin is going to give me an LUN with 22Gb. This file system is mounted on: metastat d80... (1 Reply)
Discussion started by: fretagi
1 Replies

6. UNIX for Dummies Questions & Answers

Find the file which is growing at high speed

Hi, A log file which is growing at high speed, don't know the name of it. How to find the respective file? Many thanks. (2 Replies)
Discussion started by: venkatesht
2 Replies

7. HP-UX

how to redirect the growing contents of log file to another file in unix

how to redirect the growing contents of log file to another file in unix (2 Replies)
Discussion started by: megh
2 Replies

8. UNIX for Dummies Questions & Answers

Find out the maximum growing file in a mount

I need to find the file that is growing in the mount. Say yesterday the utilised space was 95% but today that is 96%. How do i find the file that is growing in size. Have checked the same with du/df options but was not able to find much. Please suggest the best possible option. (3 Replies)
Discussion started by: raman1605
3 Replies

9. UNIX for Dummies Questions & Answers

.osm file growing

my /etc/.osm file is growing rapidly and logging large amounts of activity. Can anyone tell me what this file is for and what types of information is logged in this file. Thanks in advance for your help!! (1 Reply)
Discussion started by: golfs4us
1 Replies

10. UNIX for Advanced & Expert Users

How to check a file in UNIX is closed or growing?

We have a third party tool in UNIX to kick off a 'file copy' job based on a file existance. If a specific file exists in an UNIX directory, another process should start copy the file into another system for further processing. The issue is, the copy job is starting as soon as the file exists in... (6 Replies)
Discussion started by: kslakshm
6 Replies
Login or Register to Ask a Question