给大家带来CentOS新增加一块硬盘并设置主动挂载到某个盘中
如果您觉得本篇CentOSLinux教程讲得好,请记得点击右边漂浮的分享程序,把好文章分享给你的小伙伴们!#df-h/*检察现有分区情形*/FilesystemSizeUsedAvailUse%Mountedon
/dev/mapper/vg_admin-lv_root18G2.0G16G12%/
tmpfs495M228K495M1%/dev/shm
/dev/sda1485M35M425M8%/boot
#fdisk-l/*检察现有DISK*/
Disk/dev/sda:21.5GB,21474836480bytes
255heads,63sectors/track,2610cylinders
Units=cylindersof16065*512=8225280bytes
Sectorsize(logical/physical):512bytes/512bytes
I/Osize(minimum/optimal):512bytes/512bytes
Diskidentifier:0x0007b51c
DeviceBootStartEndBlocksIdSystem
/dev/sda1*16451200083Linux
Partition1doesnotendoncylinderboundary.
/dev/sda2642611204584968eLinuxLVM
Disk/dev/mapper/vg_admin-lv_root:18.9GB,18865979392bytes
255heads,63sectors/track,2293cylinders
Units=cylindersof16065*512=8225280bytes
Sectorsize(logical/physical):512bytes/512bytes
I/Osize(minimum/optimal):512bytes/512bytes
Diskidentifier:0x00000000
Disk/dev/mapper/vg_admin-lv_swap:2080MB,2080374784bytes
255heads,63sectors/track,252cylinders
Units=cylindersof16065*512=8225280bytes
Sectorsize(logical/physical):512bytes/512bytes
I/Osize(minimum/optimal):512bytes/512bytes
Diskidentifier:0x00000000
#fdisk/dev/sdb/*翻开fdisk分区工具对磁盘分区,假如默许一个分区,也能够跨过此步奏*/
DevicecontainsneitheravalidDOSpartitiontable,norSun,SGIorOSFdisklabel
BuildinganewDOSdisklabelwithdiskidentifier0x264c68f0.
Changeswillremaininmemoryonly,untilyoudecidetowritethem.
Afterthat,ofcourse,thepreviouscontentwontberecoverable.
Warning:invalidflag0x0000ofpartitiontable4willbecorrectedbyw(rite)
WARNING:DOS-compatiblemodeisdeprecated.Itsstronglyrecommendedto
switchoffthemode(commandc)andchangedisplayunitsto
sectors(commandu).
Command(mforhelp):m
Commandaction
atoggleabootableflag
beditbsddisklabel
ctogglethedoscompatibilityflag
ddeleteapartition
llistknownpartitiontypes
mprintthismenu
naddanewpartition
ocreateanewemptyDOSpartitiontable
pprintthepartitiontable
qquitwithoutsavingchanges
screateanewemptySundisklabel
tchangeapartitionssystemid
uchangedisplay/entryunits
vverifythepartitiontable
wwritetabletodiskandexit
xextrafunctionality(expertsonly)
Command(mforhelp):n
Commandaction
eextended
pprimarypartition(1-4)
e
Partitionnumber(1-4):1
Firstcylinder(1-416101,default1):
Usingdefaultvalue1
Lastcylinder,+cylindersor+size{K,M,G}(1-416101,default416101):
Usingdefaultvalue416101
Command(mforhelp):w
Thepartitiontablehasbeenaltered!
Callingioctl()tore-readpartitiontable.
Syncingdisks.
#fdisk-l
Disk/dev/sda:21.5GB,21474836480bytes
255heads,63sectors/track,2610cylinders
Units=cylindersof16065*512=8225280bytes
Sectorsize(logical/physical):512bytes/512bytes
I/Osize(minimum/optimal):512bytes/512bytes
Diskidentifier:0x0007b51c
DeviceBootStartEndBlocksIdSystem
/dev/sda1*16451200083Linux
Partition1doesnotendoncylinderboundary.
/dev/sda2642611204584968eLinuxLVM
Disk/dev/sdb:21.5GB,21474836480bytes
255heads,63sectors/track,2610cylinders
Units=cylindersof16065*512=8225280bytes
Sectorsize(logical/physical):512bytes/512bytes
I/Osize(minimum/optimal):512bytes/512bytes
Diskidentifier:0x26128f57
DeviceBootStartEndBlocksIdSystem
Disk/dev/mapper/vg_admin-lv_root:18.9GB,18865979392bytes
255heads,63sectors/track,2293cylinders
Units=cylindersof16065*512=8225280bytes
Sectorsize(logical/physical):512bytes/512bytes
I/Osize(minimum/optimal):512bytes/512bytes
Diskidentifier:0x00000000
Disk/dev/mapper/vg_admin-lv_swap:2080MB,2080374784bytes
255heads,63sectors/track,252cylinders
Units=cylindersof16065*512=8225280bytes
Sectorsize(logical/physical):512bytes/512bytes
I/Osize(minimum/optimal):512bytes/512bytes
Diskidentifier:0x00000000
#mkfs-text4-c/dev/sdb/*格局化磁盘分区*/
mke2fs1.41.12(17-May-2010)
/dev/sdbisentiredevice,notjustonepartition!
Proceedanyway?(y,n)y
Filesystemlabel=
OStype:Linux
Blocksize=4096(log=2)
Fragmentsize=4096(log=2)
Stride=0blocks,Stripewidth=0blocks
1310720inodes,5242880blocks
262144blocks(5.00%)reservedforthesuperuser
Firstdatablock=0
Maximumfilesystemblocks=4294967296
160blockgroups
32768blockspergroup,32768fragmentspergroup
8192inodespergroup
Superblockbackupsstoredonblocks:
32768,98304,163840,229376,294912,819200,884736,1605632,2654208,
4096000
Checkingforbadblocks(read-onlytest):done
Writinginodetables:done
Creatingjournal(32768blocks):done
Writingsuperblocksandfilesystemaccountinginformation:done
Thisfilesystemwillbeautomaticallycheckedevery34mountsor
180days,whichevercomesfirst.Usetune2fs-cor-itooverride.
#df-h
文件体系容量已用可用已用%%挂载点
FilesystemSizeUsedAvailUse%Mountedon
/dev/mapper/vg_admin-lv_root18G2.0G16G12%/
tmpfs495M224K495M1%/dev/shm
/dev/sda1485M35M425M8%/boot
#mount/dev/sdb/home/admin/storage20//*挂载/dev/sdb到/home/admin/storage20/*/
#df-h
FilesystemSizeUsedAvailUse%Mountedon
/dev/mapper/vg_admin-lv_root18G2.0G16G12%/
tmpfs495M224K495M1%/dev/shm
/dev/sda1485M35M425M8%/boot
/dev/sdb20G172M19G1%/home/admin/storage20
#vi/etc/fstab
#/etc/fstab
#CreatedbyanacondaonWedMar1409:30:482012
#
#Accessiblefilesystems,byreference,aremaintainedunder/dev/disk
#Seemanpagesfstab(5),findfs(8),mount(8)and/orblkid(8)formoreinfo
#
UUID=a779e5e4-e34a-4a96-b01a-dbc5cc348958/ext4defaults11
tmpfs/dev/shmtmpfsdefaults00
devpts/dev/ptsdevptsgid=5,mode=62000
sysfs/syssysfsdefaults00
proc/procprocdefaults00
/dev/sdb/home/admin/storage20ext4defaults00/
*重启后/dev/vdb主动挂载到/mnt目次*/
欢迎大家来到仓酷云论坛! 为了更好的学习这门课程,我不仅课上认真听讲,课下也努力学习,为此还在自己的电脑上安装了Ubuntu系统。 再次,Linux是用C语言编写的,我们有学习C语言的基础,读程序和编写代码方面存在的困难小一点,也是我们能较快掌握的原因之一。? 把这个问题放在其他Linux社区请求帮助也是一种选择。如果Linux得不到答案,请不要以为我们觉得无法帮助你。有时只是看到你问题的人不知道答案罢了。这时换一个社区是不错的选择。 期间我阅读了不少关于Linux的相关资料,其中也不乏一些有趣的小故事,这既丰富了我的课余生活,也让我加深了对一些术语的理解,比玩游戏强多了。? 得到到草率的回答或者根本得不到任何Linux答案。越表现出在寻求帮助前为解决问题付出的努力,你越能得到实质性的帮助。 把这个问题放在其他Linux社区请求帮助也是一种选择。如果Linux得不到答案,请不要以为我们觉得无法帮助你。有时只是看到你问题的人不知道答案罢了。这时换一个社区是不错的选择。 编程学习及开发,Linux是免费,开源的操作系统,并且可开发工具相当多,如果您支持自由软件,一定要同广大热爱自由软件人士一同为其不懈努力。
页:
[1]