Filesystem
entry in #/etc/fstab
partitions
-------------------------
5(or f)--Extended
82 --linux swap
83 --linux (ext2, ext3)
8e --linux LVM
fd --linux RAID auto
-------------------------
1. tool:
(1). fdsik
(2). spfdisk
(3). parted
#partprobe
reinitializes the kernel's in-memory version of the partition table
2. making filesystems
(1).mkfs
(2).mkfs.ext2 , mkfs.ext3
(3).mke2fs [option] device
options:
-c : check the device for bad blocks(sectors)
-L : set the volume label
-j : create an ext3 journal inode and filesystem
-N: allow you to specify the number of inodes directly
3. filesystem labels
(1)e2label dev-file [fslabel]
ex: #e2label /dev/hda7 dbdisk1
(2) mount LABEL=fslabel mount-point
ex: #mount LABEL=dbdisk1 /dev/hda7 /mnt/data
4. tune2fs : adjusts filesystem parameters
#adjust
#tune2fs -o acl,user_xattr /dev/sdb1
#list
#tune2fs -l /dev/sdb1
5. mount ( /etc/fstab)
#mount -a : mount all filesystem
/etc/fstab
----------------------------------------------------------------------------------------------------
device mount-point fstype options dump_freq fsck_order
LABEL=/mnt/data /mnt/data ext3 defaults 0 0
#mount [-t fstype][-o options] device mount-point
default options for ext3
(1)rw, ro: read and wirte
(2)suid, nosuid: suid or sgid file modes honored
(3)dev, nodev : device files permitted
(4)exec, noexec : permit execution of binaries
(5)async, sync : file changes managed asynchronously
other options
(6)acl : ACLs are honored
#umount [options] device|mount-point
ex:
#umout /mnt/data
#umount /dev/sda7
(7)remount option
#mount remount,rw /
#mount remount,acl /home
6. Swap files and partitions
#mkswap -L swap-hda6 /dev/hda6
#vi /etc/fstab
#swapon -a (active)
#swapon -s (status)
%swap file
#dd if=/dev/zero of=/dev/swapfile bs=1024(blocksize) count=X
#mkswap swapfile
#vi /etc/fstab
#swapon -a
#swapon -s
- Jul 21 Tue 2009 23:59
[雜記]RHCE筆記整理-RH133-Unit5(1)
close
全站熱搜
留言列表
發表留言