LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 04-03-2013, 03:02 AM   #1
sanjayraghuwanshi
LQ Newbie
 
Registered: Apr 2013
Posts: 3

Rep: Reputation: Disabled
How to check Tape size ( Percentage free and utilize space)


Hi,

Any can please help me to provide detail how can I check tape size.

Total space.

Percentage free and Utilize space.

Thanks..
 
Old 04-03-2013, 03:38 AM   #2
cliffordw
Member
 
Registered: Jan 2012
Location: South Africa
Posts: 248

Rep: Reputation: 107Reputation: 107
Hi there,

What tape drive are you referring to?

For the tape size, I think you can deduce this by running "mt status" and looking at the density code. Some of the values you can expect to see are documented at http://adsm.org/lists/html/Amanda-Us.../msg00145.html.

Regarding the percentage free and used space, I this will depend a little on what backup software you are using, and in particular how many (tape) "files" you are writing to the tape (think non-rewind devices - typically /dev/nst0 I think). You would be able to determine how much space is utilized by running something like "dd if=/dev/st0 of=/dev/null" and looking at the output to see how many (512-byte) blocks were read from the tape. This will take some time, though, as it physically reads everything on the tape. For multi-file tapes you will need to repeat this for each file.

Once you have the tape size & space utilized, you can calculate the percentage free & used.

Godo luck!
 
1 members found this post helpful.
Old 04-03-2013, 05:05 AM   #3
sanjayraghuwanshi
LQ Newbie
 
Registered: Apr 2013
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by cliffordw View Post
Hi there,

What tape drive are you referring to?

For the tape size, I think you can deduce this by running "mt status" and looking at the density code. Some of the values you can expect to see are documented at http://adsm.org/lists/html/Amanda-Us.../msg00145.html.

Regarding the percentage free and used space, I this will depend a little on what backup software you are using, and in particular how many (tape) "files" you are writing to the tape (think non-rewind devices - typically /dev/nst0 I think). You would be able to determine how much space is utilized by running something like "dd if=/dev/st0 of=/dev/null" and looking at the output to see how many (512-byte) blocks were read from the tape. This will take some time, though, as it physically reads everything on the tape. For multi-file tapes you will need to repeat this for each file.

Once you have the tape size & space utilized, you can calculate the percentage free & used.

Godo luck!
Thanks..

soemsrv1:~ # mt -f /dev/st0 status
drive type = Generic SCSI-2 tape
drive status = 1107296256
sense key error = 0
residue count = 0
file number = 0
block number = 0
Tape block size 0 bytes. Density code 0x42 (LTO-2).
Soft error count since last status=0
General status bits on (41010000):
BOT ONLINE IM_REP_EN

In this out put Density code is 0X42 but i have not found value for this code please suggest.

I have run dd , plesae see out put of command below,

soemsrv1:~ # dd if=/dev/st0 of=/dev/null
dd: reading `/dev/st0': Cannot allocate memory
0+0 records in
0+0 records out
0 bytes (0 B) copied, 7.95949 seconds, 0.0 kB/s

Kindly suggest.
 
Old 04-03-2013, 08:18 AM   #4
sundialsvcs
Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,062

Rep: Reputation: 972Reputation: 972Reputation: 972Reputation: 972Reputation: 972Reputation: 972Reputation: 972Reputation: 972
I think you'd need to have a little camera mounted so that it could watch the spinning reels to see how much tape they contain.
 
Old 04-03-2013, 11:22 AM   #5
cliffordw
Member
 
Registered: Jan 2012
Location: South Africa
Posts: 248

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by sanjayraghuwanshi View Post
Thanks..

soemsrv1:~ # mt -f /dev/st0 status
drive type = Generic SCSI-2 tape
drive status = 1107296256
sense key error = 0
residue count = 0
file number = 0
block number = 0
Tape block size 0 bytes. Density code 0x42 (LTO-2).
Soft error count since last status=0
General status bits on (41010000):
BOT ONLINE IM_REP_EN

In this out put Density code is 0X42 but i have not found value for this code please suggest.

I have run dd , plesae see out put of command below,

soemsrv1:~ # dd if=/dev/st0 of=/dev/null
dd: reading `/dev/st0': Cannot allocate memory
0+0 records in
0+0 records out
0 bytes (0 B) copied, 7.95949 seconds, 0.0 kB/s

Kindly suggest.
Regarding the capacity of the LTO-2 tape, according to http://en.wikipedia.org/wiki/Linear_Tape-Open it is 200 GB.

Regarding the dd error, I think this has to do with the block size. How did you write your backup to the tape (command)? It might help to specify a block size, as in: "dd if=/dev/st0 of=/dev/null bs=32768".
 
1 members found this post helpful.
Old 04-03-2013, 11:49 PM   #6
sanjayraghuwanshi
LQ Newbie
 
Registered: Apr 2013
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by cliffordw View Post
Regarding the capacity of the LTO-2 tape, according to http://en.wikipedia.org/wiki/Linear_Tape-Open it is 200 GB.

Regarding the dd error, I think this has to do with the block size. How did you write your backup to the tape (command)? It might help to specify a block size, as in: "dd if=/dev/st0 of=/dev/null bs=32768".
Thanks cliffordw,

This info is really helpful for me.

I write backup to the tape via command:- tar -rvf /dev/st0 /path/to/backup
 
Old 04-04-2013, 10:49 AM   #7
rnturn
Member
 
Registered: Jan 2003
Location: Illinois (Chicago area)
Distribution: Red Hat (8.0), SuSE (10.x, 11.x, 12.2), Solaris (8-10), Tru64
Posts: 889

Rep: Reputation: 45
Quote:
Originally Posted by sanjayraghuwanshi View Post
Any can please help me to provide detail how can I check tape size.

Total space.

Percentage free and Utilize space.
This is really quite difficult to quantify. Especially if your tape drive does hardware-based compression. The manufacturer often states that a tape cartridge will have a capacity of "X" or "2X" with compression. But that compression ratio is hugely dependent on the data that's being sent to tape and the factor of "2" that is often quoted is very conservative. I've often gotten far greater compression ratios, particularly if the disk data is fairly redundant. for example, I found Oracle database files to compress really, really well and was able to get more on tape than I would have thought possible when I added up the file sizes. Directories full of binaries or images? Not so well. Use the biggest buffer size you can get away with. Note: The st driver used to have a limit on the buffer size you could specify. I seem to recall using 65536 (128*512) and getting a decent throughput and capacity.

One tip: don't run the tar output through a compression utility if you are enabling hardware compression. It seems to slow down the tape drive's ability to put data on tape fast enough. Apparently, the hardware-based compression slows the data transfer immensely as it tries to further compress previously compressed data. The tape drive falls out of streaming mode and has to reseek the EOT before it can write again. Performance plummets big time.

HTH...

--
Rick
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
command to check whole free space yashfire007 Linux - Newbie 7 03-27-2013 03:57 AM
how to check my disk free space sanjay2004 Linux - Server 8 04-24-2010 12:09 AM
Check tape size ust Linux - Newbie 1 06-09-2009 04:09 PM
how do you check the free space mahmoud Linux - Newbie 2 01-03-2008 10:32 AM
How much free space left on a tape? bfloeagle Linux - General 0 08-07-2001 07:55 AM


All times are GMT -5. The time now is 05:03 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration