Re: [opensuse] Split command to burn DVD+R (file size)



On Thu, 18 Oct 2007, Carlos E. R. wrote:-

<snip>

Our point was that if you are only saving a single file, you do not
need to "format" the DVD, not as UDF, not as ISO, nor as anything at
all. Ie, you can burn it "raw". You simply go to k3b and tell it to
burn a dvd image file, and give "somearchive.tar.split1" as the
"image". K3b will complain that it is not an iso image, but it will
burn anyway.

If you use DVD+RW you don't need to use k3b or growisofs as tar will
write directly to the disc. Other good points are that the DVD+R
capacity is an exact multiple of 32KiB so, if the archive is split up as
it's too big for a single DVD, only the last chunk may be padded.

Also, if DVD+RW are used, you can use the --tape-length option and then
tar itself will split the archive up for you at the appropriate points:

davjam@lion:/usr/src/packages/SOURCES> dd if=/dev/zero of=blank.file count=512 bs=1M
512+0 records in
512+0 records out
536870912 bytes (537 MB) copied, 176.111 s, 3.0 MB/s
davjam@lion:/usr/src/packages/SOURCES> tar --create --verbose --file /dev/dvdrw --record-size=32768 --multi-volume ---tape-length=491520 *
blank.file
Prepare volume #2 for `/dev/hdc' and hit return:
mplayerplug-in-3.45-0.pm.2.src.rpm
davjam@lion:/usr/src/packages/SOURCES> tar --list --verbose --file /dev/dvdrw --multi-volume --tape-length=491520
-rw-r--r-- davjam/users 536870912 2007-10-18 02:42 blank.file
tar: Skipping to next header
tar: Error exit delayed from previous errors

Hmm, that "read the whole of the DVD+RW" thing strikes again :| Serves
me right for trying to use a 480MiB "tape" size on a 4.3GiB disc.

Okay, round two. This time with real data and with a "tape" length of
4590208 1KiB blocks. This size is the exact capacity of a DVD+RW, as
well as a DVD+R:

davjam@lion:/usr/src/packages/SOURCES> dd if=/dev/hda1 of=/mnt/hda1
63+0 records in
63+0 records out
32256 bytes (32 kB) copied, 0.035562 s, 907 kB/s
davjam@lion:/usr/src/packages/SOURCES> dd if=/dev/hda2 of=/mnt/hda2
54+0 records in
54+0 records out
27648 bytes (28 kB) copied, 0.014146 s, 2.0 MB/s
davjam@lion:/usr/src/packages/SOURCES> dd if=/dev/hda3 of=/mnt/hda3
74+0 records in
74+0 records out
37888 bytes (38 kB) copied, 0.019665 s, 1.9 MB/s
davjam@lion:/usr/src/packages/SOURCES> dd if=/dev/hda4 of=/mnt/hda4
512+0 records in
512+0 records out
262144 bytes (262 kB) copied, 0.139448 s, 1.9 MB/s
davjam@lion:/usr/src/packages/SOURCES> dd if=/dev/hda5 of=/mnt/hda5
196608+0 records in
196608+0 records out
100663296 bytes (101 MB) copied, 80.2105 s, 1.3 MB/s
davjam@lion:/usr/src/packages/SOURCES> dd if=/dev/hda6 of=/mnt/hda6
16384000+0 records in
16384000+0 records out
8388608000 bytes (8.4 GB) copied, 6843.26 s, 1.2 MB/s
davjam@lion:/usr/src/packages/SOURCES> ls -l /mnt
total 8298792
-rw-r--r-- 1 davjam users 32256 2007-10-18 03:02 hda1
-rw-r--r-- 1 davjam users 27648 2007-10-18 03:02 hda2
-rw-r--r-- 1 davjam users 37888 2007-10-18 03:02 hda3
-rw-r--r-- 1 davjam users 262144 2007-10-18 03:02 hda4
-rw-r--r-- 1 davjam users 100663296 2007-10-18 03:04 hda5
-rw-r--r-- 1 davjam users 8388608000 2007-10-18 04:58 hda6
drwx------ 2 root root 16384 2007-10-10 12:46 lost+found
davjam@lion:/usr/src/packages/SOURCES> pushd /mnt
/mnt /usr/src/packages/SOURCES
davjam@lion:/mnt> tar --create --verbose --file /dev/dvdrw --record-size=32768 --tape-length=4590208 --exclude=lost+found *
hda1
hda2
hda3
hda4
hda5
hda6
Prepare volume #2 for `/dev/dvdrw' and hit return:
davjam@lion:/mnt> tar --list --verbose --file /dev/dvdrw --record-size=32768 --tape-length=4590208
-rw-r--r-- davjam/users 32256 2007-10-18 03:02 hda1
-rw-r--r-- davjam/users 27648 2007-10-18 03:02 hda2
-rw-r--r-- davjam/users 37888 2007-10-18 03:02 hda3
-rw-r--r-- davjam/users 262144 2007-10-18 03:02 hda4
-rw-r--r-- davjam/users 100663296 2007-10-18 03:04 hda5
-rw-r--r-- davjam/users 8388608000 2007-10-18 04:58 hda6
Prepare volume #2 for `/dev/dvdrw' and hit return:
davjam@lion:/mnt> popd
/usr/src/packages/SOURCES
davjam@lion:/usr/src/packages/SOURCES> sudo umount /mnt
root's password:
davjam@lion:/usr/src/packages/SOURCES> sudo mkdir -p /mnt/hda1{0,3}
davjam@lion:/usr/src/packages/SOURCES> sudo mount /dev/hda10 /mnt/hda10
davjam@lion:/usr/src/packages/SOURCES> sudo mount /dev/hda13 /mnt/hda13
davjam@lion:/usr/src/packages/SOURCES> df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda9 16126920 10526232 4781488 69% /
udev 191872 116 191756 1% /dev
/dev/hda12 15600816 470744 14337592 4% /local
/dev/hda10 16126920 8469968 6837752 56% /mnt/hda10
/dev/hda13 26200828 176200 24693692 1% /mnt/hda13
davjam@lion:/usr/src/packages/SOURCES> sudo chown root.users /mnt/hda13
davjam@lion:/usr/src/packages/SOURCES> sudo chmod 775 /mnt/hda13
davjam@lion:/usr/src/packages/SOURCES> ls -l /mnt
total 8
drwxrwxr-x 3 root users 4096 2007-10-18 03:04 hda10
drwxrwxr-x 3 root users 4096 2007-10-12 12:17 hda13
davjam@lion:/usr/src/packages/SOURCES> pushd /mnt/hda13
/mnt/hda13 /usr/src/packages/SOURCES
davjam@lion:/mnt/hda13> tar --extract --verbose --file /dev/dvdrw --record-size=32768 --tape-length=4590208
hda1
hda2
hda3
hda4
hda5
hda6
Prepare volume #2 for `/dev/dvdrw' and hit return:
davjam@lion:/mnt> md5sum hda1{0,3}/*|sort
md5sum: hda10/lost+found: Permission denied
md5sum: hda13/lost+found: Permission denied
1a0e8f4574c9f48a965b1e9961c1aa24 hda10/hda2
1a0e8f4574c9f48a965b1e9961c1aa24 hda13/hda2
24aa52eed5ff2e3f534dc2b9499b0e45 hda10/hda3
24aa52eed5ff2e3f534dc2b9499b0e45 hda13/hda3
5cd61fb49d6ecc353c8f07aa7cdddaaf hda10/hda6
5cd61fb49d6ecc353c8f07aa7cdddaaf hda13/hda6
62c4f49cf4cd31b2991b0f4e61fd403b hda10/hda5
62c4f49cf4cd31b2991b0f4e61fd403b hda13/hda5
6e6278336b9081b5c7e66917bcbdb1bf hda10/hda4
6e6278336b9081b5c7e66917bcbdb1bf hda13/hda4
b3cb54252e31e7e19d317b3a9362f2db hda10/hda1
b3cb54252e31e7e19d317b3a9362f2db hda13/hda1
davjam@lion:/mnt> ls -lR
.:
total 8
drwxrwxr-x 3 root users 4096 2007-10-18 03:04 hda10
drwxrwxr-x 3 root users 4096 2007-10-18 18:03 hda13

./hda10:
total 8298792
-rw-r--r-- 1 davjam users 32256 2007-10-18 03:02 hda1
-rw-r--r-- 1 davjam users 27648 2007-10-18 03:02 hda2
-rw-r--r-- 1 davjam users 37888 2007-10-18 03:02 hda3
-rw-r--r-- 1 davjam users 262144 2007-10-18 03:02 hda4
-rw-r--r-- 1 davjam users 100663296 2007-10-18 03:04 hda5
-rw-r--r-- 1 davjam users 8388608000 2007-10-18 04:58 hda6
drwx------ 2 root root 16384 2007-10-10 12:46 lost+found
ls: cannot open directory ./hda10/lost+found: Permission denied

./hda13:
total 8298792
-rw-r--r-- 1 davjam users 32256 2007-10-18 03:02 hda1
-rw-r--r-- 1 davjam users 27648 2007-10-18 03:02 hda2
-rw-r--r-- 1 davjam users 37888 2007-10-18 03:02 hda3
-rw-r--r-- 1 davjam users 262144 2007-10-18 03:02 hda4
-rw-r--r-- 1 davjam users 100663296 2007-10-18 03:04 hda5
-rw-r--r-- 1 davjam users 8388608000 2007-10-18 04:58 hda6
drwx------ 2 root root 16384 2007-10-10 12:48 lost+found
ls: cannot open directory ./hda13/lost+found: Permission denied


Also, if you really want to make sure the archive has been written
correctly, there's always the --verify option. The restriction is that
you can't be used when you pass the --multi-volume option to tar.

If you aren't going to use DVD+RW, but use a DVD+R instead, you can
still use the same command. You'll just need to use a file somewhere
and, at each break, write that to a DVD using growisofs.

It might also be possible to use a named pipe as the output for tar and
input for growisofs but, as I haven't tried that yet, I don't know for
certain if that would work.

The advantage is that you don't waste anyspace for directory entries
and such: there are none.

The disadvantage is that the dvd will not be "mountable", of course.
Windows will think it is broken :-p

Windows seems to think lots of things are broken when they aren't, so
that doesn't come as a surprise.


Regards,
David Bolt

--
Team Acorn: http://www.distributed.net/ OGR-P2 @ 100Mnodes RC5-72 @ 15Mkeys
SUSE 10.0 32bit | SUSE 10.1 32bit | openSUSE 10.2 32bit | openSUSE 10.3 32bit
SUSE 10.0 64bit | SUSE 10.1 64bit | openSUSE 10.2 64bit |
RISC OS 3.11 | RISC OS 3.6 | TOS 4.02 | openSUSE 10.3 PPC
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx



Relevant Pages

  • Re: Whats The Limit
    ... I sometimes just skip making an iso containing only ... I read them back with something like ``tar -xvzf /dev/cdrom'' ... with a DVD as well. ... tar can create multi-volume archives. ...
    (Fedora)
  • Re: Whats The Limit
    ... Joe Smith wrote: ... I sometimes just skip making an iso containing only ... I read them back with something like ``tar -xvzf /dev/cdrom'' ... with a DVD as well. ...
    (Fedora)
  • Re: Whats The Limit
    ... There's no law that says the data on a CD or DVD has to be in a ... I sometimes just skip making an iso containing only ... I read them back with something like ``tar -xvzf /dev/cdrom'' ... I write on each disk the command I used to make it. ...
    (Fedora)
  • Re: how to create a DVD backup filesystem?
    ... Using tar onto acd may not work, but utilizing atapicam, it could ... put it n discs, disks, tapes or even hard disks or USB sticks. ... directly onto a DVD, but it makes sense. ... Gary Kline kline@xxxxxxxxxxx http://www.thought.org Public Service Unix ...
    (freebsd-questions)
  • Re: Safe Home backups
    ... I have discovered that these backups are not "Restorable." ... run tar -vxzf, the program cancels with a unrecoverable error. ... Bad DVD? ... created a 10 gig file. ...
    (linux.redhat)