2.6TB filesystem to be copied or moved to another FS ?


 
Thread Tools Search this Thread
Operating Systems AIX 2.6TB filesystem to be copied or moved to another FS ?
# 15  
Old 12-27-2010
homeyjoe, thank you for the post.

Just wondering why you have changed the logical volume type to copy ?

2. changed new lv to be type 'copy'


I didn't do this step, but would like to know the reason behind changing the type. When I created a logical volume and tried to copy it ( as i mentioned in the previous post ) i got an error and the message was :: Change the type of the logical volume with chlv command ...
At that time, i didn't understand why it needs to be changed and into what ...

So, I skipped, and I let the system create the logical volume and copy....So, when I chose the second option, I am not sure if AIX will automatically change the logical volume type to copy ?

Also, after successful mounting do i need to change the type to something else in-order to make the logical volume into write mode ?
# 16  
Old 12-27-2010
cplv

Since I made a new LV with my naming scheme, and not letting AIX create a generic-named LV, I had to set the type to 'copy' (per the cplv error code that you saw).
When you do a 'lsvg -l VGname' you will see that it's a 'copy' type instead of the usual jfs, jfs2, paging, etc. Once the cplv command is complete then the LV will be listed as jfs/jfs2 instead of copy.

Happy AIX-ing!
# 17  
Old 01-03-2011
guys the cplv didn't work.
I tried all the steps homeyjoe mentioned.

here is scenario

1) hdisk3 = testvg1 = 100MB = fslv02 = 20 pps = /testv1

2) hdisk4 = testvg2 = 200MB = testlv = 20 pps

did all the steps mentioned by homeyjoe but after mounting with another name /testv2 ; no data was present in the filesystem....
so, I renamed the original mount point /testv1 so that i can mount the copied logical volume filesystem as /testv1 and still no data present !!

- Do the logical volumes need to be of exact size ?
- Are there any additional steps missing ?

Last edited by filosophizer; 01-03-2011 at 10:18 AM..
# 18  
Old 01-03-2011
Filosophizer - Did you do a different command than what I listed in Step #6 since you say that you created another filesystem (/testv2)? I'm guessing this may be where the procedure I listed is failing for you.

Just so you know, when I do it my way I ended up with 2 lv's but only one filesystem. I had lvcore in rootvg and lvcorenew in data2vg. Only lvcorenew showed a filesystem mounted on it though (/usr/local/corefiles). So after verifying the files were present in /usr/local/corefiles I deleted the old lv (lvcore) in rootvg.

I've done this procedure multiple times over the years so I'm guessing there's something that you are doing differently.
# 19  
Old 01-03-2011
I followed your steps as you listed, and for step #6 i did as you mentioned:
two ways to do
through smitty ... add a filesystem on existing defined logical volume and in the section of LOG i mentioned the log logical form.

or through command you gave.

now step #6
# chfs -a dev=/dev/lvcorenew -a log=/dev/corelog /usr/local/corefiles rather it should be

# chfs -a dev=/dev/lvcorenew -a log=/dev/corelog /filesystem_name

otherwise you will get an error chfs: 0506-915 No record matching /usr/local/corefiles was found in /etc/filesystems.


I think the problem is in step 6
/usr/local/corefiles should be filesystem name or something else ?



# 20  
Old 01-03-2011
Right - /usr/local/corefiles is the name of my filesystem that I was moving from rootvg to data2vg. You will have to change that accordingly. Same with the lv names I was using. Sorry if I confused you!
# 21  
Old 01-03-2011
Let me the honor to refine your post and I will post the results at the end:

Author: homeyjoe
Topic : Copying Logical Volume or Filesystem from Volume Group to another Volume Group

Scenario 1: Same Filesystem name will be used to mount on the copied new logical volume

# lsvg -l test1
test1:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
loglv01 jfs2log 1 1 1 open/syncd N/A
fslv02 jfs2 20 20 1 open/syncd /testv0


# lsvg -l test2
test2:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT





Volume Groups / Logical Volumes / Filesystems used:
1) Hdisk3 = 100MB = test1
pp size = 4MB
Logical Volume = fslv02 = 20 pps
Filesystem = fslv02 mounted on /testv0

2) Hdisk4 = 200MB = test2
pp size = 4MB
No logical volume
No Filesystem
No Log in the volume group


0. umount the filesystem to be copied


Code:
   # umount /testlv0



1. Create a new logical volume (lv) in the volume group to be copied to - in our case volume group : test2
logical volume name : lvcorenew
pps: should be same or more than the original logical volume which we have 20

Code:
  # mklv -y lvcorenew -t jfs2 test2 20
 



2. Changed new lv to be type 'copy'

Code:
  # chlv -t copy lvcorenew



3. Run cplv to copy from original logical volume
fslv02 to new logical volume lvcorenew

Code:
  # cplv -e lvcorenew -f fslv02



4. Create new jfs2log for the new logical volume

Code:
  # mklv -y corelog -t jfs2log testvg2 1


5. Format the new jfs2log

Code:
  # logform /dev/corelog



6. Modify the existing filesystem to use the newly copied lv

Code:
  # chfs -a dev=/dev/lvcorenew -a log=/dev/corelog /usr/local/testv0


if the above doesn't work then
Code:
  # chfs -a dev=/dev/lvcorenew -a log=/dev/corelog /testv0





7. Mount the filesystem

Code:
  # mount /usr/local/testv0


or
Code:
   # mount /testv0

8. Check the filesystem

Code:
  # ls /testv0




Postscript

# chfs -a dev=/dev/lvcorenew -a log=/dev/logtest2 /usr/local/testv0
chfs: 0506-915 No record matching /usr/local/testv0 was found in /etc/filesystem s.


# chfs -a dev=/dev/lvcorenew -a log=/dev/logtest2 /testv0

# lsvg -l test1
test1:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
loglv01 jfs2log 1 1 1 closed/syncd N/A
fslv02 jfs2 20 20 1 closed/syncd N/A

# lsvg -l test2
test2:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
lvcorenew jfs2 25 25 1 closed/syncd /testv0
logtest2 jfs2log 2 2 1 closed/syncd N/A
#



Scenario 2: Different Filesystem name will be used to mount on the copied new logical volume ( will be posted by homeyjoe )

Last edited by filosophizer; 01-04-2011 at 08:31 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. AIX

Mount Filesystem in AIX Unable to read /etc/filesystem

Dear all, We are facing prolem when we are going to mount AIX filesystem, the system returned the following error 0506-307The AFopen call failed : A file or directory in the path name does not exist. But when we ls filesystems in the /etc/ directory it show -rw-r--r-- 0 root ... (2 Replies)
Discussion started by: m_raheelahmed
2 Replies

2. Solaris

Solaris Filesystem vs. Windows FileSystem

Hi guys! Could you tell me what's the difference of filesystem of Solaris to filesystem of Windows? I need to compare both. I have read some over the net but it's so much technical. Could you explain it in a more simpler term? I am new to Solaris. Hope you help me guys. Thanks! (4 Replies)
Discussion started by: arah
4 Replies

3. UNIX for Dummies Questions & Answers

hwo to find shared filesystem and local filesystem in AIX

Hi, I wanted to find out that in my database server which filesystems are shared storage and which filesystems are local. Like when I use df -k, it shows "filesystem" and "mounted on" but I want to know which one is shared and which one is local. Please tell me the commands which I can run... (2 Replies)
Discussion started by: kamranjalal
2 Replies

4. UNIX for Dummies Questions & Answers

Using sudo scp -r – can't get everything copied though

I want to copy a folder and all its contents of ~700GB from a computer to another. I've tried sudo scp -r directory/ admin@host:directory but the result is that the copied folder is about 2GBs smaller than the original. I checked the shell for errors and found some "file doesn't exist" errors.... (2 Replies)
Discussion started by: MJH
2 Replies

5. Solaris

Check copied file

Hi all, If i wanted to copy file within different folders or different servers, how do i determine the copied file is absolutely correct :confused: Is it using cmp and chksum command enough? Anyway that i can make further checking? Thanks in advance for reading & anyone who reply the... (7 Replies)
Discussion started by: beginningDBA
7 Replies

6. Solaris

Filesystem - error when extend the filesystem

Hi all, currently , my root filesystem already reach 90 ++% I already add more cylinder in the root partition as below Part Tag Flag Cylinders Size Blocks 0 root wm 67 - 5086 38.46GB (5020/0/0) 80646300 1 swap wu 1 - ... (11 Replies)
Discussion started by: SmartAntz
11 Replies
Login or Register to Ask a Question