VxVM : grow a VxFS filesystem using fsadm

My current filesystem is called fsdata ( it is a VxFS file system),    the df -k output shows it as 20m.

#df -k

/dev/dsk/c0t0d0s0    1488575 1086197  342835    77%    /
/proc                      0       0       0     0%    /proc
fd                         0       0       0     0%    /dev/fd
swap                  256640   32744  223896    13%    /tmp
/dev/vx/dsk/rootdg/outputs   383982  235404  110180    69%    /outputs
/dev/vx/dsk/rootdg/opt1   239855  132410   83460    62%    /opt1
/dev/dsk/c0t4d0s0     102600   37921   60643    39%    /vxfs
/dev/dsk/c0t4d0s3      20520 1109   18205     6%    /fsdata

Now to grow the vxfs2 filesystem we need to format and repartition the drive  for c0t4d0s3.

Here is the output of the partition table prior to increasing the size.

Part      Tag    Flag     Cylinders        Size            Blocks
0 unassigned    wm       0 –  134      100.20MB    (135/0/0)   205200
1 unassigned    wm       0               0         (0/0/0)          0
2 unassigned    wm       0 – 2732        1.98GB    (2733/0/0) 4154160
3 unassigned    wm     135 –  161       20.04MB    (27/0/0)     41040
4 unassigned    wm       0               0         (0/0/0)          0
5 unassigned    wm       0               0         (0/0/0)          0
6 unassigned    wm       0               0         (0/0/0)          0
7 unassigned    wm       0               0         (0/0/0)          0

Now we would repartition slice 3.

partition> 3
Part      Tag    Flag     Cylinders        Size            Blocks
3 unassigned    wm     135 –  161       20.04MB    (27/0/0)     41040
Enter partition id tag[unassigned]:
Enter partition permission flags[wm]:
Enter new starting cyl[135]:
Enter partition size[41040b, 27c, 20.04mb, 0.02gb]: 40mb
partition>

Now we have the slice as 40mb as seen in the next partition print.

Part      Tag    Flag     Cylinders        Size            Blocks
0 unassigned    wm       0 –  134      100.20MB    (135/0/0)   205200
1 unassigned    wm       0               0         (0/0/0)          0
2 unassigned    wm       0 – 2732        1.98GB    (2733/0/0) 4154160
3 unassigned    wm     135 –  188       40.08MB    (54/0/0)     82080
4 unassigned    wm       0               0         (0/0/0)          0
5 unassigned    wm       0               0         (0/0/0)          0
6 unassigned    wm       0               0         (0/0/0)          0
7 unassigned    wm       0               0         (0/0/0)          0

Take the last column and write down the number of sectors for part 3.. In this case it would be 82080 (which is the sectors) after labeling the disk, Quit out of format and then we could run this command.

#/usr/lib/fs/vxfs/fsadm -b 82080 /fsdata

vxfs fsadm: /dev/rdsk/c0t4d0s3 is currently 41040 sectors size will  be increased

and the output of df -k will reflect the changes

#  df -kl

Filesystem            kbytes    used   avail capacity  Mounted on
/dev/dsk/c0t0d0s0    1488575 1086197  342835    77%    /
/proc                      0       0       0     0%    /proc
fd                         0       0       0     0%    /dev/fd
swap                  256488   32744  223744    13%    /tmp
/dev/vx/dsk/rootdg/outputs 383982  235404  110180    69%    /outputs
/dev/vx/dsk/rootdg/opt1 239855  132482   83388    62%    /opt1
/dev/dsk/c0t4d0s0     102600   37921   60643    39%    /vxfs
/dev/dsk/c0t4d0s3      41040 1117   37435     3%    /vxfs2

Ramdev

Ramdev

I have started unixadminschool.com ( aka gurkulindia.com) in 2009 as my own personal reference blog, and later sometime i have realized that my leanings might be helpful for other unixadmins if I manage my knowledge-base in more user friendly format. And the result is today's' unixadminschool.com. You can connect me at - https://www.linkedin.com/in/unixadminschool/

3 Responses

  1. anon says:

    Hey, thanks for the post.Really thank you! Keep writing.

  2. Siva says:

    Hi,

    Having 1 doubt, which command is used display the bsize and logsize used on an existing filesystem?

    Regards,
    Siva

  1. September 18, 2015

    […] Read – Grow a VxFS filesystem using fsadm […]

What is in your mind, about this post ? Leave a Reply

Close
  Our next learning article is ready, subscribe it in your email

What is your Learning Goal for Next Six Months ? Talk to us