Re: CentOS 7: restore fails (Bruno Cornec)

Simon Magrin <[email protected]>
Newsgroups gmane.linux.mondo.devel
Message-ID <[email protected]>
"Keep using the -z option, especially if you use SELinux ! Without it,
your system won't allow you to log in after restore."

This issue has caught me out before. A workaround is to;

  - Change SELinux to 'permissive' by mounting the newly restored volume 
and editing /etc/selinux/coonfig or

  - booting into Single mode, log in as root run 'fixfiles -relabel', 
change change back to 'enforcing' and reboot.

---
Regards

SIMON MAGRIN

On 22/12/2016 20:27, [email protected] wrote:
> Send Mondo-devel mailing list submissions to
> 	[email protected]
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	https://lists.sourceforge.net/lists/listinfo/mondo-devel
> or, via email, send a message with subject or body 'help' to
> 	[email protected]
> 
> You can reach the person managing the list at
> 	[email protected]
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Mondo-devel digest..."
> 
> 
> Today's Topics:
> 
>    1. Re: CentOS 7: restore fails (Bruno Cornec)
>    2. I found why there's no BLK_START_OF_TAPE or
>       BLK_START_OF_BACKUP headers in the tape stream (David C. 
> Partridge)
>    3. More information on failed tape verify/restore
>       (David C. Partridge)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Wed, 21 Dec 2016 20:19:57 +0100
> From: Bruno Cornec <[email protected]>
> Subject: Re: [Mondo-devel] CentOS 7: restore fails
> To: Mondo mailing list <[email protected]>
> Message-ID: <[email protected]>
> Content-Type: text/plain; charset=iso-8859-7; format=flowed
> 
> Hello Nikolaos,
> 
> Nikolaos Milas said on Wed, Dec 21, 2016 at 09:02:27PM +0200:
>> In this VM, I had already installed the attr package, but
>> nevertheless, I tried to archive without the -z option; yet the backup
>> failed every time.
> 
> Keep using the -z option, especially if you use SELinux ! Without it,
> your system won't allow you to log in after restore.
> 
>>    Mindi failed to create your boot+data disks.
>>    Fatal error... Failed to generate boot+data disks
>>    ---FATALERROR--- Failed to generate boot+data disks
>>    If you require technical support, please contact the mailing list.
>>    See http://www.mondorescue.org for details.
>>    The list's members can help you, if you attach that file to your
>> e-mail.
>>    Log file: /var/log/mondoarchive.log
> 
> I have reproduced errors on my side while I'm working on solving the
> reported issues on the ML since yesterday. So I'll give you a new
> version to try lter today.
> 
>> cp: error writing 
>> ?/mondotmp/mondo.tmp.jwPtaO/mountpoint.24111//usr/lib/firmware/intel-ucode/06-09-05?: 
>> No space left on device
>> cp: failed to extend 
>> ?/mondotmp/mondo.tmp.jwPtaO/mountpoint.24111//usr/lib/firmware/intel-ucode/06-09-05?: 
>> No space left on device
> 
> That's probably however the error you have. You need probably to
> increase EXTRA_SPACE in /etc/mindi/mindi.conf. Put 300000 to see.
> 
> Bruno.
> --
> Open Source Profession, WW Linux Community Lead     
> http://www.hpintelco.net
> HPE EMEA EG FLOSS Technology Strategist 
> http://www.hpe.com/engage/opensource
> FLOSS projects:    http://mondorescue.org         
> http://project-builder.org
> Musique ancienne?   http://www.musique-ancienne.org  
> http://www.medieval.org
> 
> 
> 
> ------------------------------
> 
> Message: 2
> Date: Wed, 21 Dec 2016 19:50:29 -0000
> From: "David C. Partridge" <[email protected]>
> Subject: [Mondo-devel] I found why there's no BLK_START_OF_TAPE or
> 	BLK_START_OF_BACKUP headers in the tape stream
> To: "'Mondo mailing list'" <[email protected]>
> Message-ID: <[email protected]>
> Content-Type: text/plain;	charset="US-ASCII"
> 
> In libmondo-archive.c at line 1183
> 
> 	if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) {
> 		write_header_block_to_stream((off_t)0, "start-of-tape",
> BLK_START_OF_TAPE);
> 		write_header_block_to_stream((off_t)0, "start-of-backup",
> BLK_START_OF_BACKUP);
> 	}
> 
> but in write_header_block_to_stream in libmondo-stream.c at line 1764 
> it
> says:
> 
> 	if (length_of_incoming_file <= 0) {
> 		return(1);
> 	}
> 
> so neither of these header blocks are written to the tape.
> 
> PS did you get my post with verify.rar attached?  It got held for 
> moderation
> with the message:
> 
> 	Message body is too big: 413074 bytes with a limit of 400 KB
> 
> PPS lots of places I see code like
> 	for (i = 0; i < (int) TAPE_BLOCK_SIZE; i++) {
> 		tempblock[i] = 0;
> 	}
> I'm curious what you have against memset()?
> 
> Dave
> 
> 
> 
> 
> ------------------------------
> 
> Message: 3
> Date: Wed, 21 Dec 2016 11:29:59 -0000
> From: "David C. Partridge" <[email protected]>
> Subject: [Mondo-devel] More information on failed tape verify/restore
> To: "'Mondo mailing list'" <[email protected]>
> Message-ID: <[email protected]>
> Content-Type: text/plain; charset="us-ascii"
> 
> I modified readh_header_block_from_stream in libmondo-stream.c to
> 
> 1) dump out the contents of each buffer read from the tape.
> 2) to set retval to 1 if it thinks it sees a bad header as this might 
> stop
> it heading off into "la-la" land .
> 
> Thus:
> 
> read_header_block_from_stream(long long *plen, char *filename,
> 							  int
> *pcontrol_char)
> {
> 
> 	/*@ buffers ***************************************************** */
> 	char *tempblock;
> 
> 	/*@ int ********************************************************* */
> 	int i, retval = 0;
> 
> 	/*@ end vars *************************************************** */
> 
> 	tempblock = (char *) malloc((size_t) TAPE_BLOCK_SIZE);
> 
> 	for (i = 0; i < (int) TAPE_BLOCK_SIZE; i++) {
> 		tempblock[i] = 0;
> 	}
> 	while (!(*pcontrol_char = tempblock[7000])) {
> 		g_tape_posK += fread(tempblock, 1, (size_t) TAPE_BLOCK_SIZE,
> g_tape_stream) / 1024;
> 		print_hex_dump_bytes(" ", DUMP_PREFIX_OFFSET, tempblock,
> TAPE_BLOCK_SIZE);
> 	}
> 	memcpy((char *) plen, tempblock + 7001, sizeof(long long));
> 	if (strcmp(tempblock + 6000 + *pcontrol_char, STR_HEADER)) {
> 		log_it("Bad header block at %ld K", (long) g_tape_posK);
> 		retval = 1;
> 	}
> 
> I attach the log of stdout obtained by doing:
> 
> ./mondoarchive -b65536 -Vt -d/dev/st0 | tee ./verify.log
> 
> showing the content of each 128k buffer.
> 
> PS I don't quite "get" what that code is doing with the 7000 byte/6000 
> byte
> offsets etc..  Please could you clarify for the slow on the uptake - I 
> would
> have expected to be looking at the start of each buffer for headers
> 
> Are those 128k block that are mostly nulls the header blocks?
> 
> Thanks
> Dave
> 
> 
> 
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: verify.rar
> Type: application/octet-stream
> Size: 304576 bytes
> Desc: not available
> 
> ------------------------------
> 
> ------------------------------------------------------------------------------
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today.http://sdm.link/intel
> 
> ------------------------------
> 
> _______________________________________________
> Mondo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mondo-devel
> 
> 
> End of Mondo-devel Digest, Vol 127, Issue 20
> ********************************************

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.