AIX系统使用USB闪存设备

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

AIX系统使用USB闪存设备Inthisarticle,IwilldemonstratehowtocreateaUSBmemorystickfilesystem(hereaftercalledUSBstick)IamusingAIX7.1witha4GBSandiskmemorystick.TheseUSBstickscancomeinsizesupto256GB.Memorysticksareusefulinmyopinionbecause:Theyareidealforfastdataaccess.Theycanbeusedindatatransferwherenetworkperformanceispoor.Theyaregreatforscratchortemporaryfilesystems.Theyarecheaperthanotheralternatives.Theonlydownsideisthattheydohavealimitedlifeinthatthewritecyclesonthesedrivestypicallylastaround8-10years,beforethememorycellswearout.Butastheyarecheaptobuy,thisisreallynotaconcernasyouwouldnodoubtreplacethemwithinthattimeperiodanyway.TheAIX6.1documentationstatesthatitsupportsthefollowingbrandedUSBsticks:SandiskLenovoKingstonHowever,Ihaveusedotherbrandedandnon-brandedUSBstickswithnoissuesfound.MountingaUSBstick(挂载USB设备)Besuretohavethecorrectfileset(s)installedbeforeinsertingyourUSBstick.Thefollowingfile-setsarerequiredtoaccessaUSBstick:(先确定USB设备驱动包是否安装)#lslpp-Ldevices.usbif.08025002.rteFilesetLevelStateTypeDescription(Uninstaller)devices.usbif.08025002.rte7.1.0.15AFUSBMassStorageDeviceSoftware#lslpp-Ldevices.common.IBM.usb.rteFilesetLevelStateTypeDescription(Uninstaller)devices.common.IBM.usb.rte7.1.0.15AFUSBSystemSoftwareInserttheUSBstickandruncfgmgrtodiscoverit:(插入USB闪存设备)#cfgmgr(刷新硬件设备)Oncediscovered,youhavetwodevices(theblockandrawdevice):ls-l*usbms0cr--r--r--1rootsystem44,0Aug2218:59rusbms0br--r--r--1rootsystem44,0Aug2218:59usbms0Itisalsoshowninthedevicesoutput:#lsdev|grepusb(列出所有USB接口的设备)usb0AvailableUSBSystemSoftwareusbhc0Available08-08USBHostController(33103500)usbhc1Available08-09USBHostController(33103500)usbhc2Available08-0aUSBEnhancedHostController(3310e000)usbms0Available2.1USBMassStorageForAIX5.3,thefirstUSBdeviceisshownasflashdrive0.Atthispoint,IcouldtreattheUSBstickasarawvolumeandwritedatatoit.However,inthisdemonstration,IwillmounttheUSBstickasafilesystem.IfeelthereisnoneedtocreatealogdeviceforthisUSBmount,sincethepurposeofascratchfilesystemisthatitistemporaryandthusspeedisoftheessencewhentransferringdata.TocreatetheUSBstickfilesystemusethefollowingcommand:(给USB设备添加文件系统)#mkfs-Vjfs2-oea=v2/dev/usbms0mkfs:destroy/dev/usbms0(yes)?Filesystemcreatedsuccessfully.3927736kilobytestotaldiskspace.Device/dev/usbms0:StandardemptyfilesystemSize:7855472512-byte(DEVBLKSIZE)blocksThepreviouscommandinitializedtheUSBstick.SelectYestodestroy,orratherinitialize,thedevice.Thefilesystemtypeisofjfs2type.Idonotbelievethatatypeofjfs2reallymattersforthistask,asthefilesystemisnotgoingtousethejfs2logdevice.Butasthisisthenormwhencreatingfilesystems,Icreateditasajfs2.Toensurethefilesystemisscalable,Ispecifythatwiththe'ea'option.Inthisexample,thedevicetouseistheUSBstickinserted,whichisusbms0.ForAIX5.3,thereisnoNOLOGoptioninthemountcommand.Next,mountthefilesystemspecifyingthatisittobemountedwithoutalogdevice;besuretocreatethedirectoryitistobemountedonfirst:#mkdir/usb_mnt(建立挂载点)#mount-olog=NULL/dev/usbms0/usb_mnt(挂载USB设备)#df-g|grepusb/dev/usbms03.753.731%41%/usb_mntIfyouwishtousealogdevicetomounttheusbstick,usetheinlinelog.Thisensuresthatitiscontainedwithinthefilesystem:(建立带日志的文件系统)#mkfs–olog=INLINE,ea=v2–Vjfs2/dev/usbms0mkfs:destroy/dev/usbms0(yes)?logform:Formatinlinelogfory?yFilesystemcreatedsuccessfully.3912376kilobytestotaldiskspace.Device/dev/usbms0:StandardemptyfilesystemSize:7824752512-byte(DEVBLKSIZE)blocks#mkdir/usb_mnt#mount-Vjfs2-olog=/dev/usbms0/dev/usbms0/usb_mntUnmountingamemorystickOnceyouhavefinishedusingtheaUSBstickfilesystem,unmountit,removeit,thendeletetheusbms0device:#umount/usb_mnt(卸载挂载的USB设备)#rmdev-dlusbms0(将USB设备在系统中移除)MountingapreviousinitializedmemorystickIfyouareinpossessionofamemorystickthatcontainsdatawhatwaspreviouslymountedasafilesystem,toaccessitsimplymountit.Besuretocreatethemountpointfirst.Forexample,assumetheUSBdeviceisinsertedinthesecondUSBslot,thenhavethedevicediscoveredasusbms1:#mkdir/usbstick#mount-olog=NULL/dev/usbms0/usbstickBacktotopConclusionUsingUSBsticksisagreatwhenyouwanttocreateafastreadaccessscratchfilesystemforprocessingormaybearawdevicetodumpsomefilesintofortransporttoanotherAIXsystem.USBsticksofferonesolutionwhereyouhaveapoornetwork,andyouneedtogetalargeamountofdatatransferred.

1 / 4
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功