Login or Register to Ask a Question and Join Our Community

How to grow a zfs file system?

Thread Tools Search this Thread
Operating Systems Solaris How to grow a zfs file system?
# 1  
Old 03-06-2017
How to grow a zfs file system?


I have the following file system, that needs to be expanded to more 500Gb, so a total of 1Tb:
 df -h /oradata1
Filesystem             Size   Used  Available Capacity  Mounted on
oradata1               587G   517G        69G    89%    /oradata1

I am not familiar with zfs, I am more used to ufs, so how can I go about it?
# 2  
Old 03-06-2017
Depends on how your zpool is setup... You might just add a new disk to grow your pool and you might be done...

Managing ZFS File Systems in Oracle(R) Solaris 11.3
# 3  
Old 03-06-2017
thanks for the reply.
The previous sys admin setup this server like this below:
 zpool list
oradata   500G   473G  27.5G  94%  1.00x  DEGRADED  -
oradata1  596G   517G  78.8G  86%  1.00x    ONLINE  -
rpool     136G   132G  4.10G  96%  1.00x    ONLINE  -
root@solaris:~# zfs list
NAME                       USED  AVAIL  REFER  MOUNTPOINT
oradata                    473G  19.6G   473G  /oradata
oradata1                   517G  69.5G   517G  /oradata1
rpool                      132G  1.47G  73.5K  /rpool
rpool/ROOT                 105G  1.47G    31K  legacy
rpool/ROOT/solaris         105G  1.47G   104G  /
rpool/ROOT/solaris/var     660M  1.47G   498M  /var
rpool/dump                8.19G  1.72G  7.94G  -
rpool/export              11.3G  1.47G  33.5K  /export
rpool/export/home         11.3G  1.47G    34K  /export/home
rpool/export/home/cmovel  4.66G  1.47G  4.66G  /export/home/cmovel
rpool/export/home/oracle  6.66G  1.47G  6.66G  /export/home/oracle
rpool/swap                2.06G  1.53G  2.00G  -
rpool/swap2               6.19G  1.66G  6.00G  -
root@solaris:~# df -h
Filesystem             Size   Used  Available Capacity  Mounted on
rpool/ROOT/solaris     134G   104G       1.5G    99%    /
/devices                 0K     0K         0K     0%    /devices
/dev                     0K     0K         0K     0%    /dev
ctfs                     0K     0K         0K     0%    /system/contract
proc                     0K     0K         0K     0%    /proc
mnttab                   0K     0K         0K     0%    /etc/mnttab
swap                   268M   2.2M       266M     1%    /system/volatile
objfs                    0K     0K         0K     0%    /system/object
sharefs                  0K     0K         0K     0%    /etc/dfs/sharetab
fd                       0K     0K         0K     0%    /dev/fd
                       134G   498M       1.5G    25%    /var
swap                   266M     0K       266M     0%    /tmp
rpool/export           134G    33K       1.5G     1%    /export
rpool/export/home      134G    34K       1.5G     1%    /export/home
                       134G   4.7G       1.5G    77%    /export/home/cmovel
                       134G   6.7G       1.5G    82%    /export/home/oracle
oradata                492G   473G        20G    97%    /oradata
oradata1               587G   517G        69G    89%    /oradata1
rpool                  134G    73K       1.5G     1%    /rpool
/export/home/cmovel    6.1G   4.7G       1.5G    77%    /home/cmovel

Now, the oracle dba wants me to either expand /oradata1or create a new /oradata2
# 4  
Old 03-06-2017

Sorry to butt in, but as an aside to your main question, I'd be far more worried about this before thinking about doing anything else:

oradata   500G   473G  27.5G  94%  1.00x  DEGRADED  -

The oradata pool is in a degraded state, which means it's experienced a failure of some kind and so its redundancy is likely to be severely reduced or non-existent. As a priority, you probably want to run zpool status -v oradata and see what has actually gone wrong and sort that out.

Of course, if the oradata pool isn't in use any longer or you otherwise have reasons not to care about its data then that's fine I suppose. But I just thought I'd mention this, since if it were me, and this is a live pool, I'd want to sort this out urgently before doing anything else.
# 5  
Old 03-06-2017

They are not using that, at the moment. the output of the statusis:
 zpool status -v oradata
  pool: oradata
 state: DEGRADED
status: One or more devices has experienced an unrecoverable error.  An
        attempt was made to correct the error.  Applications are unaffected.
action: Determine if the device needs to be replaced, and clear the errors
        using 'zpool clear' or replace the device with 'zpool replace'.
   see: http://www.sun.com/msg/ZFS-8000-9P
  scan: none requested

        NAME                     STATE     READ WRITE CKSUM
        oradata                  DEGRADED     0     0     0
          c4t500A09828DE3E799d0  DEGRADED     0     0     0  too many errors

errors: No known data errors

# 6  
Old 03-06-2017

OK. Well, if you're 100% absolutely sure you don't care about anything that happens to the data on that pool, then I suppose there's nothing you need to do about it.

Returning to your original question: firstly, I have to say I'm relatively new to ZFS myself, having only recently come back to Solaris on a regular basis. But from what I've learned thus far, the first thing is (as per the earlier advice from DukeNuke2) to figure out what kind of pool you've got. The Oracle documentation he linked you to this morning is also excellent, and covers pretty much everything you need to know in terms of how to add things.

So take a look at the output of zpool status -v oradata1, find out if it's made of mirrors, some kind of RAID, what devices are in it, and then once you know that you'll be able to determine the best way to add a device to it.
# 7  
Old 03-06-2017
Another comment about your ZFS pools.

Your root pool is almost full, has only 4% left:
rpool     136G   132G  4.10G  96%  1.00x    ONLINE  -

You are strongly advised to leave more free space in active ZFS pools as otherwise, the performance will suffer a lot due to the system trying to find free space and the data fragmentation resulting from the lack of contiguous areas. Not exceeding 80% is a safe bet.

Back to the topic, the "long" name reported for the oradata disk (c4t500A09828DE3E799d0) suggests a storage array is used to build this pool.

Exanding the oradata1 pool might then be achieved simply by enlarging the underlying LUN. Depending on your ZFS settings, nothing more might be required.

You might want to post these commands output for us to get a better idea about your configuration:
cat /etc/release
zpool status oradata1
zpool get autoexpand oradata1
cfgadm -al -o show_SCSI_LUNS c4

Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

2540 volume expand and solaris zfs grow

Hello I hope everyone is having a good day! Situation: 2540 with 3.6TB of usable space volume A is 2.6TB volume B was 1TB Volume A is mounted via a single lun on a solaris server and is running out of space. Volume B was used on another server but is no longer, I deleted the volume in... (7 Replies)
Discussion started by: Metasin
7 Replies

2. Emergency UNIX and Linux Support

Not able to extend ZFS file system

Hi All, I have Solaris-10 configured with two non-global zones. All file-systems are mounted on global zone and data file-systems are mounted on non-global zone as lofs. I have added 4 luns of 100 GB each and still not able to extend a file-system. This is production server, so I can not... (5 Replies)
Discussion started by: solaris_1977
5 Replies

3. Solaris

Grow / expand a ZFS volume

Hi, I need to expand a ZFS volume from 500GB to 800GB. I'd like to ask your help to confirm the following procedure: Can I do it on the fly without bothering the users working on this volume? Thank you in advance! (6 Replies)
Discussion started by: aixlover
6 Replies

4. Solaris

Patching on ZFS file-system

Hi, I have Solaris-10 (Update-7). This is having ZFS file-system and 10 sparse-root zones are there. I want to install Solaris-10 recommended patch cluster on it, but not sure, how to go ahead with procedure. I want to patch one side of the mirror and keep intact another side safe in case of... (6 Replies)
Discussion started by: solaris_1977
6 Replies

5. Solaris

increase SWAP on ZFS file system

Hi All, I am using this commands to dynamically increase ZFS swap space on Solaris my question is: 1- after i make these commands it will permanent or it will remove after restart 2- how to make it permanent # swap -l swapfile dev swaplo bloques libre /dev/zvol/dsk/rpool/swap... (4 Replies)
Discussion started by: osmanux
4 Replies

6. Shell Programming and Scripting

ZFS file system - memory monitoring

I am working on a server where the 'root' user ZFS filesystem. Now when I do Top commands it says only 750M free .But when I count the actual memory utilized it comes only to 12 GB and the total size of the server is 32G. I think rest of the space is held up by ZFS file system. Is there a... (5 Replies)
Discussion started by: prasperl
5 Replies

7. Solaris

How to grow my files System?

Dear Gurus of Unix. When I Put this command: # iostat -E cmdk0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 Model: SAMSUNG SV4012H Revision: Serial No: 0540J1BTC53208 Size: 40.06GB <40060403712 bytes> Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 Illegal... (6 Replies)
Discussion started by: andresguillen
6 Replies

8. AIX

Cannot grow jfs file system on AIX 5.2

Hello all, I'm trying to grow a file system by 500MB using SMIT on AIX 5.2 but I receive this error: "0516-404 allocp: This system cannot fulfill the allocation request. There are not enough free partitions or not enough physical volumes to keep strictness and satisfy allocation requests.... (3 Replies)
Discussion started by: need2bageek
3 Replies

9. UNIX for Dummies Questions & Answers

zfs file system

Hi, I try add a new file system: #zfs create dsk1/mqm it came back with: #cannot create 'dsk1/mqm': no such pool 'dsk1' what do I have to do? Kind regards Mehrdad (2 Replies)
Discussion started by: mehrdad68
2 Replies
Login or Register to Ask a Question

Featured Tech Videos