AIX创建分区并挂载 - 日志 - wolfsun - 开源SNS - Powered by UCenter Home
AIX, for all of its strange mainframe-ish ways, has some redeeming qualities. AIX’s disk
management system would be one of them. It’s quite sophisticated given that it’s bundled in at
no additional cost. But I digress.
For this “how-to”, I’ll walk through a simple scenario of adding a disk. In my case, it was
adding a SAN disk on a DS4800 system. But this should work for a regular ol’ hard drive too.
1) Add the physical disk.
2) Rescan your hardware so that the OS is aware of your new disk.
AIX# cfgmgr
3) Check to see your disk. For the purpose of this example, let’s say the new disk is hdisk2.
AIX# lsdev -Cc disk
AIX# lspv
4) Associate your new disk to a volume group. In this case, let’s create a new group called
ryanvg and put hdisk2 in there.
AIX# mkvg -y ryanvg hdisk2
5) Now you can look at the size of hdisk2. (This command won’t work if it’s not associated
with a volume group).
AIX# lspv hdisk2
6) Create a log logical volume for jfs2. This needs to be part of ryanvg. Note: in the example
below, the type is jfs2log and we’re giving it 1 physical partition (PP).
AIX# mklv -t jfs2log ryanvg 1
7) Look for your new logical volume (lv). Chances are that AIX named it loglv00.
AIX# lsvg
AIX# lsvg -l ryanvg
8) Create your production logical volume. Let’s make it, hmm? how about 30GB? At the risk of
http://sns.linuxpk.com/space-52196-do-blog-id-16293.html(第 1/2 页)2010/1/14 4:55:36
AIX创建分区并挂载 - 日志 - wolfsun - 开源SNS - Powered by UCenter Home
sounding narcissistic, I’ll name it ryanlv.
AIX# lsvg ryanvg
AIX# mklv -t jfs2 -y ryanlv ryanvg 30G
9) Lay down your file system on ryanlv.
AIX# mkfs -o log=/dev/loglv00 -V jfs2 /dev/ryanlv
10) Mount your filesystem.
AIX# mkdir /mountpoint
AIX# mount -o log=/dev/loglv00 /dev/ryanlv /mountpoint
11) Consider adding to /etc/filesystem, if everything comes up fine
http://sns.linuxpk.com/space-52196-do-blog-id-16293.html(第 2/2 页)2010/1/14 4:55:36