Re: [CentOS] Recover from an fsck failure

2020-05-28 Thread Robert Nichols

On 5/28/20 1:33 PM, James B. Byrne via CentOS wrote:

/dev/mapper/vg_voinet01-lv_log
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2 filesystem
(and not swap or ufs or something else), then the superblock is corrupt, and
you might try running e2fsck with an alternate superblock:
   e2fsk -b 8193 


What output do you get from:

file -s /dev/mapper/vg_voinet01-lv_log
lsblk -f /dev/mapper/vg_voinet01-lv_log

--
Bob Nichols "NOSPAM" is really part of my email address.
Do NOT delete it.

___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Recover from an fsck failure

2020-05-28 Thread Pete Biggs


> 
> I ran mke2fs to locate the backup superblocks:
> 
> mke2fs -n /dev/mapper/vg_voinet01-lv_log

That will only tell you what mke2fs would do on that machine. I don't
know if it will be the same on every machine.  You should probably run 

 dumpe2fs /dev/mapper/vg_voinet01-lv_log | grep superblock

If that doesn't work, then I suspect it's not recoverable using fsck. 
If you are sure that it is an ext2/3/4 filesystem on there, then you
can try using something like TestDisk to scan for partitions.  It
should be in epel.

P.


___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


[CentOS] Recover from an fsck failure

2020-05-28 Thread James B. Byrne via CentOS
This is CentOS-6x.

I have cloned the HDD of a CentOS-6 system.  I booted a host with that drive
and received the following error:

checking filesystems

/dev/mapper/vg_voinet01-lv_root: clean, 128491/4096000 files, 1554114/16304000
blocks

/dev/sda1: clean, 47/120016 files, 80115/512000 blocks

/dev/mapper/vg_voinet01-lv_home: clean, 7429/204800 files, 90039/819200 blocks

/dev/mapper/vg_voinet01-LogVol04: clean, 770219/2048 files,
34881086/8102000 blocks

fsck.ext4: Bad magic number in super-block while trying to open
/dev/mapper/vg_voinet01-lv_log
/dev/mapper/vg_voinet01-lv_log
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2 filesystem
(and not swap or ufs or something else), then the superblock is corrupt, and
you might try running e2fsck with an alternate superblock:
  e2fsk -b 8193 

/dev/mapper/vg_voinet-lv_spool: clean, 372/614400 files, 171186/2457600 blocks

*** An error occurred during the file system check.
*** Dropping you to a shell; the system will reboot
*** when you leave the shell.
Give root password for maintenance
(or type Control-D to continue):


I ran mke2fs to locate the backup superblocks:

mke2fs -n /dev/mapper/vg_voinet01-lv_log
. . .
Superblock backups stored on blocks:
  32768, 90304,  163840, 229376, 294912, 819200, 884736, 1605632

and ran:

e2fsck -b 32768 /dev/mapper/vg_voinet01-lv_log
The superblock could not be read or does not describe a correct ext2

The same thing happened for the next backup superblock addrees.  And all the
rest reported an invalid argument error from e2fsck.

Is this recoverable?  How?

-- 
***  e-Mail is NOT a SECURE channel  ***
Do NOT transmit sensitive data via e-Mail
 Do NOT open attachments nor follow links sent by e-Mail

James B. Byrnemailto:byrn...@harte-lyne.ca
Harte & Lyne Limited  http://www.harte-lyne.ca
9 Brockley Drive  vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada  L8E 3C3

___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] xinetd custom service - perl - remote address

2020-05-28 Thread Gary Stainburn
On Thursday 28 May 2020 18:12:55 Tony Mountifield wrote:
> In article <202005281646.34790.gary.stainb...@ringways.co.uk>,
> Works for me. Here are my details:
> 
Thanks for this Tony.  This is exactly what I had expected to happen.  I 
subsitiuted your server for mine and got exactly the same results.

The problem was not my server, but the client (Powershell on Win10) losing half 
of the data I returned.
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] xinetd custom service - perl - remote address

2020-05-28 Thread Tony Mountifield
In article <202005281646.34790.gary.stainb...@ringways.co.uk>,
Gary Stainburn  wrote:
> Hi all,
> 
> I can't believe that I can't find the answer to this one.  I have a perl 
> script which is called by xinetd.
> 
> I want that perl script to be able to detect the remote IP address of the 
> caller.
> 
> I presumed that it would be an environment variable but I could be wrong.  
> I've found reference to the ENV and PASSENV
> arguments for xinetd.conf but no examples, and no indication of what 
> auguments to use.
> 
> In my script I have the following code:
> 
> foreach (keys %ENV) { print "$_=$ENV{$_}\n";}
> 
> 
> but the only line I get back is:
> 
> XINETD_LANG=en_US

Works for me. Here are my details:

1. /usr/local/bin/args:

#!/usr/bin/perl

$i=1;
while(defined($_ = shift)) {
printf "ARGV[%d]=\"%s\"\n",$i++,$_;
}
foreach $env (keys %ENV) {
printf "ENV{%s}=\"%s\"\n",$env,$ENV{$env};
}

2. /etc/xinetd.d/args:

service args
{
disable = no
port = 54321
type = UNLISTED
socket_type = stream
wait= no
user= root
server  = /usr/local/bin/args
server_args = --test
log_on_failure  += USERID
}

3. Results of telnet 127.0.0.1 54321:

# telnet 127.0.0.1 54321
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
ARGV[1]="--test"
ENV{CONSOLE}="/dev/console"
ENV{PREVLEVEL}="N"
ENV{SELINUX_INIT}="YES"
ENV{LC_COLLATE}="en_US"
ENV{RUNLEVEL}="3"
ENV{LC_ALL}="en_US"
ENV{previous}="N"
ENV{LC_NUMERIC}="en_US"
ENV{PWD}="/"
ENV{LC_TIME}="en_US"
ENV{LANG}="en_US"
ENV{LC_MESSAGES}="en_US"
ENV{runlevel}="3"
ENV{INIT_VERSION}="sysvinit-2.86"
ENV{SHLVL}="3"
ENV{LC_MONETARY}="en_US"
ENV{_}="/usr/sbin/xinetd"
ENV{PATH}="/sbin:/usr/sbin:/bin:/usr/bin"
ENV{vga}="773"
ENV{REMOTE_HOST}="127.0.0.1"
ENV{TERM}="linux"
Connection closed by foreign host.

Notice the value of ENV{REMOTE_HOST}

Cheers
Tony

-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] xinetd custom service - perl - remote address

2020-05-28 Thread Kenneth Porter

On 5/28/2020 8:55 AM, Jonathan Billings wrote:

I don't believe that xinetd tells the underlying processes anything
about IPs, since xinetd handles the network connection and as far as
the process is concerned, it's just filehandles.


Isn't the filehandle just a socket? So can't you use Perl's socket API 
to recover the connection information? So the next problem is to find 
something that wraps an existing filehandle in a Perl socket object.



___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] xinetd custom service - perl - remote address

2020-05-28 Thread Simon Matter via CentOS
> Hi all,
>
> I can't believe that I can't find the answer to this one.  I have a perl
> script which is called by xinetd.
>
> I want that perl script to be able to detect the remote IP address of the
> caller.
>
> I presumed that it would be an environment variable but I could be wrong.
> I've found reference to the ENV and PASSENV arguments for xinetd.conf but
> no examples, and no indication of what auguments to use.
>
> In my script I have the following code:
>
> foreach (keys %ENV) { print "$_=$ENV{$_}\n";}
>
>
> but the only line I get back is:

The variable you may want is REMOTE_HOST, at least that's what I see on a
host of mine.

Regards,
Simon

___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] xinetd custom service - perl - remote address

2020-05-28 Thread Jonathan Billings
On Thu, May 28, 2020 at 04:46:34PM +0100, Gary Stainburn wrote:
>
> Hi all,
> 
> I can't believe that I can't find the answer to this one.  I have a
> perl script which is called by xinetd. 
> 
> I want that perl script to be able to detect the remote IP address
> of the caller. 
> 
> I presumed that it would be an environment variable but I could be
> wrong.  I've found reference to the ENV and PASSENV arguments for
> xinetd.conf but no examples, and no indication of what auguments to
> use. 
> 
> In my script I have the following code:
> 
> foreach (keys %ENV) { print "$_=$ENV{$_}\n";}
> 
> 
> but the only line I get back is:
> 
> XINETD_LANG=en_US

I don't believe that xinetd tells the underlying processes anything
about IPs, since xinetd handles the network connection and as far as
the process is concerned, it's just filehandles.  

-- 
Jonathan Billings 
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


[CentOS] xinetd custom service - perl - remote address

2020-05-28 Thread Gary Stainburn
Hi all,

I can't believe that I can't find the answer to this one.  I have a perl script 
which is called by xinetd.

I want that perl script to be able to detect the remote IP address of the 
caller.

I presumed that it would be an environment variable but I could be wrong.  I've 
found reference to the ENV and PASSENV arguments for xinetd.conf but no 
examples, and no indication of what auguments to use.

In my script I have the following code:

foreach (keys %ENV) { print "$_=$ENV{$_}\n";}


but the only line I get back is:

XINETD_LANG=en_US
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS-docs] requesting edit/create page rights for wiki.centos.org/contribute

2020-05-28 Thread Akemi Yagi
On Thu, May 28, 2020 at 3:00 AM Tomas Tomecek  wrote:

> Akemi, all is good now: I have the account in caps and have access to
> the Contribute tree of pages and my personal page.
>
> Thank you very much for your help and patience! I wish everyone was so
> nice and welcoming as yourself in this world.
>
>
> Tomas
>
> On Wed, May 27, 2020 at 10:51 AM Akemi Yagi  wrote:
> >
> > On Wed, May 27, 2020 at 12:55 AM Tomas Tomecek 
> wrote:
> >>
> >> Hi Akemi, thank you so much for your help.
> >>
> >> So, the case sensitivity bit me again: my actual account name is all
> >> lower case: https://wiki.centos.org/tomastomecek (b/c that's also my
> >> FAS account name)
> >>
> >> I guess I can try creating an account with initials in caps or I'd
> >> need the perms for my lower case account. Don't have a preference.
> >>
> >> I just read my original email and realized that I didn't mention the
> >> account name in there - my apologies.
> >>
> >>
> >> Thank you!
> >> Tomas
> >>
> >> On Tue, May 26, 2020 at 4:56 PM Akemi Yagi  wrote:
> >> >
> >> > On Tue, May 26, 2020 at 6:27 AM Tomas Tomecek 
> wrote:
> >> >>
> >> >> Thanks, Akemi.
> >> >>
> >> >> I still need the permissions though: "You are not allowed to edit
> this
> >> >> page.", the same holds for my personal page.
> >> >>
> >> >> I also cannot find precise documentation how to contribute to the
> wiki
> >> >> itself: I can see on this ML that git diffs of changes are being
> >> >> posted - should I open a PR to some repo or edit the wiki page
> >> >> directly?
> >> >>
> >> >>
> >> >> Thank you,
> >> >> Tomas
> >> >>
> >> >> On Mon, May 25, 2020 at 5:30 PM Akemi Yagi  wrote:
> >> >> >
> >> >> > On Mon, May 25, 2020 at 6:19 AM Tomas Tomecek 
> wrote:
> >> >> >>
> >> >> >> Howdy,
> >> >> >>
> >> >> >> as you already know from my intro email, I'm working on CentOS
> Stream.
> >> >> >> I'd love to start publishing docs to wiki and therefore need edit
> >> >> >> access for the wiki.centos.org/contribute tree: could you grant
> it to
> >> >> >> me, please?
> >> >> >>
> >> >> >> My plan is to create a new document for it:
> >> >> >> wiki.centos.org/contribute/CentOSStream and then link to it from
> the
> >> >> >> contribute document - does that sound right?
> >> >> >>
> >> >> >>
> >> >> >> Thanks!
> >> >> >>
> >> >> >> Tomas
> >> >> >
> >> >> >
> >> >> > Please go ahead. Let us know if you find any issue.
> >> >> >
> >> >> > Akemi
> >> >
> >> >
> >> > Hi Tomas,
> >> >
> >> > Please note it is https://wiki.centos.org/Contribute (case
> sensitive).
> >> >
> >> > Also, your homepage is ready to go:
> >> >
> >> > https://wiki.centos.org/TomasTomecek
> >> >
> >> > Akemi
> >
> >
> > About the wiki username, it has to be FirstnameLastname. According to
> section 3 of the Contribute page:
> >
> > "Create a login with a username in the format: FirstnameLastname. For
> example, if your name is John Doe, the username to be created would be
> JohnDoe. Other variations, such as johndoe, John Doe, John_Doe, John,
> johnny123numbers, Mister Doe, JustSomeEditor etc. will not be accepted"
> >
> > Could you create yours as TomasTomecek?
> >
> > Akemi


You are quite welcome.

Akemi

>
___
CentOS-docs mailing list
CentOS-docs@centos.org
https://lists.centos.org/mailman/listinfo/centos-docs


Re: [CentOS-docs] requesting edit/create page rights for wiki.centos.org/contribute

2020-05-28 Thread Tomas Tomecek
Akemi, all is good now: I have the account in caps and have access to
the Contribute tree of pages and my personal page.

Thank you very much for your help and patience! I wish everyone was so
nice and welcoming as yourself in this world.


Tomas

On Wed, May 27, 2020 at 10:51 AM Akemi Yagi  wrote:
>
> On Wed, May 27, 2020 at 12:55 AM Tomas Tomecek  wrote:
>>
>> Hi Akemi, thank you so much for your help.
>>
>> So, the case sensitivity bit me again: my actual account name is all
>> lower case: https://wiki.centos.org/tomastomecek (b/c that's also my
>> FAS account name)
>>
>> I guess I can try creating an account with initials in caps or I'd
>> need the perms for my lower case account. Don't have a preference.
>>
>> I just read my original email and realized that I didn't mention the
>> account name in there - my apologies.
>>
>>
>> Thank you!
>> Tomas
>>
>> On Tue, May 26, 2020 at 4:56 PM Akemi Yagi  wrote:
>> >
>> > On Tue, May 26, 2020 at 6:27 AM Tomas Tomecek  wrote:
>> >>
>> >> Thanks, Akemi.
>> >>
>> >> I still need the permissions though: "You are not allowed to edit this
>> >> page.", the same holds for my personal page.
>> >>
>> >> I also cannot find precise documentation how to contribute to the wiki
>> >> itself: I can see on this ML that git diffs of changes are being
>> >> posted - should I open a PR to some repo or edit the wiki page
>> >> directly?
>> >>
>> >>
>> >> Thank you,
>> >> Tomas
>> >>
>> >> On Mon, May 25, 2020 at 5:30 PM Akemi Yagi  wrote:
>> >> >
>> >> > On Mon, May 25, 2020 at 6:19 AM Tomas Tomecek  
>> >> > wrote:
>> >> >>
>> >> >> Howdy,
>> >> >>
>> >> >> as you already know from my intro email, I'm working on CentOS Stream.
>> >> >> I'd love to start publishing docs to wiki and therefore need edit
>> >> >> access for the wiki.centos.org/contribute tree: could you grant it to
>> >> >> me, please?
>> >> >>
>> >> >> My plan is to create a new document for it:
>> >> >> wiki.centos.org/contribute/CentOSStream and then link to it from the
>> >> >> contribute document - does that sound right?
>> >> >>
>> >> >>
>> >> >> Thanks!
>> >> >>
>> >> >> Tomas
>> >> >
>> >> >
>> >> > Please go ahead. Let us know if you find any issue.
>> >> >
>> >> > Akemi
>> >
>> >
>> > Hi Tomas,
>> >
>> > Please note it is https://wiki.centos.org/Contribute (case sensitive).
>> >
>> > Also, your homepage is ready to go:
>> >
>> > https://wiki.centos.org/TomasTomecek
>> >
>> > Akemi
>
>
> About the wiki username, it has to be FirstnameLastname. According to section 
> 3 of the Contribute page:
>
> "Create a login with a username in the format: FirstnameLastname. For 
> example, if your name is John Doe, the username to be created would be 
> JohnDoe. Other variations, such as johndoe, John Doe, John_Doe, John, 
> johnny123numbers, Mister Doe, JustSomeEditor etc. will not be accepted"
>
> Could you create yours as TomasTomecek?
>
> Akemi
>
> ___
> CentOS-docs mailing list
> CentOS-docs@centos.org
> https://lists.centos.org/mailman/listinfo/centos-docs

___
CentOS-docs mailing list
CentOS-docs@centos.org
https://lists.centos.org/mailman/listinfo/centos-docs