Re: [CentOS] Mount removed raid disk back on same machine as? original raid

2023-03-17 Thread Bowie Bailey via CentOS

On 3/14/2023 10:03 AM, Robert Heller wrote:

At Tue, 14 Mar 2023 09:50:33 -0400 Bowie Bailey ,? CentOS 
mailing list  wrote:


I know I will have to bring the drive online as a broken array, but I've
done that from other systems.  The only question there is can I simply
rebuild it with a different name.  I assume I can just do "mdadm -A
--run /dev/md0 /dev/sdc1" (possibly with "--force" due to the broken
array) even if sdc1 was originally part of the existing md127 array?

This should work.


Unfortunately, no.  The system would not mount the drive without some 
other changes.  Listing the process here for anyone else who comes 
across this thread.


Trying to start the array (with or without --force), fails with the message:

    mdadm: Found some drive for an array that is already active: /dev/md127
    mdadm: giving up

I found with some digging that I needed to change the UUID of the drive 
to be able to mount it separately from the existing array.  I used 
"sgdisk -G /dev/sdg1" to do this.  It worked, but gave quite a few scary 
warning messages in the process.  A better idea would have been to use 
uuidgen to generate a random uuid and then start the array like this:


    mdadm --assemble /dev/md99 --update=uuid --uuid= /dev/sdg1
(might require --force for a broken array, I'm not sure since I didn't 
actually do it this way)


Once the array is running, there is another problem.  Attempting to 
mount the array gives another error:


    mount: wrong fs type, bad option, bad superblock on /dev/md99,
        missing codepage or helper program, or other error

Useless error message.  You have to look in dmesg to see the actual problem:

    XFS (md99): Filesystem has duplicate UUID 
7e237dbd-6c24-4781-98d1-a1ae80a3ed13 - can't mount


I would assume you would have a similar issue with any other 
filesystem.  In my case, since it is XFS, I used uuidgen to generate 
another random uuid and then updated it like this:


    xfs_admin -U  /dev/md99

After that, the filesystem mounted normally.

Hopefully that is helpful for anyone else who finds themselves in this 
situation.


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


Re: [CentOS] Mount removed raid disk back on same machine as original raid

2023-03-14 Thread Bowie Bailey via CentOS

On 3/8/2023 4:08 PM, Chris Adams wrote:

Once upon a time, Bowie Bailey  said:

What is going to happen when I try to mount a drive that the system
thinks is part of an existing array?

I don't _think_ anything special will happen - md RAID doesn't go
actively looking for drives like that AFAIK.  And RAID 1 means you
should be able to ignore RAID and just access the contents directly.

However, the contents could still be a problem.  If LVM was in use on
it, that will be a problem, because LVM does auto-probe and will react
when it sees the same UUID (IIRC LVM will only block access to the newly
seen drive).  I don't think any filesystems care (I know I've mounted
snapshots of ext4 and IIRC xfs on the same system, haven't touched
btrfs).


I'm not using LVM on this drive, so that won't be an issue.

My concern is that since the raid info on the drive will identify itself 
as part of the active raid, the system will try to add it to the raid 
(probably as a spare) when it comes online.  I don't think that would be 
destructive, but I would have to figure out how to separate it out if 
that happens.  I'm hoping that it won't be an issue since there are no 
missing drives in the existing raid.


I know I will have to bring the drive online as a broken array, but I've 
done that from other systems.  The only question there is can I simply 
rebuild it with a different name.  I assume I can just do "mdadm -A 
--run /dev/md0 /dev/sdc1" (possibly with "--force" due to the broken 
array) even if sdc1 was originally part of the existing md127 array?


The system in question is in a data center, so I'm trying to get ahead 
of any possible problems to avoid having to deal with unexpected issues 
while I'm there.


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


[CentOS] Mount removed raid disk back on same machine as original raid

2023-03-08 Thread Bowie Bailey via CentOS
I have a Centos 7 system with an mdraid array (raid 1).  I removed a 
drive from it a couple of months ago and replaced it with a new drive.  
Now I want to recover some information from that old drive.


I know how to mount the drive, and have done so on another system to 
confirm that the information I want is there.


My question is this:

What is going to happen when I try to mount a drive that the system 
thinks is part of an existing array?


To put it another way:  I had two drives in md127.  I removed one (call 
it drive1), and replaced it with a new drive.  Some files were 
accidentally deleted from md127, so now I want to connect drive1 back to 
the same machine and mount it as a separate array from md127 so I can 
copy the files from drive1 back to md127.  What do I need to do to make 
that happen?


Thanks,

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


Re: [CentOS] Connecting an android tablet to CentOS

2021-09-14 Thread Bowie Bailey via CentOS

On 9/14/2021 2:29 PM, Scott Robbins wrote:

On Tue, Sep 14, 2021 at 11:09:34AM -0600, Frank Cox wrote:

On Tue, 14 Sep 2021 17:01:29 +
Richard wrote:


[My android device file viewer(s) wouldn't get me into the
Kindle data directory.]



There's an app I use. Cx file explorer. It will go into the kindle
directory, and from there, I can delete files. On the rare occasions I put
a book in there--for example, at times, an author makes a free ebook
available, I use jmtpfs. This is on a fairly minimal install with openbox,
I suspect that Gnome's file manager might be able to do it. (I can with
Fedora 34's live Gnome workstation).


For copying files to and from my PC (including Kindle books), I use an app called 
WIFI FTP Server.  It starts up an FTP server on your phone that you can connect to 
with Filezilla (or whatever) from your PC.  The server is only active while the app 
is running and you can set a password.  FTP is not a particularly secure protocol, 
but since I only used it when I'm on my home WIFI, it's not much of a risk.  It lets 
me move files around without worrying about cables, drivers, USB modes, etc.


--
Bowie

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