国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統 > Linux > 正文

TurboLinux11添加新硬盤方法

2020-07-08 13:02:42
字體:
來源:轉載
供稿:網友

一.Linux的硬盤識別

2.6 kernel以后,linux會將識別到的硬件設備,在/dev/下建立相應的設備文件.如:

sda	表示第1塊SCSI硬盤.hda	表示第1塊IDE硬盤(即連接在第1個IDE接口的Master口上).scd0	表示第1個USB光驅.

當添加了新硬盤后,在/dev目錄下會有相應的設備文件產生.cciss的硬盤是個例外,它的
設備文件在/dev/cciss/目錄下.一般使用”fdisk -l”命令可以列出系統中當前連接的硬盤
設備和分區信息.新硬盤沒有分區信息,則只顯示硬盤大小信息.
 

二.在linux系統中添加新硬盤

下面說明一下,在GTES 11上,添加一塊10G硬盤到第一個IDE口的Slave接口上.
 

安裝好硬盤后,開機進入Turbolinux.以root身份登錄.
執行fdisk -l命令顯示當前系統的硬盤設備.
 

[root@g11-64-1 ~]# fdisk -lDisk /dev/hda: 21.4 GB, 21474836480 bytes255 heads, 63 sectors/track, 2610 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes   Device Boot      Start         End      Blocks   Id  System/dev/hda1   *           1          13      104391   83  Linux/dev/hda2              14          89      610470   82  Linux swap / Solaris/dev/hda3              90        2610    20249932+  83  LinuxDisk /dev/hdb: 10.7 GB, 10737418240 bytes255 heads, 63 sectors/track, 1305 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDisk /dev/hdb doesn't contain a valid partition table[root@g11-64-1 ~]#

顯示hdb沒有分區信息,大小為10G.
使用fdisk命令對hdb進行分區.
 

[root@g11-64-1 ~]# fdisk /dev/hdbDevice contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabelBuilding a new DOS disklabel. Changes will remain in memory only,until you decide to write them. After that, of course, the previouscontent won't be recoverable.The number of cylinders for this disk is set to 1305.There is nothing wrong with that, but this is larger than 1024,and could in certain setups cause problems with:1) software that runs at boot time (e.g., old versions of LILO)2) booting and partitioning software from other OSs   (e.g., DOS FDISK, OS/2 FDISK)Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)輸入: n 表示新建分區.Command (m for help): nCommand action   e   extended   p   primary partition (1-4)輸入: p 表示建立一個原始分區.pPartition number (1-4): 1輸入: 1 表示此分區編號為1.First cylinder (1-1305, default 1):輸入: 回車 表示使用默認起始柱面號.Using default value 1Last cylinder or +size or +sizeM or +sizeK (1-1305, default 1305):輸入: 回車 表示使用默認結束柱面號.即此分區使用整個硬盤空間.Using default value 1305Command (m for help): w輸入: w 存盤,退出fdisk.The partition table has been altered!Calling ioctl() to re-read partition table.Syncing disks.

再使用fdisk -l命令查看分區情況.
 

[root@g11-64-1 ~]# fdisk -lDisk /dev/hda: 21.4 GB, 21474836480 bytes255 heads, 63 sectors/track, 2610 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes   Device Boot      Start         End      Blocks   Id  System/dev/hda1   *           1          13      104391   83  Linux/dev/hda2              14          89      610470   82  Linux swap / Solaris/dev/hda3              90        2610    20249932+  83  LinuxDisk /dev/hdb: 10.7 GB, 10737418240 bytes255 heads, 63 sectors/track, 1305 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes   Device Boot      Start         End      Blocks   Id  System/dev/hdb1               1        1305    10482381   83  Linux

顯示/dev/hdb上有一個hdb1分區,為linux格式.
分區后,需要對這個分區進行格式化.
 

[root@g11-64-1 ~]# mkfs.ext3 /dev/hdb1mke2fs 1.39 (29-May-2006)Filesystem label=OS type: LinuxBlock size=4096 (log=2)Fragment size=4096 (log=2)1310720 inodes, 2620595 blocks131029 blocks (5.00%) reserved for the super userFirst data block=0Maximum filesystem blocks=268435456080 block groups32768 blocks per group, 32768 fragments per group16384 inodes per groupSuperblock backups stored on blocks:        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632Writing inode tables: doneCreating journal (32768 blocks): doneWriting superblocks and filesystem accounting information: doneThis filesystem will be automatically checked every 39 mounts or180 days, whichever comes first.  Use tune2fs -c or -i to override.

將新建分區掛在到/mnt/hdb1上.
 

[root@g11-64-1 ~]# mkdir /mnt/hdb1[root@g11-64-1 ~]# mount /dev/hdb1 /mnt/hdb1[root@g11-64-1 ~]# df -hFilesystem            Size  Used Avail Use% Mounted on/dev/hda3              19G  8.2G  9.7G  46% //dev/hda1              99M   16M   79M  17% /boottmpfs                 250M     0  250M   0% /dev/shm/dev/hdb1             9.9G  151M  9.2G   2% /mnt/hdb1[root@g11-64-1 ~]#

hdb1已掛載到/mnt/hdb1上,剩余空間為9.2G.
在此分區上創建文件.
 

[root@g11-64-1 ~]# cd /mnt/hdb1[root@g11-64-1 hdb1]# ls > a[root@g11-64-1 hdb1]# ls -hltotal 20K-rw-r--r-- 1 root root  13 Nov  3 08:45 adrwx------ 2 root root 16K Nov  3 08:44 lost+found[root@g11-64-1 hdb1]#

卸載hdb1分區.
 

[root@g11-64-1 hdb1]# cd[root@g11-64-1 ~]# umount /mnt/hdb1[root@g11-64-1 ~]# df -hFilesystem            Size  Used Avail Use% Mounted on/dev/hda3              19G  8.2G  9.7G  46% //dev/hda1              99M   16M   79M  17% /boottmpfs                 250M     0  250M   0% /dev/shm[root@g11-64-1 ~]# 

三.設置新硬盤開機自動掛載

在/etc/fstab中添加新硬盤的掛載信息.添加下面一行:

/dev/hdb1       /mnt/hdb1               ext3 defaults         1       2

這樣,每次開機后,系統會自動將/dev/hdb1掛載到/mnt/hdb1上.

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 彩票| 苍南县| 库尔勒市| 确山县| 清水河县| 衡山县| 顺平县| 盐边县| 门头沟区| 南川市| 江达县| 南部县| 浦县| 南乐县| 苍山县| 峡江县| 襄樊市| 长宁区| 合水县| 黄陵县| 建宁县| 南涧| 雅江县| 甘谷县| 鄂伦春自治旗| 昭觉县| 商洛市| 涿州市| 通许县| 民丰县| 南昌县| 高密市| 元谋县| 铜梁县| 凯里市| 南漳县| 西安市| 富源县| 永平县| 博客| 满城县|