Filesystem - error when extend the filesystem

Hi all,

currently , my root filesystem already reach 90 ++%
I already add more cylinder in the root partition as below

Part      Tag    Flag     Cylinders        Size            Blocks
  0       root    wm      67 - 5086       38.46GB    (5020/0/0)  80646300
  1       swap    wu       1 -   66      517.72MB    (66/0/0)     1060290
  2     backup    wm       0 - 8920       68.34GB    (8921/0/0) 143315865
  3 unassigned    wm       0               0         (0/0/0)            0
  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
  8       boot    wu       0 -    0        7.84MB    (1/0/0)        16065
  9 unassigned    wm       0               0         (0/0/0)            0

partition>

but when i using growfs to extend it?
it come out this error

# growfs -M / /dev/dsk/c0t0d0s0
devinfo: /dev/dsk/c0t0d0s0: No such file or directory
growfs: cannot get partition size

** i am refer the below link

current space

# df -h
Filesystem             size   used  avail capacity  Mounted on
/dev/dsk/c2t0d0s0      5.6G   5.0G   499M    92%    /
/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                   3.0G   920K   3.0G     1%    /etc/svc/volatile
objfs                    0K     0K     0K     0%    /system/object
sharefs                  0K     0K     0K     0%    /etc/dfs/sharetab
/usr/lib/libc/libc_hwcap1.so.1
                       5.6G   5.0G   499M    92%    /lib/libc.so.1
fd                       0K     0K     0K     0%    /dev/fd
swap                   3.0G    80K   3.0G     1%    /tmp
swap                   3.0G    28K   3.0G     1%    /var/run

any idea ?

Try /dev/dsk/c2t0d0s0 instead of /dev/dsk/c0t0d0s0 :wink:

Thanks for Ur reply
still get the same error

# growfs -M / /dev/dsk/c2t0d0s0
devinfo: /dev/dsk/c2t0d0s0: Inappropriate ioctl for device
growfs: cannot get partition size

"Inappropriate ioctl for device" isn't the same error as "No such file or directory".

1: You need to specify a raw device.
2: You can't grow / anyway. You need to boot from a different media to achieve that.

All, Can we grow a file system even if its not part of any volume?

Yes as long as the underlying partition can be grown.

Thanks all..
i successful extend the root file system by using this

  1. extend the cylinders
  2. growfs -M / /dev/rdsk/c2t0d0s0

specify a raw device

# df -h
Filesystem             size   used  avail capacity  Mounted on
/dev/dsk/c2t0d0s0       38G   5.1G    33G    14%    /
/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                   3.0G   916K   3.0G     1%    /etc/svc/volatile
objfs                    0K     0K     0K     0%    /system/object
sharefs                  0K     0K     0K     0%    /etc/dfs/sharetab
/usr/lib/libc/libc_hwcap1.so.1
                        38G   5.1G    33G    14%    /lib/libc.so.1
fd                       0K     0K     0K     0%    /dev/fd
swap                   3.0G    80K   3.0G     1%    /tmp
swap                   3.0G    28K   3.0G     1%    /var/run

Thanks jlliagre

Can you please put some light as what you mean by

Does it mean that you got free cylinder, then that can be used withing root or any other slice ?

Thanks again

The free cylinders need to be contiguous to the end of the existing slice.

My best advice would be for you to use ZFS and forget about most if not all of these issues.

Thanks jlliagre!

Assume if my slice two is like

0 to 32456

and i have a slice 6 which is assign as 32000 to 32400, can i extend the size of this slice with the remaining cylinders( which is 56 in this example) without loosing the data??

Yes, assuming these 56 cylinders aren't already used by another slice.

Thanks jlliagre!