No Volumes No Shares - Superblock Issue?

Re: No Volumes No Shares - Superblock Issue?

Postby NigelBrownless » Tue Dec 10, 2024 5:11 pm

Code: Select all
dd if=/dev/md4 bs=1 skip=17071982430 count=512 of=17071982430.img

Gives an Error. Even correcting it to:
Code: Select all
dd if=/dev/md4 bs=1M skip=17071982430 count=512 of=17071982430.img

It comes back with....
Code: Select all
dd: invalid number '17071982430'
NigelBrownless
 
Posts: 46
Joined: Mon Nov 04, 2024 2:19 pm

Re: No Volumes No Shares - Superblock Issue?

Postby NigelBrownless » Tue Dec 10, 2024 5:15 pm

In the meantime to see if we have superblocks at each 4096 MB we can do so dd copies
Code: Select all
dd if=/dev/md4 bs=1M skip=40960 count=1 of=40961.img
dd if=/dev/md4 bs=1M skip=81920 count=1 of=81921.img
dd if=/dev/md4 bs=1M skip=409600 count=1 of=409601.img


Outputs in the attached file...
You do not have the required permissions to view the files attached to this post.
NigelBrownless
 
Posts: 46
Joined: Mon Nov 04, 2024 2:19 pm

Re: No Volumes No Shares - Superblock Issue?

Postby fvdw » Tue Dec 10, 2024 7:41 pm

NigelBrownless wrote:
Code: Select all
dd if=/dev/md4 bs=1 skip=17071982430 count=512 of=17071982430.img

Gives an Error. Even correcting it to:
Code: Select all
dd if=/dev/md4 bs=1M skip=17071982430 count=512 of=17071982430.img

It comes back with....
Code: Select all
dd: invalid number '17071982430'

The first probably fails because the integer value of skip is too large for dd command
The second is invalid as you try skip 17071982430 blocks of 1 MB which far more the size of the array.

Anyhow lets leave that for what is for the moment, the deviation but also slow down of the scan might be caused by problems with reading the disk as result of bad sectors. Lets check the blocks you copied to see if superblocks are present
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: No Volumes No Shares - Superblock Issue?

Postby fvdw » Tue Dec 10, 2024 8:03 pm

I looked at the three files in SB4096.rar
All three contain the superblock with exactly same content as the primairy superblock.
So indeed it seems we have an AG size of 4096 MB (4GB)
We copied only 1 MB at each position and the content of the three files are exactly the same for this 1 MB. That makes me a little surprised.
Now XFS stores besides the superblock also inode and log data, maybe it uses some space on each AG but I cannot find exact info on that.
At a certain point you would expect differences on locations were data (files )are stored.

I would like check some larger parts and compare those before adapting the primairy superblock.
Code: Select all
dd if=/dev/md4 bs=1M skip=40960 count=20 of=40961-20.img
dd if=/dev/md4 bs=1M skip=409600 count=20 of=409601-20.img
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: No Volumes No Shares - Superblock Issue?

Postby fvdw » Tue Dec 10, 2024 9:20 pm

The idea is to adapt the primairy superblock to AG size of 4096 MB and number of AG's to 465

Lets also check that we have a superblock at beginning of AG 465
Code: Select all
dd if=/dev/md4 bs=1M skip=1900544 count=1 of=ag465.img
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: No Volumes No Shares - Superblock Issue?

Postby NigelBrownless » Fri Dec 13, 2024 8:14 am

Code: Select all
dd if=/dev/md4 bs=1M skip=40960 count=20 of=40961-20.img
dd if=/dev/md4 bs=1M skip=409600 count=20 of=409601-20.img

File Attached....
You do not have the required permissions to view the files attached to this post.
NigelBrownless
 
Posts: 46
Joined: Mon Nov 04, 2024 2:19 pm

Re: No Volumes No Shares - Superblock Issue?

Postby NigelBrownless » Fri Dec 13, 2024 8:15 am

Code: Select all
dd if=/dev/md4 bs=1M skip=1900544 count=1 of=ag465.img

File Attached...
You do not have the required permissions to view the files attached to this post.
NigelBrownless
 
Posts: 46
Joined: Mon Nov 04, 2024 2:19 pm

Re: No Volumes No Shares - Superblock Issue?

Postby fvdw » Fri Dec 13, 2024 9:33 am

The 20MB larger files have exactly same content. Apparently inodes and journal log takes more place.

ag465.img contains a super block.

So lets try to adapt the primairy superblock. Attached an adapted primairy super block with AG size of 4096 MB and number of AG's to 465

To write to the array
Code: Select all
dd if=md4-512-new.img bs=1 count=512 of=/dev/md4


Then try to run
Code: Select all
mdadm --verbose --assemble --force /dev/md4 /dev/sda2 /dev/sdb2
mkdir /mountpoint
mount -o ro /dev/md4 /mountpoint

and see what happens
You do not have the required permissions to view the files attached to this post.
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: No Volumes No Shares - Superblock Issue?

Postby NigelBrownless » Tue Dec 17, 2024 2:12 pm

Apologies for delayed response, been away from computer for weekend!
I uploaded the file and tried to run...
Code: Select all
dd if=md4-512-new.img bs=1 count=512 of=/dev/md4

and got the following output...
Code: Select all
dd: writing '/dev/md4': No space left on device
1+0 records in
0+0 records out
0 bytes (0B) copied, 0.001030 seconds, 0B/s

So then I thought I need to Assemble the array first, so I did...
Code: Select all
mdadm --verbose --assemble --force /dev/md4 /dev/sda2 /dev/sdb2

which was successful...
Code: Select all
mdadm: looking for devices for /dev/md4
mdadm: /dev/sda2 is identified as a member of /dev/md4, slot 0.
mdadm: /dev/sdb2 is identified as a member of /dev/md4, slot 1.
mdadm: added /dev/sdb2 to /dev/md4 as 1
mdadm: added /dev/sda2 to /dev/md4 as 0
mdadm: /dev/md4 has been started with 2 drives.

So I then created a mount directory, Successfully and then tried the DD again...
Code: Select all
dd if=md4-512-new.img bs=1 count=512 of=/dev/md4

and got the following output...
Code: Select all
512+0 records in
512+0 records out
512 bytes (512B) copied, 0.188305 seconds, 2.7KB/s

Now ready to try the Mount again...
Code: Select all
mount -o ro /dev/md4 /mountpoint

And got the following output...
Code: Select all
mount: Structure needs cleaning


I think that's progress?
NigelBrownless
 
Posts: 46
Joined: Mon Nov 04, 2024 2:19 pm

Re: No Volumes No Shares - Superblock Issue?

Postby fvdw » Tue Dec 17, 2024 10:33 pm

yes, I think you should now run xfs_repair.
For that the array must be assembled but must be kept unmounted.
It is advised to do first a check to see what xfs_repair will do by using the -n option, then no changes will be made to the filesystem only a specification what xfs_repair will do.
Code: Select all
xfs_repair -n /dev/md4

After that we judge if it is ok to run xfs_repair and let it make the changes
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

PreviousNext

Return to Lacie 2Big Network vs2

Who is online

Users browsing this forum: No registered users and 6 guests