Question

create filesystem on lv and mount it at boot up

Asked by: wesly_chen

I've a IBM eServer pSeries box with AIX 4.3 on it. It has 4 hard disk.

I would like to create logic volume, create filesystem (jfs) on it and mount it automaticall during bootup.

Here are some information:
# uname -a
AIX stymie 3 4 000AC1FF4C00

# lspv
hdisk0         000ac1ff146468d0    rootvg        
hdisk1         000ac4ff663d69ae    phat_vol_grp  
hdisk2         000ac4ff671219ab    phat_vol_grp  
hdisk3         000ac1ffb52e3ff4    phat_vol_grp

# lsvg -o | lsvg -i -l
phat_vol_grp:
LV NAME             TYPE       LPs   PPs   PVs  LV STATE      MOUNT POINT
lv00                jfs        3     3     1    closed/syncd  N/A
rootvg:
LV NAME             TYPE       LPs   PPs   PVs  LV STATE      MOUNT POINT
hd4                 jfs        1     1     1    open/syncd    /
hd2                 jfs        157   157   1    open/syncd    /usr
hd9var              jfs        1     1     1    open/syncd    /var
hd3                 jfs        1     1     1    open/syncd    /tmp
hd1                 jfs        1     1     1    open/syncd    /home

Ok I want to create logic volume (lv00) across hdisk1, hdisk2, and hdisk 3 with jfs filesystem. And mount it as /data when boot-up.

Could someone tell me the comands to do it step-by-step so I can do it quickly?

Thanks in advance.

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2004-11-08 at 12:29:17ID21199050
Tags

aix

,

create

,

filesystem

Topic

IBM AIX Unix

Participating Experts
1
Points
500
Comments
15

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. finding lvs
    ls -lrt /dev bla... brw-rw---- 1 oracle dba 55, 57 May 03 2006 admin_0064_003 brw-rw---- 1 oracle dba 55, 30 May 03 2006 admin_0032_016 brw-rw---- 1 oracle dba 55, 28 May 03 2006 admin_0032_015 brw-rw---- 1 oracle dba 5...
  2. Remove Filesystem and LVs in HPUX
    Hi Experts, I want to remove a file system and LV to re-allocate space to other filesystems in the same VG. The filesystem and LV is on a single PV. Please let me know the steps. Using HPUX 11 in a high availability environment. The HP online JFS is installed but I dont kn...
  3. finding all lv info
    I need to get the following info of logical volumes on AIX 5.2: Logical Volume Name Physical Disk Name Volume Layout Type Volume Size (GB or MB) Volume Size In Use (GB or MB) I can list all lvs: lsvg -l `lsvg -o`|egrep -v "\:$|LV NAME"|awk '{print...
  4. How to identify list of filesystems belong to particular vg
    We are having AIX 5.2 . This server is SAP server . It is having 10 vgs and lot mounted filesystems. due to SAN firmware upgrade i need to unmount SAN related vg which i know. how to identify filesystems belong to that particular vg. Currently i am checking all filesystem ,l...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: tfewsterPosted on 2004-11-08 at 13:39:00ID: 12527784

`smitty lvm` and follow the prompts ;-)

Or, manually:

Make a striped LV using all 3 disks:
mklv -u 3 -S 64K -y NEW_LV_NAME phat_vol_grp  number_of_PPs
Where number_of_PPs * 4MB = Logical Volume Size you want.  Assuming your vg's PP size is 4Mb!
Stripe size can be varied for performance - Depending on the characteristics of the physical disks and the application that will be using the filesystem

Create a filesystem in the lv:
crfs -v jfs -m /data -d NEW_LV_NAME -A -a bf=true -a size={size in bytes/512}
(-a bf=true allows large files [ > 2Gb]; Alternatively, you may want want `-a frag=512` if you expect lots of very small [< 512 byte] files. )

Note, specifying -m /data will create the entry in /etc/filesystems for you

Mount the filesysem:
mount /data

Use chown/chmod to set the new filesystem ownership and permissions, if required.

 

by: tfewsterPosted on 2004-11-08 at 13:47:34ID: 12527854

See http://publib.boulder.ibm.com/doc_link/en_US/a_doc_lib/aixbman/admnconc/fs_overview.htm  for background info; Note that "crfs" and "mkfs" do a similar job, but "crfs" can create the entry in /etc/filesystems (And can actually create the LV as well, though using mklv gives you better control)

Oops, just noticed that the -A option needs a parameter, "yes" (to specify this FS should be mounted when the system restarts)

 

by: wesly_chenPosted on 2004-11-08 at 14:23:15ID: 12528135

Hi,

  How do I get the information of "vg's PP size"?

 

by: wesly_chenPosted on 2004-11-08 at 14:25:31ID: 12528149

I got it.
# lsvg phat_vol_grp
VOLUME GROUP:   phat_vol_grp             VG IDENTIFIER:  000ac1ff2fe9f94f
VG STATE:       active                   PP SIZE:        1024 megabyte(s)
VG PERMISSION:  read/write               TOTAL PPs:      152 (155648 megabytes)
MAX LVs:        256                      FREE PPs:       152 (155648 megabytes)
LVs:            0                        USED PPs:       0 (0 megabytes)
OPEN LVs:       0                        QUORUM:         2
TOTAL PVs:      3                        VG DESCRIPTORS: 3
STALE PVs:      0                        STALE PPs:      0
ACTIVE PVs:     3                        AUTO ON:        yes
MAX PPs per PV: 1016                     MAX PVs:        32

The vg PP size is 1GB.

Wesly

 

by: wesly_chenPosted on 2004-11-08 at 14:45:02ID: 12528300

I ran
# mklv -u 2 -S 64K -y lv00 phat_vol_grp 128
to create a 128GB logic volume "lv00", since the striped logical volume size can only be an even multiple of the striping width.
In other words, "-u 3" doesn't work.

Then when I ran
# crfs -v jfs -m /data -d lv00 -A -a bf=true -a size=134217727
---------------------
crfs: Warning: logical volume lv00 larger than filesystem max (134217728).
WARNING: log size greater than one segment
Only 256MB of log will be used
fshop_make: 0506-252 A file system with nbpi = 4096 cannot exceed 134217728 512-byte blocks

0506-276 JFS file systems have the following size limitations:

  NBPI  Minimum AG Size    Fragment Size        Maximum Size (GB)
   512         8        512, 1024, 2048, 4096          8
  1024         8        512, 1024, 2048, 4096         16
  2048         8        512, 1024, 2048, 4096         32
  4096         8        512, 1024, 2048, 4096         64
  8192         8        512, 1024, 2048, 4096        128
 16384         8        512, 1024, 2048, 4096        256
 32768        16             1024, 2048, 4096        512
 65536        32                   2048, 4096       1024
131072        64                         4096       1024

Filesystem Helper: 0506-527 Unknown error, code =  (28)
rmlv: Logical volume loglv00 is removed.
--------------------------------------
So how can I increase/change NBPI to 8192 so I can have maximum size to 128GB?
Besides, for 128GB, what is the number to pass to "size=" in crfs?

Thanks.

 

by: tfewsterPosted on 2004-11-08 at 15:48:00ID: 12528842

Hmm - 152 PPs seems like an odd number - Are all these disks the same size (approx 50Gb!)? lspv should show you the characteristics.   Are they actually logical disks allocated from a disk array?

mklv -u 2 -S 64K -y lv00 phat_vol_grp 128  - If this works, I'd guess that you have 2 * 72Gb disks in the VG and the third is about 8Gb!


Of course, I could be completely off base; If they are all the same size, try 132Gb, which meets the "even" criteria:
mklv -u 3 -S 64K -y lv00 phat_vol_grp 132


For the crfs:

Use the option "-a nbpi=8192" with the crfs command to allow an fs of up to 128Gb

The size would be "-a size=268435456"  (i.e. 128*1024*1024*1024/2)
(Increase that if you create a 132Gb lv)

 

by: wesly_chenPosted on 2004-11-08 at 16:11:41ID: 12528974

# (lscfg -l hdisk0;lscfg -l hdisk1;lscfg -l hdisk2;lscfg -l hdisk3) | grep hdisk
  hdisk0            10-88-00-8,0      16 Bit LVD SCSI Disk Drive (18200 MB)
  hdisk1            10-88-00-9,0      16 Bit LVD SCSI Disk Drive (73400 MB)
  hdisk2            10-88-00-10,0     16 Bit LVD SCSI Disk Drive (73400 MB)
  hdisk3            10-88-00-11,0     16 Bit LVD SCSI Disk Drive (18200 MB)

In volume group "phat_vol_grp", hdisk1 and hdisk2 are 72GB and hdisk3 is 18GB.
So in this case, can I still use -u 3 with size 144+18=164GB or 144GB is the maximum size I can get?

I've tried "-a nbpi=8192" or "-a nbpi=16384" but I still got "fshop_make: 0506-252 A file system with nbpi = 4096 cannot exceed 134217728 512-byte blocks" with error code 28. Any idea?

 

by: wesly_chenPosted on 2004-11-08 at 16:13:03ID: 12528982

Correction, 144+18=162

 

by: tfewsterPosted on 2004-11-08 at 16:34:44ID: 12529070

You can create a 152Gb filesystem, but it won't be striped - A striped filesystem allocates extents from each disk in turn (64K from hdisk1, then 64K from hdisk2, then 64K from hdisk 3, then back to hdisk1) so the biggest striped filesystem you could create would be 3 * 18 = 72Gb.

 

by: tfewsterPosted on 2004-11-08 at 17:14:20ID: 12529256

As regards setting nbpi to allow larger filesystem sizes - I don't know why it doesn't work :-(

Just to confirm, your command looked like this?
crfs -v jfs -m /data -d lv00 -A yes -a size=268435456 -a bf=true -a nbpi=8192

You could try using mkfs directly:
mkfs  -s 268435456 -o nbpi=8192,bf=true  -V jfs  lv00

 

by: wesly_chenPosted on 2004-11-08 at 17:15:37ID: 12529263

Ok, 136GB is the biggest capacity I can get with "-u 2".
# mklv -u 2 -S 64K -y lv00 phat_vol_grp 136
Not 144GB. Is it because the limitation of "-S 64k"? (Sorry, man mklv doesn't work for me on the AIX box)

However, the following command
# crfs -v jfs -m /data -d lv00 -A -a nbpi=16384 -a bf=true -a size=285212672
still fail at fshop_make: 0506-252 A file system with nbpi = 4096 cannot exceed 134217728 512-byte blocks" with error code 28.

This drives me crazy.

 

by: tfewsterPosted on 2004-11-08 at 17:33:35ID: 12529357

wesly, you've not put the "yes" after the -A option;  Possibly that's why its ignoring the -a nbpi=16384 ?  Though I'd have expected a more meaningful error message!

.. -A yes -a nbpi=16384..

Regarding the 144/136 - Disk manufacturers call a Gigabyte 1000 * 1000 * 1000 bytes, which accounts for the difference; 73,000,000,000 /1024/1024/1024 = 67.98  

 

by: wesly_chenPosted on 2004-11-08 at 17:45:59ID: 12529410

# crfs -v jfs -m /data -d lv00 -A yes -a size=285212672 -a bf=true -a nbpi=16384
Works. I missed "yes" after "-A". Well, that's a typo in tfewster's first post.

Thank you very much.

 

by: wesly_chenPosted on 2004-11-08 at 17:50:59ID: 12529431

Summary:
---------------------
Check PP size in a volume group:
# lsvg <vg name>

Check the physical disk size:
# lscfg -l hdisk0  (or hdisk1, hdisk2...)

Create logic volume:
# mklv -u 2 -S 64K -y <NEW_LV_NAME> <vg name>  <number_of_PPs>
(Note: A striped filesystem allocates extents from each disk in turn (64K from hdisk1, then 64K from hdisk2, then 64K from hdisk 3, then back to hdisk1)

Create filesystem on a logic volume:
# crfs -v jfs -m <moint point> -d <NEW_LV_NAME> -A yes -a size=<size in 512> -a bf=true -a nbpi=<8192 for 128GB and 16384 for 256GB>
(Note: -a bf=true allows large files [ > 2Gb]; Alternatively, you may want want `-a frag=512` if you expect lots of very small [< 512 byte] files. Specifying -m /data will create the entry in /etc/filesystems for you)
or
# mkfs -s <size in 512> -o nbpi=<8192 for 128GB and 16384 for 256GB>,bf=true  -V jfs <NEW_LV_NAME>

Mount the filesysem:
mount /data
--------------------
Wesly

 

by: tfewsterPosted on 2004-11-08 at 17:52:35ID: 12529437

Sorry - I did mention it in my 2nd post but I should have made it more clear!

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...