- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Best way to move a Filesystem!
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2002 07:09 AM
10-14-2002 07:09 AM
Unfortunately the forums search engine still not working, so I can't find links that may give me answers on how to do all this.
........Filesystem......kbytes......used.......avail...%used..Mounted on
.../dev/vg00/lvol3......86016......20470........61495....25%.../
.../dev/vg00/lvol1......47829......22170........20876....52%.../stand
.../dev/vg00/lvol8.....512000.....454139........55649....89%.../var
.../dev/vg00/lvol7.....528384.....394272.......127020....76%.../usr
.../dev/vg00/lvol4......98304.......7223........85892.....8%.../tmp
/dev/vg03/oradata2....8192000....3334945......4555272....42%.../oradata2
./dev/vg02/ordata1....4096000....1024661......2879860....26%.../oradata1
./dev/vg01/oradata....8380416....4546446......3596666....56%.../oradata
../dev/vg00/oracle....1024000.....774098.......234334....77%.../oracle
.../dev/vg00/lvol6.....696320.....604890........85755....88%.../opt
.../dev/vg00/lvol5......20480......15284.........5196....75%.../home
.../dev/vg05/lvol1...17408000....4067237.....12508657....25%.../data2
.../dev/vg04/lvol2....6348800....4090728......2119265....66%.../data
Thanks in advance for any input!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2002 07:13 AM
10-14-2002 07:13 AM
Re: Best way to move a Filesystem!
For mirrorin, I think you can do it as a second step and synchronise your logical volume.
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x1b13237a4bc6d611abdb0090277a778c,00.html
Jean-Luc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2002 07:19 AM
10-14-2002 07:19 AM
Re: Best way to move a Filesystem!
Sandip
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2002 07:20 AM
10-14-2002 07:20 AM
Solutionwill create the new LVOL and mirror it.
2) newfs -F vxfs /dev/vg05/roracle
will create the new filesystem.
3) mkdir /tmporacle
mount -F vxfs /dev/vg05/oracle /tmporacle
4) Shutdown database
5) cd /oracle
find . | cpio -pudvm /tmporacle
6) cd /
umount /oracle
umount /tmporacle
modify /etc/fstab changing the /oracle mount to be /dev/vg05/oracle
7) mount /oracle
rmdir /tmporacle
8) Start database.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2002 07:21 AM
10-14-2002 07:21 AM
Re: Best way to move a Filesystem!
use: vgdisplay vg05
to verify that you have enough space there,
use: lvcreate -L 1024 -n oracle vg05
to create a 1GB lvol named oracle
use: newfs -F vxfs /dev/vg05/roracle
to create a Filesystem
use: mkdir /new_oracle
to create a mount point
use: mount /dev/vg05/oracle /new_oracle
to mount the filesystem
stop Oracle
cd /oracle
use: find . -xdev | cpio -pduvmx /new_oracle
to copy the whole filesystem
umount /new_oracle
umount /oracle
to umount both filesystems
edit /etc/fstab and replace
/dev/vg00/oracle with /dev/vg05/oracle
use: mount /oracle
to mount and bdf to check it is mounted
use: lvextend -m 1 /dev/vg05/oracle to setup an LVM mirror
start Oracle
HTH
Regards,
Bernhard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2002 07:30 AM
10-14-2002 07:30 AM
Re: Best way to move a Filesystem!
I've never done this, so this may sound like a dumb question (something I should already know), but don't I have to resize /dev/vg05/lvol1 from 17000 MB to 16000 MB and /dev/vg03/oradata2 from 8000 to 7000 first before I try to create the new LV there?
I hope this does not display too weird:
??Logical Volumes ??------------------------------------------------------------------------------??
?? Total Mirror Mount ??
?? Logical Volume Volume Group Use Mbytes Copies Directory ??
??+---------------------------------------------------------------------------+ ??
???? lvol1 vg00 HFS 48 1 /stand ^ ??
???? lvol1 vg04 Swap 2480 0 ??
???? lvol1 vg05 VxFS 17000 0 /data2 ??
???? lvol2 vg00 Swap/Dump 1120 1 ??
???? lvol2 vg03 Swap 1360 0 ??
???? lvol2 vg04 VxFS 6200 0 /data ??
???? lvol3 vg00 VxFS 84 1 / ??
???? lvol4 vg00 VxFS 96 1 /tmp ??
???? lvol5 vg00 VxFS 20 1 /home ??
???? lvol6 vg00 VxFS 680 1 /opt v ??
???? lvol7 vg00 VxFS 516 1 /usr
???? lvol8 vg00 VxFS 500 1 /var
???? oracle vg00 VxFS 1000 1 /oracle
???? oradata2 vg03 VxFS 8000 1 /oradata2
???? oradata vg01 VxFS 8184 1 /oradata
???? ordata1 vg02 VxFS 4000 1 /oradata1 v
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2002 07:34 AM
10-14-2002 07:34 AM
Re: Best way to move a Filesystem!
A) you cannot mirror "across" volume groups.
B) you do not want to extend an existing logical volume but create a new one.
That's why you need to check available space with vgdisplay.
Regards,
Bernhard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2002 07:34 AM
10-14-2002 07:34 AM
Re: Best way to move a Filesystem!
DO NOT REDUCE THE SIZE OF AN LVOL, THIS WILL CORRUPT YOUR FILESYSTEM (MOST LIKELY)
(you would first have to reduce the size of the filesystem in the lvol)
Regards,
Bernhard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2002 07:44 AM
10-14-2002 07:44 AM
Re: Best way to move a Filesystem!
# vgdisplay vg05
--- Volume groups ---
VG Name /dev/vg05
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 1
Open LV 1
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 5342
VGDA 2
PE Size (Mbytes) 8
Total PE 2170
Alloc PE 2125
Free PE 45
Total PVG 0
# lvcreate -L 1024 -n oracle vg05
Logical volume "/dev/vg05/oracle" has been successfully created with
character device "/dev/vg05/roracle".
lvcreate: Not enough free physical extents available.
Logical volume "/dev/vg05/oracle" could not be extended.
Run the "lvextend" command to create space on the Logical Volume.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2002 07:47 AM
10-14-2002 07:47 AM
Re: Best way to move a Filesystem!
Ted
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2002 07:51 AM
10-14-2002 07:51 AM
Re: Best way to move a Filesystem!
Ted
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2002 07:53 AM
10-14-2002 07:53 AM
Re: Best way to move a Filesystem!
--- Volume groups ---
VG Name /dev/vg05
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 1
Open LV 1
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 5342
VGDA 2
PE Size (Mbytes) 8
Total PE 2170
Alloc PE 2125
Free PE 45
Total PVG 0
It looks like you're out of luck in vg05. You have only 1 LV in vg05 (ie lvol1) and its size is (2125*8=17GB), what's left is (45*8=360MB). While reducing lvol1 in vg05 is not recomendded, you have 2 choices ..
1) Migrate /oracle (needs about 1GB or more)
to other than vg05. It depends on the space available.
2) Recreate /data2 FS to a smaller size (maybe 12GB) but that involves backing up /data2 to another location, recreate a new FS then restore it back.
For now if time is crucial, option 1 is your choice.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2002 07:59 AM
10-14-2002 07:59 AM
Re: Best way to move a Filesystem!
2)vgexport -p -m /temp/your_map /dev/vg00
3)vgimport -m /temp/your_map /dev/vg05
4)for each disk present in VG00 do
dd if=/dev/rdsk/original_disk of=/dev/rdsk/new_disk
this is supposed to replicate the disks.
It is right?
Regards,
Tibi Baraboi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2002 08:29 AM
10-14-2002 08:29 AM
Re: Best way to move a Filesystem!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2002 08:42 AM
10-14-2002 08:42 AM
Re: Best way to move a Filesystem!
Briefly ..
1) Make a temporary cpio copy of /data2 to /oradata2 since /oradata2 has 4.5GB left.
==> Better still backup /data2 to tape also just in case.
2) Recreate a smaller lvol1 /data2 FS.
3) Cpio the data back from /oradata2.
4) Now you can create lvol2 to house /oracle.
The steps ..
# cd /oradata2
# mkdir data2
# cd /data2
# find . | cpio -pudvm /oradata2/data2
==> At this point after the cpio is done you might want to backup /data2 to tape also.
# cd /
# umount /data2
# lvremove /dev/vg05/lvol1
# lvcreate -L 12000 -n lvol1 /dev/vg05
# newfs -F vxfs /dev/vg05/rlovl1
# mount -a
# cd /oradata2/data2
# find . | cpio -pudvm /data2
Now you can follow Clay's step to move /oracle to vg05.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2002 05:49 AM
10-19-2002 05:49 AM
Re: Best way to move a Filesystem!
Thanks! Post another comment so that I may give each of you 10 pts.
NOTE: I do have to say that I appreciate everyone's efforts to help me solve this problem.