[SOLVED] Moving a non-RAID disk to a server with Hardware RAID Controller
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Moving a non-RAID disk to a server with Hardware RAID Controller
I have a disk with data on it used on a Supermicro server which has no RAID controller, I've put it into an HP server, and I can see the disk and it's containing data but while I'm trying to mount it this errors happen:
Code:
mount: wrong fs type, bad option, bad superblock on /dev/sda1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so.
And using fsck /dev/sda1 leads to an other error indicating the physical disk size is 8KB short:
Code:
e2fsck 1.42.13 (17-May-2015)
The filesystem size (according to the superblock) is 244190390 blocks
The physical size of the device is 244182198 blocks
Either the superblock or the partition table is likely to be corrupt!
It's the output of `hpacucli ctrl all show config detail`
Code:
Smart Array P420i in Slot 0 (Embedded)
Bus Interface: PCI
Slot: 0
Serial Number: 0014380350DA6C0
Cache Serial Number: PBKUA0BRH8M91T
RAID 6 (ADG) Status: Enabled
Controller Status: OK
Hardware Revision: B
Firmware Version: 8.00
Rebuild Priority: Medium
Expand Priority: Medium
Surface Scan Delay: 15 secs
Surface Scan Mode: Idle
Queue Depth: Automatic
Monitor and Performance Delay: 60 min
Elevator Sort: Enabled
Degraded Performance Optimization: Disabled
Inconsistency Repair Policy: Disabled
Wait for Cache Room: Disabled
Surface Analysis Inconsistency Notification: Disabled
Post Prompt Timeout: 0 secs
Cache Board Present: True
Cache Status: OK
Cache Ratio: 25% Read / 75% Write
Drive Write Cache: Disabled
Total Cache Size: 512 MB
Total Cache Memory Available: 304 MB
No-Battery Write Cache: Disabled
Cache Backup Power Source: Capacitors
Battery/Capacitor Count: 1
Battery/Capacitor Status: OK
SATA NCQ Supported: True
Spare Activation Mode: Activate on drive failure
Controller Temperature (C): 80
Cache Module Temperature (C): 41
Capacitor Temperature (C): 33
Array: A
Interface Type: SATA
Unused Space: 0 MB
Status: OK
Array Type: Data
Logical Drive: 1
Size: 931.5 GB
Fault Tolerance: 0
Heads: 255
Sectors Per Track: 32
Cylinders: 65535
Strip Size: 256 KB
Full Stripe Size: 256 KB
Status: OK
Caching: Enabled
Unique Identifier: 600508B1001CEA10DE41CCBBC5381E77
Disk Name: /dev/sda
Mount Points: None
Logical Drive Label: AE60E98C0014380350DA6C0CF0F
Drive Type: Data
physicaldrive 1I:1:12
Port: 1I
Box: 1
Bay: 12
Status: OK
Drive Type: Data Drive
Interface Type: SATA
Size: 1 TB
Rotational Speed: 7200
Firmware Revision: CC43
Serial Number: Z9A2441W
Model: ATA ST1000DM003-1SB1
SATA NCQ Capable: True
SATA NCQ Enabled: True
Current Temperature (C): 38
Maximum Temperature (C): 38
PHY Count: 1
PHY Transfer Rate: 6.0Gbps
Drive Authentication Status: OK
Carrier Application Version: 11
Carrier Bootloader Version: 6
Enclosure SEP (Vendor ID HP, Model Gen8 ServBP 12+2) 378
Device Number: 378
Firmware Version: 3.30
WWID: 50014380355F89B9
Port: 1I
Box: 1
Vendor ID: HP
Model: Gen8 ServBP 12+2
Expander 380
Device Number: 380
Firmware Version: 3.30
WWID: 50014380355F89A0
Port: 1I
Box: 1
Vendor ID: HP
SEP (Vendor ID PMCSIERA, Model SRCv8x6G) 379
Device Number: 379
Firmware Version: RevB
WWID: 50014380350DA6CF
Vendor ID: PMCSIERA
Model: SRCv8x6G
Any idea on how to fix this issue? maybe changing a parameter on raid array?
The RAID controller needs to use some of the disk to store metadata and information it would need to do RAID rebuild. When you insert a new disk with no RAID information on it, it will most likely overwrite that area of the disk.
Distribution: Ubuntu based stuff for the most part
Posts: 1,177
Rep:
Are you sure that the disk is mounted at /dev/sda? From the output you posted the disk is named /dev/sda, but no reference to a mount point.
If sda is correct, what does "fdisk -l /dev/sda" report?
Are you sure that the disk is mounted at /dev/sda? From the output you posted the disk is named /dev/sda, but no reference to a mount point.
If sda is correct, what does "fdisk -l /dev/sda" report?
No it's not mounted, the issue happens when I want to mount it. but parition table is there and fsck also sees most of file system, the only trouble is 8 KB physical size shortage.
Code:
fdisk -l /dev/sda
Disk /dev/sda: 931.5 GiB, 1000171331584 bytes, 1953459632 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 262144 bytes / 262144 bytes
Disklabel type: dos
Disk identifier: 0xc8200c4b
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 1953525167 1953523120 931.5G 83 Linux
Final work flow:
As i'm writing this post now, G8 servers didn't get firmware update to be able to use mixed mode ( hba + raid ) on p420i
But with help of this amazing guide , I was able to created a padded device and mount the partition without any data loss ( I guess the partition shouldn't be full so last blocks should not contain data )
Code:
let PSIZE=`blockdev --getsz /dev/sda1`
echo -e "0 $PSIZE linear /dev/sdd1 0 \n $PSIZE 100000 zero" | dmsetup create padded
mkdir /a
mount /dev/mapper/padded /a
After making sure that data is fine we can umount and with help of resize2fs decrease the partition size and mount the actual partition instead of padded one, or just continue use padded device while prevent to make the partition be fulled.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.