Are you wanting to shrink the filesystem, replace a disk or something? I'm wondering why you are so interested.
To shrink a filesystem on AIX is not simple task like it can by on some other operating systems, for instance RHEL 6 has an option to re-size up or down the filesystem and logical volume all in one command, although it requires it to unmount as part of the process.
On AIX you would need to either:-
Build a new filesystem of the required size, move the data and then remount the new filesystem to the correct location (making the change permanent for next boot etc.)
Backup the data, destroy and re-create the filesystem and then restore the data.
If you are looking to free up or replace a disk, then migratepv is your friend here. It can take a while depending how big your filesystem is, but it will (one at a time) make a copies the LPs to the target drive then remove the old one. Do not interrupt the process as this can leave you with inconsistencies in the volume group and logical volume information.
An alternate would be to use mirrors to achieve this if placement is critical. You can use mklvcopy to add a third copy to the new disk (and synchronise them) and then use rmlvcopy specifying to remove the one from the old disk. When making the 3rd copy, you can specify a map-file to force it to use the PPs on whichever disk in whichever order you want if that is important.
Whichever technique you use, you can empty a disk and remove it from the volume group for replacement or use elsewhere.
If I've missed the point, then let us know what you really need to know and we will try to help.
Regards,
Robin
Hehe, how do you know that. It's true that I'm having problem with filesystem, but it's a little different with what you think. In fact, I want to split the data of a filesystem on multiple hard disks equally.
It's quite a waste of lines listing all the lp/pp of the real filesystem I'm handling, so allow me to use that /movelv_test as an example.
This is how it looks like
( Don't be surpised why it looks like that. At first, the vg of this fs have only 2 pv, hdisk1 and hdisk2. The data grew up day by day and when there was no free pp on hdisk1 and hdisk2, we added two more pv: hdisk3 and hdisk4 to the vg and then increase the /movelv_test size . Now this fs 's Used% is ~ 55%, 180GB assigned to the fs/ 100GB data used )
The problem is when I checked the disk operation ( by command "topas" ), I found that the operation of hdisk1 and hdisk2 is very high, ~90%-100% while the operation of hdisk3 and hdisk4 is just ~ 10% ( most of the disk operation is writing - the application writes logs to the fs's mountpoint ).
The result of the "topas" command and the lp/pp listed above made me think that data fills the raw disk space like water fills a bucket - as bakunin said, but now I know it's not true.
Now, what I want to do is to balance the disk operation of these 4 pv ( just only at this time,temporarily don't care about data increasing ) and I intend to do like this:
_ Decrease the size of the fs so that the fs's Used% ~ 99% ( to ensure that most of the pp are filled with data and don't care whether the pp contains data or not ), in this case - decrease size of /movelv_test to 101 GB
_ Used "migratelp" command to arrange each pp of the fslv01 like this
_ Increase the size of the fs back ( in this case is 180 GB )
And I have two questions
1. Is it OK to use the command " migratelp" to do something like this. The data availability, the synchronization between the 1st mirror and the 2nd mirror ... is OK ? Are there any errors of the filesystem, errors of data, ... after using this command? If 1 of 4 hard disk fails, the data is still OK ???
2. Does this solution work ? Are there any solutions better?
hi,
just need to know the disk size and the partition size on machine.pls let me know how to do that.is their a way i can get to know the size of directory.like /,/var...etc.
thanx (2 Replies)
Hello,
I need explanations about physical disks and physical volumes. What is the difference between these 2 things?
In fact, i am trying to understand what the AIX lspv2command does.
Thank you in advance. (2 Replies)
I have a 50GB section of my hard drive on which I've kept all my music, movies and more back from when I had Windows. When I'm in linux it says that the NTFS section is a read only section. Is it possible to copy, rename, add, move or delete any files off of this section? I'm trying to get rid... (2 Replies)
Hiya people,
A great big "HI" to everybody. I'm new to the Forum and now to my problem(s).
I am about to partition my only 80GB HD and using the Partition Magic 8 software it looks fairly simple although here is my problem :-
1. Do I change the new partition to primary or logical?
2. Do I... (4 Replies)
I was in smit, checking on disc space, etc. and it appears that one of our physical volumes that is part of a large volume group, has no free physical partitions. The server is running AIX 5.1. What would be the advisable step to take in this instance? (9 Replies)
Hi everyone :b:
I'm glade to join this forum and I have one question
I installed latest Solaris 10 release on SF V480 with 2 73 GB disks 8 GB RAM 4 CPU's
My configuration is 10GB for root, 8GB for Swap and 12GB for var.
I mirrored root, so disk 1 has 40GB free of space and disk 2 has... (11 Replies)
At my computer shop where I work, we got alot of used PC's from some place. It's my job to refurbish them for resale. Each computer comes with XP pro. So the boss man asks me if there is a way to put a XP restore option. I say yes if I install Linux on a small partion and use partimage to make a... (1 Reply)
I can't control the partion order during install.
For example i need.
hda5 /var 1GB
hda6 /opt 2GB
I created them in such order but OS adjust them to
hda5 /opt 2GB
hda6 /var 1GB
It is frustrating during install, I pretty sure I can order the partion as i like... (0 Replies)
Hello All,
Can anybody please tell me what is the maximum limit of Physical IBM Power Machine which can be handled by single HMC at a single point of time?
Thanks,
Jenish (1 Reply)