linux大硬盤(pán)怎么分區(qū)
隨著硬盤(pán)的增大,linux系統(tǒng)對(duì)大硬盤(pán),大分區(qū)的支持也有了相應(yīng)的設(shè)置。很多剛剛學(xué)習(xí)的小白還是不太懂硬盤(pán)的掛載。為此學(xué)習(xí)啦小編為大家整理推薦了相關(guān)的知識(shí),希望大家喜歡。
linux大硬盤(pán)分區(qū)的詳細(xì)方法
查看分區(qū)
root@Dios ~]# fdisk -l (這個(gè)命令是查看你為掛載的分區(qū)的位置)WARNING: GPT (GUID Partition Table) detected on '/dev/cciss/c0d1'! The util fdisk doesn't support GPT. Use GNU Parted.Disk /dev/cciss/c0d1: 4000.6 GB, 4000684662784 bytes255 heads, 63 sectors/track, 486388 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDevice Boot Start End Blocks Id System/dev/cciss/c0d1p1 1 267350 2147483647+ ee EFI GPT
Parted工具分區(qū)轉(zhuǎn)換
1. 使用parted命令:[root@Dios ~]# parted /dev/cciss/c0d1 (這個(gè)命令是對(duì)我們上面查到的分區(qū)進(jìn)行GPT轉(zhuǎn)換)GNU Parted 1.8.1Using /dev/cciss/c0d1Welcome to GNU Parted! Type 'help' to view a list of commands.(parted) mklabel gpt Warning: The existing disk label on /dev/cciss/c0d1 will be destroyed and all data on this disk will be lost. Do you want tocontinue?Yes/No? y New disk label type? [gpt]? gpt
2. (parted) mkpart primary 0 4000GB(進(jìn)行轉(zhuǎn)換及分區(qū))(parted) print Model: Compaq Smart Array (cpqarray)Disk /dev/cciss/c0d1: 4001GBSector size (logical/physical): 512B/512BPartition Table: gptNumber Start End Size File system Name Flags1 17.4kB 4001GB 4001GB primary (parted) quit Information: Don't forget to update /etc/fstab, if necessary.
格式化分區(qū)
1.[root@Dios ~]# mkfs.ext3 -F /dev/cciss/c0d1(格式化為EXT3文件系統(tǒng))mke2fs 1.39 (29-May-2006)Filesystem label=OS type: LinuxBlock size=4096 (log=2)Fragment size=4096 (log=2)488374272 inodes, 976729654 blocks48836482 blocks (5.00%) reserved for the super userFirst data block=0Maximum filesystem blocks=029808 block groups32768 blocks per group, 32768 fragments per group16384 inodes per groupSuperblock backups stored on blocks:32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,102400000, 214990848, 512000000, 550731776, 644972544Writing inode tables: done Creating journal (32768 blocks): doneWriting superblocks and filesystem accounting information: doneThis filesystem will be automatically checked every 22 mounts or180 days, whichever comes first. Use tune2fs -c or -i to override.
開(kāi)機(jī)自動(dòng)掛載分區(qū)
1.掛載(因?yàn)檫@樣掛在比較麻煩 我們用下面的命令進(jìn)行開(kāi)機(jī)掛在)[root@Dios ~]# mkdir -p /mnt/cciss/c0d1[root@Dios ~]# mount /dev/cciss/c0d1 /mnt/cciss/c0d1[root@Dios ~]# df -hFilesystem Size Used Avail Use% Mounted on/dev/cciss/c0d0p5 15G 1.8G 12G 13% //dev/cciss/c0d0p3 19G 173M 18G 1% /usr/local/dev/cciss/c0d0p2 862G 200M 817G 1% /else/dev/cciss/c0d0p1 251M 21M 218M 9% /boottmpfs 2.0G 0 2.0G 0% /dev/shm/dev/cciss/c0d1 3.6T 197M 3.4T 1% /mnt/cciss/c0d1
開(kāi)機(jī)自動(dòng)掛載這塊硬盤(pán):vi /etc/rc.local加上:mount /dev/cciss/c0d1 /mnt/cciss/c0d1