- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- moving files to a new 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
02-06-2003 04:11 PM
02-06-2003 04:11 PM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2003 04:16 PM
02-06-2003 04:16 PM
Re: moving files to a new filesystem
If so, I'd use cpio and do something like:
cd {original_mount_point}
find . -xdev -depth -print | cpio -padmucx {new_mount_point}
for example cd /u01 ; find . -xdev -depth -print | cpio -padmucx /new/u01
let me know if I interpreted your question properly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2003 04:22 PM
02-06-2003 04:22 PM
Re: moving files to a new filesystem
"Because of industry standards and nteroperability goals, cpio does not support the archival of files larger than 2GB or files that have user/group IDs greater than 60K. Files with user/group IDs greater than 60K are archived and restored under the user/group ID of the current process."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2003 04:23 PM
02-06-2003 04:23 PM
Re: moving files to a new filesystem
Create your new logical volume and mount it on a mount point like /copy
# mount /dev/myvg/mylvol /copy
# cd /oldfilesystem
# find . -xdev | cpio -pdumv /copy
# unmount /copy
# cd /
# umount /oldfilesystem
# mount /dev/myvg/mylvol /oldfilesystem
Don't forget to update the /etc/fstab file with the new logical volume information on the old mount point name.
Regards
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2003 04:33 PM
02-06-2003 04:33 PM
SolutionWhat did you mean by "along with"?. You create a new file system and then copy the data.
1. Create a new file system with desired size.
lvcreate -n lv_name -L size_in_mb vg01
newfs -F vxfs /dev/vg01/rlv_name
mkdir /templv
mount /dev/vg01/lv_name /templv
2. Copy data from old mount point to the temp mount point.
cd /oldlv
find . |cpio -pdvma /templv
3. Unmount /oldlv and /templv
#cd /
#umount /oldlv
(you will need to bring down the processes that use this filesystem)
#umount /templv
4. Edit /etc/fstab
(replace the lvol of oldlv with new lvol)
5. Mount the new lvol
#mount -a
Ensure new lvol is mount on /oldlv
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2003 04:50 PM
02-06-2003 04:50 PM
Re: moving files to a new filesystem
It's generally faster and you don't need to worry about missing out on .profile or other "dot" files as you do with find.
This one comes from the restore man page.
dump 0f - /usr | (cd /mnt; restore xf -)
works like a charm and is generally pretty fast (faster than cpio anyhow)
Hope this helps.
Scott.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2003 05:24 PM
02-06-2003 05:24 PM
Re: moving files to a new filesystem
which means you dont need the data at old place. Then simply use mv command (it wond move socket files, but dont worry they will be created when you start your application)
So Create a new filesystem and mount as said by people above and
cd /oldfilesystem
mv * /newfilesystem
Thanks
Rajeev
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2003 03:38 AM
02-07-2003 03:38 AM
Re: moving files to a new filesystem
I have used the 'cpio' technique on many occassions as noted by several colleagues above. However, if largefiles (>2GB) and/or sparse files are an issue, you can use 'fbackup'/'frecover' thusly:
# cd /srcdir
# fbackup -i . -f - | (cd /dstdir; frecover -Xsrf -)
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2003 04:23 AM
02-07-2003 04:23 AM
Re: moving files to a new filesystem
I think that all 'moving' answers have been covered, but since you made a post in the lvm forum, I just wanted to remind you that if you want to move a filesystem to another disk, you could also move directly the lvol using pvmove, or if you want a copy int the same vg, use lvextend/lvsplit to get an exact copy (unmount first to be sure).
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2003 03:45 PM
02-07-2003 03:45 PM
Re: moving files to a new filesystem
or can the filesystem be mounted during this procedure???
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2003 04:13 PM
02-07-2003 04:13 PM