# Filesystem ACFS autoextendible 

**CREAMOS UN PUNTO DE MONTAJE ACFS DE 1 GB**

```shell
[grid@host ~]$ asmcmd volcreate -G RECOC5 -s 1G volume_reco
[grid@host ~]$ asmcmd volinfo -G RECOC5 volume_reco
Diskgroup Name: RECOC5

         Volume Name: VOLUME_RECO
         Volume Device: /dev/asm/volume_reco-21
         State: ENABLED
         Size (MB): 1024
         Resize Unit (MB): 64
         Redundancy: MIRROR
         Stripe Columns: 8
         Stripe Width (K): 1024
         Usage:
         Mountpath:

[grid@host ~]$ /sbin/mkfs -t acfs /dev/asm/volume_reco-21
mkfs.acfs: version                   = 12.2.0.1.0
mkfs.acfs: on-disk version           = 46.0
mkfs.acfs: volume                    = /dev/asm/volume_reco-21
mkfs.acfs: volume size               = 1073741824  (   1.00 GB )
mkfs.acfs: Format complete.

[grid@host ~]$ logout
[root@host ~]# /sbin/acfsutil registry -a /dev/asm/volume_reco-21 /home/oracle/ACFS
acfsutil registry: mount point /home/oracle/ACFS successfully added to Oracle Registry
[root@host ~]# chown -R oracle:oinstall /home/oracle/ACFS
[root@host ~]# su - oracle
[oracle@host ~]$ cd ACFS/
[oracle@host ACFS]$ df -h .
Filesystem               Size  Used Avail Use% Mounted on
/dev/asm/volume_reco-21  1.0G  487M  538M  48% /home/oracle/ACFS
```

**INTENTAMOS COPIAR UN ARCHIVO DE 2 GB**

```shell
[oracle@host ACFS]$ cd /tmp/
[oracle@host tmp]$ fallocate -l 2G testfile_2g.img
[oracle@host tmp]$ cp testfile_2g.img /home/oracle/ACFS/
cp: error writing ‘/home/oracle/ACFS/testfile_2g.img’: No space left on device
cp: failed to extend ‘/home/oracle/ACFS/testfile_2g.img’: No space left on device
```

Aquí el comando falló, porque en el filesystem destino no hay suficiente espacio y tampoco se autoextiende.

**HABILITAMOS EL AUTOEXTEND**

Notar que le indicamos que puede crecer automáticamente **hasta 10G**

```shell
[oracle@host tmp]$ logout
[root@host ~]# acfsutil size -a 1G -x 10G /home/oracle/ACFS
acfsutil size: ACFS-03642: successfully updated auto-resize settings
```

**NUEVAMENTE INTENTAMOS COPIAR UN ARCHIVO DE 2 GB**

```shell
[root@host ~]# su - oracle
[oracle@host ~]$ cd /tmp/
[oracle@host tmp]$ cp testfile_2g.img /home/oracle/ACFS/
```

Ahora el archivo se copió bien. Aquí vemos como el filesystem se autoextendió automáticamente cuando lo necesitó:

```shell
[oracle@exadbadm01vm05 tmp]$ df -h /home/oracle/ACFS/
Filesystem               Size  Used Avail Use% Mounted on
/dev/asm/volume_reco-21  4.0G  2.6G  1.5G  63% /home/oracle/ACFS
```

¡Y eso es todo!

Hasta el próximo post 😀

Saludos desde Buenos Aires, Argentina
