среда, 27 февраля 2013 г.

ACFS

1. Создаем точки монтирования:

# mkdir  /u09/acfs
# cd /u09
# chown oradb:oinstall acfs
# chmod g+w acfs


2. Создаем тома на дисковой группе:

(sqlplus)

alter diskgroup acfsdg add  volume acfs_v1 size 100g;
select volume_name, volume_device from v$asm_volume;

(asmcmd)

ASMCMD [+] > volcreate -G acfsdg -s 100G acfs_v1
ASMCMD [+] > volinfo -a


3. Информация о томах:

ASMCMD> volinfo -a
Diskgroup Name: ACFSDG

         Volume Name: ACFS_V1
         Volume Device: /dev/asm/acfs_v1-27
         State: ENABLED
         Size (MB): 3813376
         Resize Unit (MB): 32
         Redundancy: UNPROT
         Stripe Columns: 4
         Stripe Width (K): 128
         Usage: ACFS
         Mountpath:

ASMCMD> exit


4. How to automatically mount the filesystem, after reboots

$ /usr/lib/fs/acfs/acfsutil registry -a  /dev/asm/acfs_v1-27  /u09/acfs
acfsutil registry: ACFS-05062: cannot query CRS resource


This command will add this filesystem in the Grid registry & will mount it after reboot or grid restart.
To unregister a file system from the Oracle Automatic Storage Management volume registry

/usr/lib/fs/acfs/acfsutil registry -d  /u09/acfs
acfsutil registry: ACFS-03143: The specified mount point does not exist and therefore cannot be deleted.



5. Создаем файловые системы на томах:

# mkfs -F acfs /dev/asm/acfs_v1-27 (Solaris)
# mkfs -t acfs /dev/asm/acfs_v1-27 (Linux)
# mkfs -V acfs /dev/asm/acfs_v1-27 (AIX)


# ls -lLh /dev/asm
total 0
brwxrwx---   1 root     asmadmin 308, 13825 Dec  6 14:15 acfs_v1-27
crwxrwx---   1 root     asmadmin 308, 13825 Dec  6 15:26 racfs_v1-27
#

# ls -l /dev/asm
total 2
lrwxrwxrwx   1 oragrid  oinstall      41 Dec  6 14:15 acfs_v1-27 -> /devices/pseudo/oracleadvm@0:acfs_v1-0-27
lrwxrwxrwx   1 oragrid  oinstall      45 Dec  6 14:15 racfs_v1-27 -> /devices/pseudo/oracleadvm@0:acfs_v1-0-27,raw
#


$ mkfs -F acfs /dev/asm/acfs_v1-27

mkfs: version                   = 11.2.0.3.0
mkfs: on-disk version           = 39.0
mkfs: volume                    = /dev/asm/acfs_v1-27
mkfs: ACFS-01010: Volume already contains an ACFS file system.  To reformat the volume, reissue mkfs with the -o f option.
mkfs: ACFS-01004: /dev/asm/racfs_v1-27 was not formatted.


$ mkfs -o f -F acfs /dev/asm/acfs_v1-27
mkfs: version                   = 11.2.0.3.0
mkfs: on-disk version           = 39.0
mkfs: volume                    = /dev/asm/acfs_v1-27
mkfs: volume size               = 3998614552576
mkfs: Format complete.

$

6. Монтируем созданные файловые системы

# mount -F acfs /dev/asm/acfs_v1-27  /u09/acfs (Solaris)
# mount -t acfs /dev/asm/acfs_v1-27  /u09/acfs (linux)
# mount -V acfs /dev/asm/acfs_v1-27  /u09/acfs (AIX)


# mount -F acfs /dev/asm/acfs_v1-27  /u09/acfs


# su - oradb
Oracle Corporation      SunOS 5.10      Generic Patch   January 2005
You have new mail.


7. Check and repair an Oracle ACFS file system.

# fsck -a -v -y -F acfs /dev/asm/acfs_v1-27 (Solaris)
# fsck -a -v -y -t acfs /dev/asm/acfs_v1-27 (Linux)
# fsck -a -v -y -V acfs /dev/asm/acfs_v1-27 (AIX)


8. Check

$ cd /u09/acfs

$ touch aaa

$ ls -l
total 128
-rw-r--r--   1 oradb    oinstall       0 Dec  6 16:01 aaa
drwx------   2 root     root       65536 Dec  6 15:40 lost+found


9. Изменять размер тома можно так:

/usr/lib/fs/acfs/acfsutil size -100G  /u09/acfs

$


1. Unmount the file system

# mount  /u09/acfs

# umount -a -t acfs (Linux Only)
# unmountall -F acfs (Solaris, AIX)



2. De-register the file system

# acfsutil registry -d /u09/acfs
acfsutil registry: successfully removed ACFS mount point /u09/acfs from Oracle Registry


3. Remove the file system

# /usr/lib/fs/acfs/acfsutil rmfs /dev/asm/acfs_v1-27


4. Disable the volume

ASMCMD> voldisable -G acfsdg acfs_v1

5. Delete the volume

ASMCMD> voldelete  -G acfsdg acfs_v1


6. Drop the volumne from the diskgroup

SQL> alter diskgroup acfsdg drop volume acfs_v1;

Diskgroup altered.


SQL> select volume_name,volume_device from v$asm_volume;

no rows selected


Комментариев нет:

Отправить комментарий