linux磁盘挂载Word文件下载.docx
- 文档编号:22111505
- 上传时间:2023-02-02
- 格式:DOCX
- 页数:18
- 大小:19.17KB
linux磁盘挂载Word文件下载.docx
《linux磁盘挂载Word文件下载.docx》由会员分享,可在线阅读,更多相关《linux磁盘挂载Word文件下载.docx(18页珍藏版)》请在冰豆网上搜索。
/dev/sda5869G201M824G1%/home
/dev/sr02.9G2.9G0100%/media/SLES-11-SP1-DVD-x86_64.0432..001
2.查看系统当前硬盘分区情况
命令:
fdisk–l
~#fdisk-l
Disk/dev/sda:
999.0GB,998999326720bytes
255heads,63sectors/track,121454cylinders
Units=cylindersof16065*512=8225280bytes
Diskidentifier:
0x00004cb7
DeviceBootStartEndBlocksIdSystem
/dev/sda1*16350601683Linux
/dev/sda264528441937682+83Linux
/dev/sda352856328838593082Linuxswap/Solaris
/dev/sda46329121454924749595fW95Ext'
d(LBA)
/dev/sda56329121452924733498+83Linux
Disk/dev/sdb:
0x00000000
Disk/dev/sdbdoesn'
tcontainavalidpartitiontable
Disk/dev/sdc:
4994.0GB,4993981612032bytes
255heads,63sectors/track,607150cylinders
Disk/dev/sdcdoesn'
3.创建新的硬盘分区
fdisk/dev/sdb
注:
这里的/dev/sdb是具体一个硬盘,此参数可改成fdisk–l显示的硬盘的序号。
~#fdisk/dev/sdb
DevicecontainsneitheravalidDOSpartitiontable,norSun,SGIorOSFdisklabel
BuildinganewDOSdisklabelwithdiskidentifier0xd3f0a6aa.
Changeswillremaininmemoryonly,untilyoudecidetowritethem.
Afterthat,ofcourse,thepreviouscontentwon'
tberecoverable.
Thenumberofcylindersforthisdiskissetto121454.
Thereisnothingwrongwiththat,butthisislargerthan1024,
andcouldincertainsetupscauseproblemswith:
1)softwarethatrunsatboottime(e.g.,oldversionsofLILO)
2)bootingandpartitioningsoftwarefromotherOSs
(e.g.,DOSFDISK,OS/2FDISK)
Warning:
invalidflag0x0000ofpartitiontable4willbecorrectedbyw(rite)
Command(mforhelp):
m
Commandaction
atoggleabootableflag
beditbsddisklabel
ctogglethedoscompatibilityflag
ddeleteapartition
llistknownpartitiontypes
mprintthismenu
naddanewpartition
ocreateanewemptyDOSpartitiontable
pprintthepartitiontable
qquitwithoutsavingchanges
screateanewemptySundisklabel
tchangeapartition'
ssystemid
uchangedisplay/entryunits
vverifythepartitiontable
wwritetabletodiskandexit
xextrafunctionality(expertsonly)
n
eextended
pprimarypartition(1-4)
e
Partitionnumber(1-4):
1
Firstcylinder(1-121454,default1):
Lastcylinder,+cylindersor+size{K,M,G}(1-121454,default121454):
Usingdefaultvalue121454
p
Disk/dev/sdb:
255heads,63sectors/track,121454cylinders
Units=cylindersof16065*512=8225280bytes
Diskidentifier:
0xd3f0a6aa
/dev/sdb11121454975579223+5Extended
Command(mforhelp):
w
Thepartitiontablehasbeenaltered!
Callingioctl()tore-readpartitiontable.
Syncingdisks.
Disk/dev/sda:
/dev/sda1*16350601683Linux
/dev/sda264528441937682+83Linux
/dev/sda352856328838593082Linuxswap/Solaris
/dev/sda46329121454924749595fW95Ext'
/dev/sda56329121452924733498+83Linux
Disk/dev/sdc:
255heads,63sectors/track,607150cylinders
Disk/dev/sdcdoesn'
4.创建挂载点
即创建目录,以便将新建的分区挂载到新目录下
mkdir-p/webroot/1
~#mkdir-p/webroot/1
5.挂载分区
mount/dev/sdb1/webroot/1
说明:
其中/dev/sdb5是硬盘,/webroot/1是挂载点,即挂载到的目录
/etc#mount/dev/sdb1/webroot/1
mount:
youmustspecifythefilesystemtype
/etc#mount-text3/dev/sdb1/webroot/1
mount:
wrongfstype,badoption,badsuperblockon/dev/sdb1,
missingcodepageorhelperprogram,orothererror
Insomecasesusefulinfoisfoundinsyslog-try
dmesg|tailorso
/etc#mkfs.ext3-L/webroot/1/dev/sdb1
mke2fs1.41.9(22-Aug-2009)
mkfs.ext3:
inode_size(128)*inodes_count(0)toobigfora
filesystemwith0blocks,specifyhigherinode_ratio(-i)
orlowerinodecount(-N).
/#mkdir-p/webroot/1
E10-3:
/#mount-tnfs-oloop/dev/sdb1/webroot/1
mount.nfs:
remotesharenotin'
host:
dir'
format
/#mkfs.ext3-L/webroot/1/dev/sdb1
mke2fs1.41.9(22-Aug-2009)
mkfs.ext3:
/#mkfs-text3-c/dev/sdb1
以上红色部分表示挂载或者格式化/dev/sdb1没有成功,经XX搜索查找原因得知,这里挂载和格式化的是扩展分区,我们不能这么做,挂载或者格式化操作对象只能是逻辑分区或者主分区。
所以这里需要在扩展分区上创建逻辑分区。
5.1创建逻辑分区
/#fdisk/dev/sdb
Commandaction
llogical(5orover)
l
Usingdefaultvalue1
/dev/sdb5112145497557919283Linux
Thepartitiontablehasbeenaltered!
Callingioctl()tore-readpartitiontable.
Syncingdisks.
/#fdisk-l
5.2格式化逻辑分区
/#mkfs.ext3-L/webroot/1/dev/sdb5
ext3是文件系统类型,需根据实际情况更改,/webroot/1是挂载点,/dev/sdb5是逻辑分区名称
Filesystemlabel=/webroot/1
OStype:
Linux
Blocksize=4096(log=2)
Fragmentsize=4096(log=2)
60981248inodes,243894798blocks
12194739blocks(5.00%)reservedforthesuperuser
Firstdatablock=0
Maximumfilesystemblocks=4294967296
7444blockgroups
32768blockspergroup,32768fragmentspergroup
8192inodespergroup
Superblockbackupsstoredonblocks:
32768,98304,163840,229376,294912,819200,884736,1605632,2654208,
4096000,7962624,11239424,20480000,23887872,71663616,78675968,
102400000,214990848
Writinginodetables:
done
Creatingjournal(32768blocks):
done
Writingsuperblocksandfilesystemaccountinginformation:
Thisfilesystemwillbeautomaticallycheckedevery39mountsor
180days,whichevercomesfirst.Usetune2fs-cor-itooverride.
5.3临时挂载(逻辑)分区
mount/dev/sdb5/webroot/1
因挂载信息没有写到/etc/fstab文件中,所以这里只是临时挂载,系统重启后此挂载会消失。
/#mount/dev/sdb5/webroot/1
/#df-h
FilesystemSizeUsedAvailUse
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- linux 磁盘
![提示](https://static.bdocx.com/images/bang_tan.gif)