其他討論區 > 課後溫習+認證考試

File System: (1)Swap, (2)Mount, (3)ext3, (4)Quota

(1/4) > >>

小徒兒:
Swap hd

1.fdisk ;n;t;82;w;reboot
2.mkswap /dev/hda12
3.swapon /dev/hda12
4.cat /proc/swap
5.free
6.vi /etc/fstab



--- 代碼: ---/dev/hda12 swap swap defaults 0,0
--- 程式碼結尾 ---


7.swapoff

-----------------------------------------------------------------

  
  

swap file

1.dd if=/dev/zero of=/tmp/swap bs=4086K count=10
2.mkswap /tmp/swap
3.swapon /tmp/swap
4.free

netman:
關於 file system 與 hardlink 部份, 可參考:
http://phorum.study-area.org/viewtopic.php?t=17506
http://phorum.study-area.org/viewtopic.php?t=12235

小徒兒:
嗯~ 老實說,觀念上的問題像是hard link soft link 或file system的inode block datablock,我覺得還是上課聽比較清楚,也比較輕鬆哩.. : P

小徒兒:
mount -o remount ro /dev/hda2
mount -rt iso9660 /dev/hdc/cdrom
mount -t msdos /dev/fd0 /floppy
mount -o loop bootnet.img /mnt/floppy
mount -o loop,ro SUSE-8.2-CD1.iso /media/cdrom


mount
mount |grep '^dev'
cat /etc/mtab
cat /proc/mounts

fuser -v /usr

umount /dev/cdrom
umount /mnt/cdrom
umount /dev/hdc
umount -at nfs
umount -t msdos -a

fuser -v /
mount -o remount ro /dev/hda1
umount /dev/hda1
fsck -y /dev/hda1


vi /etc/fstab

[dev][/m/p][type][option][dump][fsck]

[option]:

rw ro
suid nosuid
dev nodev
exec noexec
auto noauto
nouser user
async sync



--- 代碼: ---
LABEL=/boot  /boot ext3 defaults 1 2
LABEL=/ / ext3 defaults 1 1
/dev/hda9 swap swap defaults 0 0


--- 程式碼結尾 ---

About label:

for i in $(fdisk -l /dev/hda | awk  '/^\/dev/ {print $echo -n "$i :" ;e2label $i 2>/dev/null;done

netman:
debug:
for i in $(fdisk -l /dev/hda | awk '/^\/dev/ {print $1}'); do echo -n "$i :" ;e2label $i 2>/dev/null;done

導覽

[0] 文章列表

[#] 下頁

前往完整版本