- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- dd with differnt size logical volumes
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
01-21-2006 10:34 AM
01-21-2006 10:34 AM
example:
/dev/vg50/lvol1 is 1gb with vxfs on lvol
/dev/vg50/lvol2 is 2gb empty
dd if=/dev/vg50/lvol1 of=/dev/vg50/lvol2 bs=1024k
I have not had a chance to test anything, but I'm thinking the filesystem would still be valid on lvol2 after the copy. However, 1gb of space would be wasted on lvol2. Would need to use fsadm -B to expand the file system to 2gb after the copy.
Will this work?
Thanks for replies!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2006 12:08 PM
01-21-2006 12:08 PM
SolutionI suspect that this would work, too, but why bother? From what you show, both logical volumes are on the same volume group and the larger one is empty.
Hence, use 'lvremove' to eliminate 'lvol2'. Follow that with an 'lvextend' of 'lvol1' and enlarge the filesystem contained therein with 'fsadm'.
I guarantee that this will be far faster than what you proposed.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2006 12:15 PM
01-21-2006 12:15 PM
Re: dd with differnt size logical volumes
To avoid an fsck pass, always unmount the source volume and always use the raw volume (r in front of the name). Without the 'r', all the data will go through the buffer cache, a waste of space and CPU cycles. Something like this:
dd if=/dev/vg50/rlvol1 of=/dev/vg50/rlvol2 bs=1024k
Once the dd copy is finished, just run extendfs to tell the filesystem about the additional space, then mount the filesystem and you'll see the new size.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2006 01:19 PM
01-21-2006 01:19 PM
Re: dd with differnt size logical volumes
The other LV if smaller than the source would become a smaller one. You would have to do a extendfs or a fsadm to increase its size.
In your example if you do a dd from lvol1 to lvol2, lvol2 would become a FS of 1GB after dd and you would need to do a fsadm / extendfs to increase its size back to 2GB.
Hope this helps.
regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2006 04:58 AM
01-22-2006 04:58 AM
Re: dd with differnt size logical volumes
Thanks for pointing that out about logical volumes being in same volume group. I neglected to specify the logical volumes are in seperate volume groups, so I have to do some means of copy.
I am wanting to use dd instead of cp or cpio because of the large number of files in the source file system.
Thanks for responses all.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2006 04:59 AM
01-22-2006 04:59 AM