̽ÃØLinuxÎļþϵͳµÄÄÚ²¿½á¹¹
ÎÊÌ⣺̽ÃØLinuxÎļþϵͳµÄÄÚ²¿½á¹¹
Linux²Ù×÷ϵͳÒÔÆäÎȹÌÐÔºÍÎÞаÐÔ¶øÖøÃû£¬Îļþϵͳ×÷ΪÆä½¹µãÖ®Ò»£¬ÊÎÑÝ×ÅÒªº¦µÄ½ÇÉ«¡£ÉîÈëÏàʶLinuxÎļþϵͳµÄÄÚ²¿½á¹¹²»µ«ÓÐÖúÓÚÎÒÃÇÃ÷È·²Ù×÷ϵͳµÄÊÂÇéÔÀí£¬»¹¿ÉÒÔ×ÊÖúÎÒÃǸüºÃµØ¾ÙÐÐϵͳÖÎÀíºÍÓÅ»¯¡£±¾ÎĽ«ÒÔÏêϸµÄ´úÂëʾÀýÏ¢ÕùÊÍ£¬Ì½ÌÖLinuxÎļþϵͳµÄÄÚ²¿½á¹¹¡£
Ò»¡¢Îļþϵͳ¼ò½é
ÎļþϵͳÊÇÅÌËã»úÓÃÓÚ×éÖ¯ºÍ´æ´¢ÎļþÒÔ¼°¶ÔÎļþ¾ÙÐÐÖÎÀíµÄ»úÖÆ¡£ÔÚLinuxϵͳÖУ¬³£¼ûµÄÎļþϵͳ°üÀ¨ext4¡¢XFS¡¢BtrfsµÈ¡£ÕâЩÎļþϵͳ»á½«Îļþ´æ´¢ÔÚÓ²ÅÌ»òÆäËû´æ´¢×°±¸ÉÏ£¬²¢ÌṩÊý¾ÝµÄ¶Áд»á¼û¡£ÎļþϵͳµÄÉè¼ÆÓ°Ïì×ÅϵͳµÄÐÔÄÜ¡¢¿É¿¿ÐÔºÍÀ©Õ¹ÐÔ¡£
¶þ¡¢Îļþϵͳ½á¹¹
³¬µÈ¿é£¨superblock£©£º³¬µÈ¿é´æ´¢ÎļþϵͳµÄÔªÊý¾ÝÐÅÏ¢£¬ÈçÎļþϵͳÀàÐÍ¡¢¿é¾Þϸ¡¢inodeÊýÄ¿µÈ¡£ÔÚext4ÎļþϵͳÖУ¬³¬µÈ¿é¿ÉÒÔͨ¹ýÒÔÏ·½·¨»ñÈ¡£º
sudo dumpe2fs /dev/sda1 | grep superblock
µÇ¼ºó¸´ÖÆ
Ë÷Òý½Úµã£¨inode£©£ºinode´æ´¢ÎļþµÄÔªÊý¾ÝÐÅÏ¢£¬ÈçÎļþ¾Þϸ¡¢È¨ÏÞ¡¢ÓµÓÐÕߵȡ£Ã¿¸öÎļþ¶¼¶ÔÓ¦Ò»¸öinode£¬¿ÉÒÔͨ¹ýÒÔÏÂÏÂÁîÉó²éÎļþµÄinodeÐÅÏ¢£º
ls -i filename
µÇ¼ºó¸´ÖÆ
Êý¾Ý¿é£¨data block£©£ºÊý¾Ý¿é´æ´¢ÎļþµÄÏÖʵÊý¾ÝÄÚÈÝ¡£Îļþϵͳ»áƾ֤һ¶¨µÄ¿é´óС£¨Í¨³£ÊÇ4KB£©½«Êý¾ÝÊèÉ¢´æ´¢ÔÚ¶à¸öÊý¾Ý¿éÖС£
Ŀ¼Ïdirectory entry£©£ºÄ¿Â¼ÏÎļþÃûºÍ¶ÔÓ¦µÄinodeºÅ¹ØÁªÆðÀ´¡£¿ÉÒÔͨ¹ýÒÔÏÂÏÂÁîÉó²éĿ¼ÖеÄÎļþºÍ¶ÔÓ¦µÄinodeºÅ£º
ls -l
µÇ¼ºó¸´ÖÆ
Èý¡¢Îļþϵͳ²Ù×÷ʾÀý
½¨ÉèÎļþϵͳ£º
sudo mkfs.ext4 /dev/sdb1
µÇ¼ºó¸´ÖÆ
¹ÒÔØÎļþϵͳ£º
sudo mount /dev/sdb1 /mnt
µÇ¼ºó¸´ÖÆ
½¨ÉèĿ¼£º
mkdir /mnt/test
µÇ¼ºó¸´ÖÆ
½¨ÉèÎļþ£º
touch /mnt/test/file.txt
µÇ¼ºó¸´ÖÆ
Éó²éÎļþϵͳÐÅÏ¢£º
df -h
µÇ¼ºó¸´ÖÆ
ͨ¹ýÒÔÉϵÄʾÀýºÍ²Ù×÷£¬ÎÒÃÇ¿ÉÒÔÉîÈëÏàʶLinuxÎļþϵͳµÄÄÚ²¿½á¹¹ºÍ²Ù×÷¡£ÊìÁ·ÕÆÎÕÎļþϵͳµÄÔÀíºÍÖÎÀíÒªÁ죬¹ØÓÚϵͳÖÎÀíÔ±ºÍ¿ª·¢Ö°Ô±À´ËµÖÁ¹ØÖ÷Òª¡£Ï£Íû±¾ÎÄÄܹ»×ÊÖú¶ÁÕ߸üºÃµØÃ÷È·ºÍʹÓÃLinuxÎļþϵͳ¡£
ÒÔÉϾÍÊÇ̽ÃØLinuxÎļþϵͳµÄÄÚ²¿½á¹¹µÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡