- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Moving mountpoint and filesystem from one LUN ...
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
08-02-2006 10:07 AM
08-02-2006 10:07 AM
Moving mountpoint and filesystem from one LUN to another
I am running out of space in LUN0 and need to move one of the lvols to LUN1.
I want to make sure that all filesystem attributes and ownership remains the same (doesn't change to root).
The only thing I can think of doing is make a new mount point on LUN1 with a new name, copy over all of the file structure from LUN0, delete the old LUN0 filestructure.
Saving the filestructure to tape and recovering to the new mount point is very slow. Is there an easy way of doing this? The man files on the mv command indicates that I will loose the attributes and ownerships will change to root - not good.
Please advise.
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2006 10:16 AM
08-02-2006 10:16 AM
Re: Moving mountpoint and filesystem from one LUN to another
1) Create a new LUN (it should be no larger than your largest existing LUN in the existing VG.
2) ioscan -fn
insf
# this will let the host "see" the new LUN
3) pvcreate /dev/rdsk/cXtYdZ # create a new physical volume (PV)
4) use vgextend to add the new PV to your existing VG
5) Now use lvextend to "grow" your old LVOL(s)
6) Now use fsadm -Fvxfs to extend the filesystems (or extendfs if you don't have OnlineJFS)
7) Declare victory
You can actually do all of this with the system up and running and if you have OnlineJFS, you can extend the filesystem(s)
"on the fly" while the application is up and running. If this sounds complicated then SAM -> Disks & Filesystems will actually do all the steps for you (although it's a wimpy approach for a real sysadmin).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2006 10:17 AM
08-02-2006 10:17 AM
Re: Moving mountpoint and filesystem from one LUN to another
fbackup -i /lun0 -f - | (cd /lun1; frecover -Xrf -)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2006 10:19 AM
08-02-2006 10:19 AM
Re: Moving mountpoint and filesystem from one LUN to another
SOURCEFS=/my/source/fs
DESTINFS=/my/destination/fs
cd ${SOURCEFS}
xvdump 0f - ${SOURCEFS} | (cd ${DESTINFS} ; vxrestore xf -)
it is quite fast. As a matter of fastest method we could find to do a host copy when we were migrating from one SAN device to the other couple of years ago.
hope this helps
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2006 10:19 AM
08-02-2006 10:19 AM
Re: Moving mountpoint and filesystem from one LUN to another
This is easily accomodate with 'cpio' or 'fbackup':
# cd srcdir && find . -depth -print | cpio -pudlmv dstdir
# cd srcdir && fbackup -i . -f - | ( cd dstdir && frecover -Xsrf - )
..where 'srcdir' is your old mountpoint and 'dstdir' is your new mountpoint (logical volume). When done, edit '/etc/fstab' to change the device file associated with the 'srcdir' mountpoint and eliminate the 'dstdir' mountpoint. In that way you will have exchanged the logical volumes while retaining your original mountpoint directory name.
The advantage to 'fbackup' is that is handles largefiles and sparse files.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2006 10:20 AM
08-02-2006 10:20 AM
Re: Moving mountpoint and filesystem from one LUN to another
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2006 10:36 AM
08-02-2006 10:36 AM
Re: Moving mountpoint and filesystem from one LUN to another
My system is N4000 with HP-UX 11.11
LUN0 has numerous lvols dedicated to numerous databases. 2 of those lvols on LUN0 are 98% full (8GB on one and 10GB on the other). On LUN0 I only have a few MB free, while on LUN1 I have about 15GB free.
I need to move the 8GB lvol from LUN0 to LUN1 and lvextend it out another 4GB. After the move, I can remove the old lvol to free up 8GB of space on LUN0. I can then lvextend the remaining 10GB full lvol in LUN0 and extend it out to 15 GB (and still have room for other growth).
Whichever way I go I'll need a full backup to tape before attempting a fix. A tape recovery to a new lvol will be slow. I was hoping to find a solution at processor speed.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2006 10:51 AM
08-02-2006 10:51 AM
Re: Moving mountpoint and filesystem from one LUN to another
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2006 10:55 AM
08-02-2006 10:55 AM
Re: Moving mountpoint and filesystem from one LUN to another
You asked, "Will fbackup or cpio retain the file attributes and ownership 'as is'?"
Yes. For more information, simply see the respective manpages.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2006 11:10 AM
08-02-2006 11:10 AM
Re: Moving mountpoint and filesystem from one LUN to another
Thank you again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2006 12:03 PM
08-02-2006 12:03 PM
Re: Moving mountpoint and filesystem from one LUN to another
While I would suggest that you take a backup before doing this, I can tell you that I have done this very operation hundreds of times "on the fly" without a single hiccup. You will be done in a fraction of the time your copy operation will take.
By the way, if you are going to do a copy then an fbackup/frecover pipeline is the way to go because tar and cpio have a 2GiB maximum file size limit (ok, 8GiB with tar, if patched).