|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
如果您觉得本篇CentOSLinux教程讲得好,请记得点击右边漂浮的分享程序,把好文章分享给你的小伙伴们![root@appserver~]#df-h/*检察现有分区情形*/
FilesystemSizeUsedAvailUse%Mountedon
/dev/mapper/vg_admin-lv_root18G2.0G16G12%/
tmpfs495M228K495M1%/dev/shm
/dev/sda1485M35M425M8%/boot
[root@appserver~]#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
[root@appserver~]#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. [root@appserver~]#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
[root@appserver~]#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.
[root@appserver~]#df-h
文件体系容量已用可用已用%%挂载点
FilesystemSizeUsedAvailUse%Mountedon
/dev/mapper/vg_admin-lv_root18G2.0G16G12%/
tmpfs495M224K495M1%/dev/shm
/dev/sda1485M35M425M8%/boot
[root@appserver~]#mount/dev/sdb/home/admin/storage20//*挂载/dev/sdb到/home/admin/storage20/*/
[root@appserver~]#df-h
FilesystemSizeUsedAvailUse%Mountedon
/dev/mapper/vg_admin-lv_root18G2.0G16G12%/
tmpfs495M224K495M1%/dev/shm
/dev/sda1485M35M425M8%/boot
/dev/sdb20G172M19G1%/home/admin/storage20 [root@appserver~]#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目次*/ 欢迎大家来到仓酷云论坛! |
|