Can someone please help me understand what it is I am doing incorrectly?
I have 22 PVs (disks) assigned to a VG, the stats on the disks:
I have a VG created..
I have a LV created..
I created a mirrored LV (Copies: 2), so next I want to create the JFS2 FS..
The error I get is..
I have no idea what I am doing wrong? I am trying to maximize my usage of PP/LPs, so basically use it all up and assign the largest possible FS on the JFS2.
When creating the JFS2 FS, its asking for the Number of Units so if my LV has 6005 LPs, and my PP size is 128, 6005x128 .. 768640MB.. to leave a bit of breathing room I tried to set it to 768000 but the above error happens.
What am i doing wrong.. really would like to understand how to do this correctly starting from the PPs up to creating the JFS2.
I suppose you fell for a very simple thing, but at one point this happened perhaps to all of us. As fas as i can tell from your posted output you are using SMIT to create the LVs and FSes.
In the respective SMIT dialogue there are two entries:
Note that you need to use the second option when you have defined the LV already. Otherwise a new one will be created before a FS is created on it. This is perhaps where your error comes from.
The process I took was to first verify my PVs were not assigned anywhere, then I took note of the PV's PP Size and Total PPs.
Next I proceeded to create the VG, in there I specified the PVs I want to use and give it a name, next I create the Logical Volume from the VG, here I can specify copies, max LPs and Number of LPs.
If my PV has 546 Total PPs (128MB per PP), then when I create the LV I can assume that LP has a 1:1 relation to PP on the disk? So (example) if I assign 10 PVs (disks) and I want to use maximum space, 10 (PVs) x 546 = 5460. When creating my LV my Number of LPs would be 5460, if I set to "2 copies" this would be half (2730)?
So that takes care of the LV (basically a partition in MSWIN world?), now we need to give it a filesystem, when using SMITTY and adding an enhanced JFS and we select the 2nd option (previously defined logical volume) it is by default consuming all space on the defined LV?
My initial approach (original post) when I was going to the first option, was creating a enhanced JFS, it would of attempted to create a new LV? Thus this is why I was running into those errors?
As a note, I did find this interesting..
As we see I have 13104 Free PPs in my VG, when I attempt to create my LV I get an error.
2 Copies, 6552 LPs (which totals to 13104 LPs available in the vg_usr1).
So why the error? It Seemed to work when i set the LPs to 6000, however now I have 1103 free PPs that I was hoping to allocate to the same jfs2 fs/mount.
Am I hitting some kind of limitation? Just want to understand this fully.
My initial approach (original post) when I was going to the first option, was creating a enhanced JFS, it would of attempted to create a new LV? Thus this is why I was running into those errors?
Basically yes. The long answer is that you seem not to have a firm grasp of LVM concepts and terminology. See below.
Lets first deal with your other problem (with the big FS). Notice the difference in your provided output, i have snipped the important part:
Notice that you have 2(!) and not one LVs after creating the first LV and you have 1103 PPs free after using 12000 out of the initial 13104. You have one LV more than expected and one PP less than expected, right?
The reason for this is that JFS is a JOURNALED filesystem and as such it needs a journal. Issue a
and you will see an (automatically created) LV of type "jfslog" with the size of 1 PP. This has been created automatically when you issued your "mklv" command to create a LV without an "inline" log. JFS2 can use either an external jfslog device (one per VG) or an inline log (one per LV). This is why your "mklv" command failed: the jfslog LV was created first and then you missed one PP to fulfill your size demands.
Here is a short introduction to LVM concepts. I suggest you download and study some of IBMs Redbooks to that.
We start with disks. What a "disk" is can be a wide variety of devices: physical disks, RAID sets, LUNs, etc., basically everything that has a "hdisk"-device entry in "lsdev". We will consider a disk to be a real, physical disk at first. (Let us start simple and go from there.)
The first thing we have to create is a "volume group". VGs are purely logical constructs, containers. You create a VG and give it at least one disk. A disk inside a VG is called "physical volume", PV. Classical VGs can hold up to 32 PVs (there are "scalable" and "big" VGss, but about that later). There are commands ("extendvg", "reducevg") to add disks to a VG or remove them from one.
When a disk is added to a VG it is sliced into "physical partitions". A PP is the smallest amount of disk space a VG can deal with. Classical VGs can have a maximum of 1019 PPs in one PV, therefore a classical VG is limited to 32 x 1019 PPs in size. The PP size is therefore a vital decision and one should better err to the big side than to the small side. Bigger PPs mean you might waste some space because you cannot add less than a single PP to a FS. Selecting the PP size too small means you cannot use larger disks. Unfortunately the PP size cannot be changed, you will have to wipe the whole VG and create it anew.
Once you have a VG you can create volumes, LVs: volumes are similar to "partitions" in PCs. Raw disk space,which can be used either for filesystems or other purposes (raw devices, swap space, ...). LVs are created from (in principle) anonymized PPs. When you add a disk to a VG it is sliced up into PP-sized chunks (PPs) and these chunks are put into a big bag. Then you create a LV and give it a certain amount of PPs. You do not need to know where they come from (which PV and position) although you can control this process to the utmost extent (by using map files). You can, but do not have to (and one usually doesn't).
Notice that inside the LV there are "logical partitions", LPs. These are the logical equivalent of PPs, but abstracted. If you use a LV with one copy (unmirrored) then each PP corresponds to one LP and vice versa. When you have 2 copies there are two PPs corresponding to one LP, 3 copies would mean 3 PPs corresponding to 1 LP. The VG has an attribute controlling the allocation of these PPs: "each copy on a separate PV". This means that every PP resenting the same LP should be located on a different PV (disk). Switch the attribute off and all copies might land on the same disk.
Finally you can put filesystems (and some other things) onto a LV or use it as a raw device. The latter is often preferred by database guys (for no good reason any more, because the performance gain is next to nil nowadays). You can also put a JFS or JFS2 (and some other filesystems) ont it, you can create a paging device or system dump device. Creating a FS means you format the LV and put some FS information onto it. You can create a FS directly, in which case the underlying LV is automatically created for you (this is what you tried above and what failed). You can also grow and shrink the FS (command chfs), which will also automatically enlarge/shrink the underlying LV acccordingly. Notice that stiil the PP size is set. You can add 1 byte to the FS, but it would result in adding a whole LP (and therefore, depending on the LV copies, 1, 2 or 3 PPs) to the LV and subsequently to the FS. You can try it:
will grow "/some/FS" by not 1 byte but by the PP size.
We have an IBM Power 710. It has a USB port on the front. I have done some searching and see that there is information out there on how to create a JFS2 file system on USB drives. A few have commented that they would not recommend it, if the server is important, may crash the server... Just... (0 Replies)
Hi All,
Can you please answer my question.
i see lot of CPU utilization on AIX LPARs. i am able to find the cause of the probelm. But i do not know how to mitigate or fix the problem.
for instance,
i found the process which is consuming most of CPU. i informed the responsible team.
how... (7 Replies)
Good Day Everyone,
Just wonder anyone has encounter AIX 6.1 Memory Performance issues ? What I have in my current scenario is we have 3 datastage servers (Segregate server and EE jobs - for those who know Datastage achitect) and 2 db servers(running HA to load balance 4 nodes partitions for... (3 Replies)
Hello!
I have a LPAR with 51GB RAM
topas shows 21% of memory for client pages (~11Gb)
svmon -G show 2906772 client pages in use (~11Gb)
but then i try to investigate per process client memory usage
svmon -P -O filtertype=client
and summarize inuse column, i get only 347880 pages... (1 Reply)
Hi,
I want to print from AIX 5.3/6.1 using 'pr' preprocessing filter and 'PCL' print file type.
Steps:
1. Smitty
2. Print Spooling
3. Create a print queue(remote->Generic)
4. change the attributes for that print queue.
5. Change print file type to PCL and... (1 Reply)
Hi,
Does anyone here write cross-platform applications to be run on different Unix variants?
For some reason, an application I'm working with, when being run on machines with similar specifications, I run into "cannot allocate" errors (St9bad_alloc) on AIX but not on other platforms. Is it a... (8 Replies)
We are using AIX 5.2 using jfs2 almost all excpt one mount.
Is it possible for a non root user id to mount one file system without journaling turned on, perform some activities and then remount (un-mount and mount) the same file system again.
Please advise if this is possible
Thanks (2 Replies)
Hi Every body,
I created Volume Group & FileSystem of type JFS2 with size 1.3 TB on AIX 5.2.
I want to import this VG on another system AIX 4.3. It is imported successfully & I can varyon the VG but unfourtantly I couldn't mount the FileSystem. Is it possible to mount a JFS2 FileSystem on AIX... (3 Replies)
We are planning to move to AIX 5.3 and we would like to know if someone has had any 'bad' experiences with it.
We have a 32PE p690 Regatta and currently we are running the latest AIX 5.2 with the latest patches. Has anyone any interesting points to mention when transitioning to AXI 5.3?
Is... (1 Reply)