An Image/Link below is provided (as is) to download presentation
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.Content is provided to you AS IS for your information and personal use only.Download presentation by click this link.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.During download, if you can't get a presentation, the file might be deleted by the publisher.
2.1 建立文件系统 • Block Device Naming • Most block devices are located in /dev • SCSI disks • Disk or logical volume: sd[a-iv] • Primary partitions: sda[1-4] • Logical partitions: sda[5-15] • IDE disks • Disk or logical volume: hd[a-t] • Primary partitions: hda[1-4] • Logical partitions: hda[5-31]
2.1 建立文件系统分区 • 检查新设备,可以使用下列命令 • fdisk -l • /proc/diskstats > dmesg • fdisk 命令对硬盘做分区 • # fdisk [device] • fdisk 里的常用命令 • a toggle a bootable flag • d delete a partition • m print this menu • n add a new partition • p print the partition table • q quit without saving changes • t change a partition's system id • 82 Linux Swap • 83 Linux • w write table to disk and exit
Creating Extended Partitions # /sbin/fdisk /dev/sde Command (m for help): n Command action e extended p primary partition (1-4) e Partition number (1-4): 1 First cylinder (1-1020, default 1): 1 Last cylinder or +size or +sizeM or +sizeK (1-1020, default 1020): 1020 Command (m for help): w The partition table has been altered!
Creating Logical Partitions # /sbin/fdisk /dev/sde Command (m for help): n Command action l logical (5 or over) p primary partition (1-4) l First cylinder (1-1020, default 1): Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-1020, default 1020): +5m Command (m for help): p Disk /dev/sde: 232 heads, 62 sectors, 1020 cylinders Units = cylinders of 14384 * 512 bytes Device Boot Start End Blocks Id System /dev/sde1 1 1020 7335809 5 Extended /dev/sde5 1 1 7130 83 Linux
ext2 vs. ext3 • ext2 used to be the most common Linux filesystem • ext3 is based on ext2 • Same on-disk structure • ext2 can be converted to ext3 • ext3 can be mounted as an ext2 file system • ext3 is a journaling filesystem • Preserves data integrity better than ext2 • Faster and safer fsck after system crash
/proc Filesystem • /proc is a virtual file system • Provides an instantaneous view of the operation of the system • /proc/meminfo, /proc/mounts, /proc/partitions • Can be viewed with cat, more, less • Can be used to configure kernel parameters • Settable parameters are below /proc/sys • Can be set with echo or via sysctl
shmfs • Mount tmpfs on /dev/shm via fstab • Option “size=8g” means 8GB • Option “size=??” can be larger than physical RAM • Required by Oracle for VLM mode • Only used for buffer cache • Never used in non-VLM mode
Write Read Process Disk file 裸设备 Raw Devices • I/O directly to partitions instead of a filesystem • Eliminates copying to/from filesystem cache • Each raw device is a character device • Character device major number 162 • Requires more experienced administration • Devices will be either in /dev or /dev/raw • Device names are raw1 – 255 by convention • May need to manually create raw129 – raw255: • e.g., mknod /dev/raw/raw129 c 162 129 • Minor #0 is special and can’t be used for I/O • Implies a limit of 255 raw devices • DB files should be symlinks to /dev/raw/raw*
创建裸设备 • Create partitions of type “Linux” (type id=83) • Use /sbin/raw to bind raw device with a partition • Examples: • # /sbin/raw /dev/raw/raw1 /dev/sdc1 • # /sbin/raw /dev/raw/raw1 8 33 • Give oracle user ownership of raw device: • # chown oracle:dba /dev/raw/raw1 • Bindings are not persistent across reboot • Use /etc/sysconfig/rawdevices
System V Shared Memory • Used by Oracle for the SGA • May have multiple segments if shmmax is low • Normally all segments deleted at shutdown • If instance crashes, segments may hang around • To view existing segments: • /usr/bin/ipcs • To manually remove a segment: • /usr/bin/ipcrm shm <shm_id>
Oracle Clustered Filesystem • OCFS delivers raw-like performance with tremendous advantages in management and usability • All database related files reside on a clustered filesystem • Visible to all nodes • Open source project sponsored by Oracle • Supports asynchronous I/O as of v1.0.9 • Free to use • Get fix for bug #2883583 • Allows cp, dd & tar of open database files needed for hot backup