LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 01-21-2020, 05:47 PM   #46
wayne1937
Member
 
Registered: Dec 2019
Location: United States
Posts: 148

Original Poster
Rep: Reputation: Disabled
Talking Midia Check


> When this program run ended, you may checkread the DVD:
> xorriso -for_backup -indev /dev/sr0 -check_media --
> which in the end should report something like:
...
>Media checks : lba , size , quality
>Media region : 0 , 1412052 , + good
>Media region : 1412052 , 886444 , 0 untested
>MD5 checks : lba , size , result
>MD5 tag range: 32 , 1412051 , + md5_match

////////////////////////////////////////////////////////////////////////////////


Output for media check.


[Delano@Gateway-CentOS-6 ~]$ xorriso -for_backup -indev /dev/sr0 -check_media --
xorriso 1.5.2 : RockRidge filesystem manipulator, libburnia project.

xorriso : NOTE : Loading ISO image tree from LBA 0
xorriso : UPDATE : 1 nodes read in 1 seconds
Drive current: -indev '/dev/sr0'
Media current: DVD-RW restricted overwrite
Media status : is written , is appendable
Media summary: 1 session, 28 data blocks, 56.0k data, 4488m free
Volume id : 'ISOIMAGE'
xorriso : UPDATE : 32 blocks read in 2 seconds , 0.0xD
xorriso : UPDATE : Found matching MD5 superblock tag: start=32 size=18
xorriso : UPDATE : Found matching MD5 tree tag: start=32 size=23
xorriso : UPDATE : Found matching MD5 session tag: start=32 size=27
xorriso : UPDATE : 60 blocks read in 2 seconds = 0.1xD
Media checks : lba , size , quality
Media region : 0 , 60 , + good
Media region : 60 , 2297828 , 0 untested
MD5 checks : lba , size , result
MD5 tag range: 32 , 27 , + md5_match

Really feel good about this. It was late last night when looking at the provided code it dawn upon me that what I was seeing i.e. dir_on_disk="$HOME"/files_for_dvd is an assignment then I was back in python.

Last edited by wayne1937; 01-21-2020 at 05:48 PM.
 
Old 01-22-2020, 02:41 AM   #47
scdbackup
Member
 
Registered: Oct 2013
Posts: 158

Rep: Reputation: Disabled
Hi,

yeah, this "$Delano" looked wrong. (Unless you have set
Code:
 Delano="$HOME"
)
Without such preparation, "$Delano" is evaluated by the shell as empty
text. I.e. you effectively told xorriso
Code:
-map /files /files1
and the path "/files" does not exist on your hard disk.

"HOME" is a variable which is predefined by the command shell:
Code:
$ echo "$HOME"
/home/thomas
> xorriso : UPDATE : Writing: 192s 100.0% fifo 0% buf 0% 0.0xD
> xorriso : UPDATE : Thank you for being patient. Working since 20 seconds.
> ISO image produced: 28 sectors
> Written to medium : 192 sectors at LBA 32
> Writing to '/dev/sr0' completed successfully.

That's a very small burn job. 28 blocks of payload, 150 blocks of padding,
rounded up to full multiples of 16 = 192.

The start block 32 lets room for a main superblock, which will direct
readers to the root directory of the youngest session. That's a preparation
for multi-session which xorriso does on formatted media. On a sequential
medium the start LBA would be 0, because those media maintain their own
table of content which marks the written sessions.

You may now add more sessions to the medium. Just use -dev instead of
-outdev in order to let xorriso read the previous directory tree and learn
the next writable block address. Do not use -blank "as_needed" unless you
want to invalidate the previous sessions and start a new series of sessions.

----------------------------------------------------------------------

The most elaborate way of doing multi-session is shown as example in
man xorriso. This is how i make daily incremental backups:
Code:
xorriso \
  -abort_on FATAL \
  -for_backup -disk_dev_ino on \
  -assert_volid 'PROJECTS_MAIL_*' FATAL \
  -dev /dev/sr0 \
  -volid PROJECTS_MAIL_"$(date '+%Y_%m_%d_%H%M%S')" \
  -not_leaf '*.o' -not_leaf '*.swp' \
  -update_r /home/thomas/projects /projects \
  -update_r /home/thomas/personal_mail /personal_mail \
  -commit -toc -check_md5 FAILURE -- -eject all
-abort_on "FATAL" sets a high limit for program abort. Only events of
severity "FATAL" will cause xorriso to abort.

-for_backup enables recording of checksums and possibly present file
attributes like ACL.

-disk_dev_ino "on" speeds up the comparison of disk state and backup state.
It depends on stable device and inode numbers on hard disk. (If each backup
update copies all files, then those numbers are not stable enough. Omit
the command -disk_dev_ino in this case. Comparison will just be slower then.)

-assert_volid shall recognize if you have inserted the wrong DVD. It checks
whether the found Volume Id looks like the one which will be set by the
-volid command. (It also accepts blank DVD without any Volume Id.)

-dev reads the existing filesystem info and opens the drive for writing.

-volid PROJECTS_MAIL_"$(date '+%Y_%m_%d_%H%M%S')" sets the Volume Id to
a text like PROJECTS_MAIL_2020_01_22_092016. Here the shell calls program
"date" with formatted output to generate the timestamp "2020_01_22_092016".

-not_leaf '*.o' excludes files which are produced by the C compiler and
used by the linker to produce executable programs. They get rebuilt often
and are of no permanent use.
-not_leaf '*.swp' excludes the swapfiles of the text editor "vim". They
exist only as long as vim is operating on the file with the same name but
without ".swp". They should not be backuped, because vim believes to see
a crash site when it encounters them at start of a text editinng session.

-update_r compares a directory tree on hard disk with a tree in the ISO.
It performs the necessary xorriso actions which make the ISO tree a true
copy of the tree on the hard disk. I.e. files get added to the ISO, deleted
from it, or get their file properties changed.

-commit starts the burn run.

-toc afterwards shows the new session list.

-check_md5 "FAILURE" "--" does a checkread run of the newest session, looking
for i/o errors or for mismatches of the recorded MD5 checksums.

-eject "all" finally lets the tray move out. (If not FATAL error occured
before which would have aborted the program run.)

I run this daily, until the medium is full. When full, i put it on the
shelf for a few months and use a blank medium to start a new session
series. When i want to re-use such full media, i run xorriso with command
-blank "as_needed".

My backup-worthy storage area has about 4.5 GB.
Normally i use BD-RE media for backups, because they take up to 25 GB.
One of my backup strains is on DVD+RW, though, using zisofs compression
which reduces the full backup size to about 2.5 GB. So i can add about
20 sessions before the medium is full.


Have a nice day

Thomas
 
1 members found this post helpful.
Old 01-22-2020, 12:06 PM   #48
wayne1937
Member
 
Registered: Dec 2019
Location: United States
Posts: 148

Original Poster
Rep: Reputation: Disabled
Thanks again Thomas, and as always your teaching is greatly appreciated. Finally, I'm beginning to believe I may understand xorriso a bit!

cheers

wayne
 
Old 01-23-2020, 12:17 AM   #49
wayne1937
Member
 
Registered: Dec 2019
Location: United States
Posts: 148

Original Poster
Rep: Reputation: Disabled
Hello! Thomas

Took plenty of time to read and study your last post, and I found it immensely interesting and educational; thank for your time and effort in providing it.

I understand why you would need a sophisticated back-up system with large storage capacity for your work. Don't know if I'll ever reach that level.

I found the road map and explanation of each step you presented interesting and valuable to my understanding in how to apply xorriso to media use and data storage.

> "HOME" is a variable which is predefined by the command shell:
> $ echo "$HOME"
> /home/thomas

I was unaware of this. So I replaced "$HOME" with "home/Delano" and that's when xorriso burned the iso. I did the $ echo "$HOME" >> /home/Delano. Now I know :-)

cheers
 
Old 01-23-2020, 02:59 PM   #50
wayne1937
Member
 
Registered: Dec 2019
Location: United States
Posts: 148

Original Poster
Rep: Reputation: Disabled
Hello! Thomas

Wondering, does your xorriso code burn multiple files in one burn session ?

dir_on_disk="$HOME"/files1, files2, files3, ..., ..., ..., etc

dir_in_iso=files11, files22, files33, ..., ..., ..., etc

I suppose I'm asking - can files be bundled and processed within one burn session.

$ xorriso -for_backup -outdev /dev/sr0 -blank as_needed -map "$dir_on_disk" "$dir_in_iso"

cheers

Wayne
 
Old 01-24-2020, 02:55 AM   #51
scdbackup
Member
 
Registered: Oct 2013
Posts: 158

Rep: Reputation: Disabled
Hi,

there are several commands to submit files to xorriso. Two of them would be
able to express what you desire.

You may use multiple -map commands, each with a disk path and an ISO path.
Code:
-map "$HOME"/files1 /files11 \
-map "$HOME"/files2 /files22 \
...and.so.on... \
(The "\" characters at the end of the text lines tells the shell that its
command line is not finished but continues in the next text line. I use them
here to avoid super long text lines and to show one command per text line.)

Command -add takes a list of origin paths has to be ended by word "--".
Code:
-cdx "$HOME" \
-cdi / \
-add files1 files2 ...and.so.on... -- \
By -cdx and -cdi you can chose directory paths for hard disk and ISO,
and then give only plain file names. The files get picked from -cdx
and then inserted into the ISO under the -cdi path.

Above proposal does not enable you to pick individual target paths for the
files in the -add list. But of course you could give another group of
-cdx, -cdi, and -add to define a different mapping from hard disk to ISO.

There is also the old mkisofs concept of "pathspecs". They consist of a
target path, a "=" character, and an origin path:
Code:
-pathspecs on \
-add /files11="$HOME"/files1 /files22="$HOME"/files2 ...and.so.on... -- \
Pathspecs become complicated if the file paths contain "=" or "\"
characters. So i would propose a sequence of -map commands as the
no-fuzz approach.

Have a nice day

Thomas
 
Old 01-24-2020, 11:13 AM   #52
wayne1937
Member
 
Registered: Dec 2019
Location: United States
Posts: 148

Original Poster
Rep: Reputation: Disabled
cheers! thomas:

wonderful! just what I asked for, more power! xorisso the king maker :-)

more cheers !

wayne

p.s. thinking i will not use capitalization in the future ?
 
Old 02-03-2020, 03:07 PM   #53
wayne1937
Member
 
Registered: Dec 2019
Location: United States
Posts: 148

Original Poster
Rep: Reputation: Disabled
Thomas

delano@delano-p6653w:~$ dir_on_disk="$HOME"/files_for_dvd
delano@delano-p6653w:~$ dir_in_iso=/files1
delano@delano-p6653w:~$ xorriso -for_backup -outdev /dev/sr0 -blank as_needed -map "$dir_on_disk" "$dir_in_iso"
xorriso 1.4.8 : RockRidge filesystem manipulator, libburnia project.

Drive current: -outdev '/dev/sr0'
Media current: DVD-RW restricted overwrite
Media status : is blank
Media summary: 0 sessions, 0 data blocks, 0 data, 4488m free
xorriso : NOTE : -blank as_needed: no need for action detected
xorriso : FAILURE : Cannot determine attributes of source file '/home/delano/files_for_dvd' : No such file or directory
xorriso : aborting : -abort_on 'FAILURE' encountered 'FAILURE'
delano@delano-p6653w:~$

why am I getting this failure! files is in the home directory. why cannot xorriso find it?

wayne

Last edited by wayne1937; 02-03-2020 at 03:17 PM.
 
Old 02-03-2020, 03:27 PM   #54
scdbackup
Member
 
Registered: Oct 2013
Posts: 158

Rep: Reputation: Disabled
Hi,

> xorriso : FAILURE : Cannot determine attributes of source file '/home/delano/files_for_dvd' : No such file or directory
> files is in the home directory. why cannot xorriso find it?

Well, xorriso asks the operating system and the operating system says
"No such file or directory" (by errno bearing value ENOENT after call
lstat(2)).

What do you get from this command
Code:
ls -ld /home/delano/files_for_dvd
Have a nice day

Thomas
 
Old 02-03-2020, 04:08 PM   #55
wayne1937
Member
 
Registered: Dec 2019
Location: United States
Posts: 148

Original Poster
Rep: Reputation: Disabled
delano@delano-p6653w:~$ ls -ld /home/delano/files_for_dvd
ls: cannot access '/home/delano/files_for_dvd': No such file or directory
delano@delano-p6653w:~$
 
Old 02-03-2020, 04:11 PM   #56
scdbackup
Member
 
Registered: Oct 2013
Posts: 158

Rep: Reputation: Disabled
Hi,

so the prepared files are not in /home/delano/files_for_dvd.

You wrote:
> files is in the home directory.

Did you prepare the files for the DVD in /home/delano/files ?

Have a nice day

Thomas
 
Old 02-03-2020, 04:19 PM   #57
wayne1937
Member
 
Registered: Dec 2019
Location: United States
Posts: 148

Original Poster
Rep: Reputation: Disabled
In the "delano" directory when vi "delano" evoked. then verbiage added. "files" then save. "files" then appeared in "delano" directory as "files".
 
Old 02-03-2020, 04:22 PM   #58
wayne1937
Member
 
Registered: Dec 2019
Location: United States
Posts: 148

Original Poster
Rep: Reputation: Disabled
delano@delano-p6653w:~$ pwd
/home/delano
delano@delano-p6653w:~$
 
Old 02-03-2020, 05:01 PM   #59
wayne1937
Member
 
Registered: Dec 2019
Location: United States
Posts: 148

Original Poster
Rep: Reputation: Disabled
>>> in the "delano" directory when vi "delano" evoked. then verbiage added. "files" then save. "files" then appeared in "delano" directory as "files".

this should read:

n the "delano" directory when vi "files" evoked. then verbiage added. "files" then save. "files" then appeared in "delano" directory as "files".
 
Old 02-04-2020, 02:11 AM   #60
scdbackup
Member
 
Registered: Oct 2013
Posts: 158

Rep: Reputation: Disabled
Hi,

so you want to burn the file /home/delano/files to the ISO where it
shall have the name /files1 ?
That would be:
Code:
dir_on_disk=/home/delano/files
dir_in_iso=/files1
xorriso -for_backup -outdev /dev/sr0 -blank as_needed -map "$dir_on_disk" "$dir_in_iso"
Actually "dir_..." is a bit misleading variable name, because in this
case you deal with a data file, not with a directory full of files and
sub directories.
In the end the proposed command is the same as:
Code:
xorriso -for_backup -outdev /dev/sr0 -blank as_needed -map /home/delano/files /files1
Have a nice day

Thomas
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] XFburn, Slackware 13 64bit, "error while loading shared libraries: libburn.so.4" fearfactory Linux - Software 1 05-16-2010 08:30 PM
xfburn keeps crashing richard.donavan Linux - Software 1 11-27-2009 04:57 PM
[SOLVED] xfburn keeps crashing on slackware 13 64 hoodooman Slackware 2 11-13-2009 12:55 PM
Slackbuild XFburn - What order do I install related files 12.1 NightSky Slackware 7 10-14-2009 11:11 PM
XFburn - slow start when burning audio cd samac Slackware 2 09-28-2009 05:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:26 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration