- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Tar & lvm
Operating System - HP-UX
1753424
Members
5236
Online
108793
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
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
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
тАО12-21-2005 01:31 PM
тАО12-21-2005 01:31 PM
Tar & lvm
Hi friends,
Good Morning,
i.) Can I know how we use Tar command let say we want to test the tape drive after installation or any other method?
Ii.) When we do a bdf and found that the space is not enough or the percentage is higher, we want to get more space , what should we do?
Please advise your idea & steps , thank you very much.
Regards
Good Morning,
i.) Can I know how we use Tar command let say we want to test the tape drive after installation or any other method?
Ii.) When we do a bdf and found that the space is not enough or the percentage is higher, we want to get more space , what should we do?
Please advise your idea & steps , thank you very much.
Regards
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-21-2005 01:49 PM
тАО12-21-2005 01:49 PM
Re: Tar & lvm
Hi,
The tar method is the traditional UNIX backup and restore method. Its major benefit is that it can be used across many manufacturers' UNIX computers. The same command is used both for backup and restore purposes. The backup created using tar makes efficient use of the media.
Creating a Backup with tar
To create a backup of the /etc and /home directories using the tar command on a tape device, the command is as follows. The tar command uses /dev/rmt/0m as the default tape drive, so you can omit this on the command line.
# tar -cvf /dev/rmt/0m /etc /home
a /etc/MANPATH 1 blocks
a /etc/PATH 1 blocks
a /etc/SHLIB_PATH 1 blocks
a /etc/SnmpAgent.d/snmpinfo.dat 111 blocks
a /etc/SnmpAgent.d/snmpd.conf 14 blocks
a /etc/TIMEZONE 1 blocks
a /etc/X11/X0screens 35 blocks
a /etc/X11/X0devices 16 blocks
a /etc/X11/X0pointerkeys 25 blocks
a /etc/X11/rgb.txt 43 blocks
a /etc/X11/XHPKeymaps 553 blocks
a /etc/X11/fs/config 3 blocks
a /etc/X11/rgb.dir 8 blocks
a /etc/X11/rgb.pag 58 blocks
a /etc/X11/C/print/attributes/document 2 blocks
The -c option is used when creating a backup. You can also create a tar backup file on another file system instead of on a tape device. For this purpose, use a file name with the -f option instead of the device name. To create a tar backup of the /home directory in a file, /extra/home.tar, use the following command.
tar ├в cvf /extra/home.tar /home
To list the contents of a tar backup, use the -t option with the tar command. The following command lists the contents of a tape device.
tar ├в tvf /dev/rmt/0m
You can also use the command as follows, as /dev/rmt/0m is the default tape drive used by the tar command.
tar -tv
To restore data from a tar backup, use the -x option with the tar command. The following command restores data from a tape backup device.
# tar ├в xvf /dev/rmt/0m
x MANPATH, 279 bytes, 1 tape blocks
x PATH, 163 bytes, 1 tape blocks
x SHLIB_PATH, 9 bytes, 1 tape blocks
x SnmpAgent.d/snmpinfo.dat, 56769 bytes, 111 tape blocks
x SnmpAgent.d/snmpd.conf, 6959 bytes, 14 tape blocks
x TIMEZONE, 21 bytes, 1 tape blocks
Next,
Disk space utilization can be viewed with the help of the bdf command, which lists all mounted file systems and shows the following information about each file system.
file system name
total capacity in kilobytes
used capacity in kilobytes
available capacity in kilobytes
percentage of utilization
mount point
Output of this command is shown here.
$ bdf
Hope this helps!
Chandan
The tar method is the traditional UNIX backup and restore method. Its major benefit is that it can be used across many manufacturers' UNIX computers. The same command is used both for backup and restore purposes. The backup created using tar makes efficient use of the media.
Creating a Backup with tar
To create a backup of the /etc and /home directories using the tar command on a tape device, the command is as follows. The tar command uses /dev/rmt/0m as the default tape drive, so you can omit this on the command line.
# tar -cvf /dev/rmt/0m /etc /home
a /etc/MANPATH 1 blocks
a /etc/PATH 1 blocks
a /etc/SHLIB_PATH 1 blocks
a /etc/SnmpAgent.d/snmpinfo.dat 111 blocks
a /etc/SnmpAgent.d/snmpd.conf 14 blocks
a /etc/TIMEZONE 1 blocks
a /etc/X11/X0screens 35 blocks
a /etc/X11/X0devices 16 blocks
a /etc/X11/X0pointerkeys 25 blocks
a /etc/X11/rgb.txt 43 blocks
a /etc/X11/XHPKeymaps 553 blocks
a /etc/X11/fs/config 3 blocks
a /etc/X11/rgb.dir 8 blocks
a /etc/X11/rgb.pag 58 blocks
a /etc/X11/C/print/attributes/document 2 blocks
The -c option is used when creating a backup. You can also create a tar backup file on another file system instead of on a tape device. For this purpose, use a file name with the -f option instead of the device name. To create a tar backup of the /home directory in a file, /extra/home.tar, use the following command.
tar ├в cvf /extra/home.tar /home
To list the contents of a tar backup, use the -t option with the tar command. The following command lists the contents of a tape device.
tar ├в tvf /dev/rmt/0m
You can also use the command as follows, as /dev/rmt/0m is the default tape drive used by the tar command.
tar -tv
To restore data from a tar backup, use the -x option with the tar command. The following command restores data from a tape backup device.
# tar ├в xvf /dev/rmt/0m
x MANPATH, 279 bytes, 1 tape blocks
x PATH, 163 bytes, 1 tape blocks
x SHLIB_PATH, 9 bytes, 1 tape blocks
x SnmpAgent.d/snmpinfo.dat, 56769 bytes, 111 tape blocks
x SnmpAgent.d/snmpd.conf, 6959 bytes, 14 tape blocks
x TIMEZONE, 21 bytes, 1 tape blocks
Next,
Disk space utilization can be viewed with the help of the bdf command, which lists all mounted file systems and shows the following information about each file system.
file system name
total capacity in kilobytes
used capacity in kilobytes
available capacity in kilobytes
percentage of utilization
mount point
Output of this command is shown here.
$ bdf
Hope this helps!
Chandan
Learn. Share. Inspire.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-21-2005 02:19 PM
тАО12-21-2005 02:19 PM
Re: Tar & lvm
Hi,
i) you can either use #tar -tvf /dev/rmt/0m to list of contents of a tape / use #tar -cvf to copy any files.
ii) You can login and delete any unwanted files to free-up some space.
With Regards,
Siva.
i) you can either use #tar -tvf /dev/rmt/0m to list of contents of a tape / use #tar -cvf to copy any files.
ii) You can login and delete any unwanted files to free-up some space.
With Regards,
Siva.
Nothing is Impossible !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-22-2005 01:53 AM
тАО12-22-2005 01:53 AM
Re: Tar & lvm
To get more space, you can extend the file systems....
Do a
vgdisplay -v /dev/vgXX
where XX is the number of your volume group...like say vg00
At the bottom, you will see the "--- Physical volumes ---" - look at "Free PE" - if there is some - then you can use it.
PE - Physical Extents - look at the "PE Size (Mbytes)" field - then multiply that by the "Free PE" to determine how many Mega Bytes you have available.
If you have onlinejfs ( swlist -l fileset |grep OnlineJFS ) then you can extend on the fly:
Say /var in lvol8, and you want to make it 2GB:
lvextend -l 2048 /dev/vg00/lvol8
fsadm -F vxfs -b 2048M /var
That's it.
If you don't have onliunejfs, you will have to unmount the filesystem, do the same lvextend, and then do an extendfs -F vxfs /dev/vg00/rlvol8
Rgds...Geoff
Do a
vgdisplay -v /dev/vgXX
where XX is the number of your volume group...like say vg00
At the bottom, you will see the "--- Physical volumes ---" - look at "Free PE" - if there is some - then you can use it.
PE - Physical Extents - look at the "PE Size (Mbytes)" field - then multiply that by the "Free PE" to determine how many Mega Bytes you have available.
If you have onlinejfs ( swlist -l fileset |grep OnlineJFS ) then you can extend on the fly:
Say /var in lvol8, and you want to make it 2GB:
lvextend -l 2048 /dev/vg00/lvol8
fsadm -F vxfs -b 2048M /var
That's it.
If you don't have onliunejfs, you will have to unmount the filesystem, do the same lvextend, and then do an extendfs -F vxfs /dev/vg00/rlvol8
Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP