Add an option to split image on multiple files

Bug #205656 reported by Steven Chong
4
Affects Status Importance Assigned to Milestone
partimage-ng
In Progress
Undecided
Dmitry Ivanov

Bug Description

Hi,

I think there will be a good idea if there is an option to specifie the max size befor split the file.
That can be usefull for create big image on some limited filesystem, like an USB drive formated as FAT32 that cannot handle file bigger than 4G.

Revision history for this message
Dmitry Ivanov (vonami) wrote :

Working on this.

Changed in partimage-ng:
assignee: nobody → vonami
status: New → In Progress
Revision history for this message
Worf (worf-sbox) wrote :

partimage-ng now supports multiple files.
actually it always did:

partimage-ng save /dev/sdb1 stdout | gzip | split -d --bytes=650M - image.

this will create image files of 650MB, starting with names image.00 image.01, ...

to restore, use:

cat image.* | gunzip | partimage-ng restore stdin /dev/sdb1

Revision history for this message
Damiano Venturin (damko) wrote :

good job Worf!

Revision history for this message
Gene Czarcinski (gene-czarc) wrote :

The use of "split" sort-of works.

1. What you show should work on any real system.

2. busybox's split command is somewhat limited so this will not really work user some of the rescue modes such as Fedora 9's rescue mode on the installation DVD/CDROM.

3. You can get this work on rescue mode if you pipe the output to another system via ssh such as the following:

First, on VT2: nc -l -p 1234 | ssh <email address hidden> 'split -d --bytes=650m - /srv/data/image.'

Then, on VT1: partimage-ng save /dev/sdb stdout | gzip -c | nc 127.0.0.1:1234

Restore is the reverse.

4. If the goal is to split the output so that it can be put on CDROMs, (3) above will work but you could also do the split after the save was complete. If not putting it on CDROMs, why bother splitting?

5. If you want to read from the CDROMs and pass the data to partimage-ng, I believe you will need another program (which does not exist yet to my knowledge). The "new" program would read from a CDROM and pass the data to stdout. When an end was reached on a CDROM, the user would be prompted to mount another CDROM and this new program out continue passing data to partimage-ng via stdout.

It would be nice if this "new program" existed but I have never heard of one [which does not mean that it does not exist].

If this "new program" did exist (or was developed), this would let partimage-ng continue to "keep it simple" while doing what it does best.

One thing that has impressed me about partimage-ng as compared with the old partimage is that is does keep things simple and most of the "extra" functionality in the old partimage can be implemented outside of partimage-ng.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.