Wednesday, June 15, 2011

File System Management

### Steps necessary to slice & create file systems###

Steps:

1. unmount existing file systems
-umount /data2 /data3

2. confirm fdisk partitions via 'format' utility
-format - select disk - select fdisk

3. use partition - modify to create slices on desired drives

DISK1   -slice 0 - /dev/dsk/c0t1d0s0

DISK2   -slice 0 - /dev/dsk/c0t2d0s0

4. Create file system using 'newfs /dev/rdsk/c0t0d0s0'

5. Use 'fsck /dev/rdsk/c0t1d0s0' to verify the consistency of the file system

6. Mount file systems at various mount points

  #mount /dev/dsk/c0t1d0s0 /data2
  #mount /dev/dsk/c0t2d0s0 /data3

7. create entries in Virtual File System Table (/etc/vfstab) file

###How to determine file system associated with device###

1. fstyp /dev/dsk/c0t0d0s0 - returns file system type

2. grep mount point from /etc/vfstab - returns matching line

grep /var /etc/vfstab

3. cat /etc/mnttab - displays currently mounted file system

###Temporary File System (TEMPFS) Implementation###

TempFS provides in-memory (RAM), very fast, storage and boosts application performance

Steps:

1. Determine available memory and the amount you can spare for TEMPFS

   #prtconf 
   #allocate 100MB

2. Execute mount command:
   #mkdir /tempdata
   #chmod 777 /tempdata
   #mount -F tmpfs -osize=100m swap /tempdata

Note: TEMPFS data does NOT persist/survive across reboots
Note: TEMPFS data is lost when the following occurs:

1. TEMPFS mount point is unmounted: i.e. umount /tempdata

2. System reboot

Modify /etc/vfstab to include the TEMPFS mount point for reboots

#swap - /tempdata tmpfs - yes -

###Swap File/Partition Creation###

 #swap -l | -s - to display swap information

#mkfile size location_of_file - to create swap file

  #mkfile 512m /data2/swap2

  #swap -a /data2/swap2 - activates swap file

 ##To remove swap file:

  #swap -d /data2/swap2 - removes swap space from kernel. does NOT remove file

  #rm -rf /data2/swap2

###Swap Partition Creation###

format - select disk - partition - select slice/modify

  #swap -a /dev/dsk/c0t2d0s1

Modify /etc/vfstab

No comments:

Post a Comment



Follow storageadmiins on Twitter Follow storageadmiins on Twitter