HiBeen exhausted by the D-LINK firmware performance I just change it dor the ALT-F RC3I have the error the superblock or the partition table is likely to be corrupt!
just after installation, it's unable to mount RW my ext3 filesystem.I try :1 - check function in the web interface -> that's fail.2 - Force Fix function in the web interface -> that's fail.
3 - I try e2fsck -f /dev/md0 the command using ssh interface
Am I doing the right method, or am I destroying my last chance to repair the system :-) ?
Thanks
On Monday, April 8, 2013 1:18:19 AM UTC+1, Moa wrote:
HiBeen exhausted by the D-LINK firmware performance I just change it dor the ALT-F RC3I have the error the superblock or the partition table is likely to be corrupt!
Where do you see this error? /var/log/systemerror.logPlease attach the whole system and kernel log (System->Utilities) Done
just after installation, it's unable to mount RW my ext3 filesystem.I try :1 - check function in the web interface -> that's fail.
Unable to automatically fix md0, mounting Read Only: fsck 1.41.14 (22-Dec-2010)
/dev/md0: The filesystem size (according to the superblock) is 488116951 blocks
The physical size of the device is 488116928 blocks
Either the superblock or the partition table is likely to be corrupt!
/dev/md0: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)
2 - Force Fix function in the web interface -> that's fail.
Checking md0 finished with status code 8: fsck 1.41.14 (22-Dec-2010) e2fsck 1.41.14 (22-Dec-2010) The filesystem size (according to the superblock) is 488116951 blocks The physical size of the device is 488116928 blocks Either the superblock or the partition table is likely to be corrupt!
Error Messages? (full messages!) the above "the superblock or the partition table is likely to be corrupt!" only?
3 - I try e2fsck -f /dev/md0 the command using ssh interface
The "Force Fix" already does a 'e2fsck -yf'. Yes but it abort automaticaly when executed from web interface see text highligted in red
I'm afraid that the error is not from the filesystem but from the disk itself, only the full log will tell.What does 'sfdisk -luS /dev/sd?' outputs?
# sfdisk -luS /dev/sda2Warning: start=2088450 - this looks like a partition rather thanthe entire disk. Using fdisk on it is probably meaningless.[Use the --force option if you really want this]# sfdisk -luS /dev/sdb2Warning: start=2088450 - this looks like a partition rather thanthe entire disk. Using fdisk on it is probably meaningless.[Use the --force option if you really want this]
Am I doing the right method, or am I destroying my last chance to repair the system :-) ?
Hi joao thx for your quick replyhere some element :
On Sunday, April 7, 2013 9:42:01 PM UTC-4, Joao Cardoso wrote:
On Monday, April 8, 2013 1:18:19 AM UTC+1, Moa wrote:HiBeen exhausted by the D-LINK firmware performance I just change it dor the ALT-F RC3I have the error the superblock or the partition table is likely to be corrupt!Where do you see this error? /var/log/systemerror.logPlease attach the whole system and kernel log (System->Utilities) Donejust after installation, it's unable to mount RW my ext3 filesystem.I try :1 - check function in the web interface -> that's fail.Unable to automatically fix md0, mounting Read Only: fsck 1.41.14 (22-Dec-2010) /dev/md0: The filesystem size (according to the superblock) is 488116951 blocks The physical size of the device is 488116928 blocks Either the superblock or the partition table is likely to be corrupt!
/dev/md0: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY. (i.e., without -a or -p options)
2 - Force Fix function in the web interface -> that's fail.Checking md0 finished with status code 8: fsck 1.41.14 (22-Dec-2010) e2fsck 1.41.14 (22-Dec-2010) The filesystem size (according to the superblock) is 488116951 blocks The physical size of the device is 488116928 blocks Either the superblock or the partition table is likely to be corrupt!Abort? yesError Messages? (full messages!) the above "the superblock or the partition table is likely to be corrupt!" only?3 - I try e2fsck -f /dev/md0 the command using ssh interface
The "Force Fix" already does a 'e2fsck -yf'. Yes but it abort automaticaly when executed from web interface see text highligted in redI'm afraid that the error is not from the filesystem but from the disk itself, only the full log will tell.What does 'sfdisk -luS /dev/sd?' outputs?# sfdisk -luS /dev/md0
Checking md0 failed with error code 8: fsck 1.41.14 (22-Dec-2010) e2fsck 1.41.14 (22-Dec-2010) The filesystem size (according to the superblock) is 488116951 blocks The physical size of the device is 488116928 blocks Either the superblock or the partition table is likely to be corrupt! Abort? yes
here the system log :
Apr 8 18:53:47 myDNS-323 user.notice hot: Start fscking md0 Apr 8 18:53:48 myDNS-323 user.notice hot: Unable to automatically fix md0, mounting Read Only: fsck 1.41.14 (22-Dec-2010) /dev/md0: The filesystem size (according to the superblock) is 488116951 blocks The physical size of the device is 488116928 blocks Either the superbl Apr 8 18:53:48 myDNS-323 user.info kernel: EXT3-fs: barriers not enabled Apr 8 18:53:48 myDNS-323 user.info kernel: kjournald starting. Commit interval 5 seconds Apr 8 18:53:48 myDNS-323 user.info kernel: EXT3-fs (md0): mounted filesystem with ordered data mode Apr 8 18:55:40 myDNS-323 authpriv.info dropbear[2433]: Exit (root): Exited normally Apr 8 18:55:44 myDNS-323 user.notice root: Checking md0 failed with error code 8: fsck 1.41.14 (22-Dec-2010) e2fsck 1.41.14 (22-Dec-2010) The filesystem size (according to the superblock) is 488116951 blocks The physical size of the device is 488116928 blocks Either the s Apr 8 19:01:56 myDNS-323 user.notice hot: Start fscking md0 Apr 8 19:01:57 myDNS-323 user.notice hot: Unable to automatically fix md0, mounting Read Only: fsck 1.41.14 (22-Dec-2010) /dev/md0: The filesystem size (according to the superblock) is 488116951 blocks The physical size of the device is 488116928 blocks Either the superbl Apr 8 19:01:57 myDNS-323 user.info kernel: EXT3-fs: barriers not enabled Apr 8 19:01:57 myDNS-323 user.info kernel: kjournald starting. Commit interval 5 seconds Apr 8 19:01:57 myDNS-323 user.info kernel: EXT3-fs (md0): mounted filesystem with ordered data mode Apr 8 19:04:20 myDNS-323 daemon.info sysctrl: temp=39.1 fan=400
Hi Joao,Thx your help is much apreciated.I try two time and the result is :
Checking md0 failed with error code 8: fsck 1.41.14 (22-Dec-2010) e2fsck 1.41.14 (22-Dec-2010) The filesystem size (according to the superblock) is 488116951 blocks The physical size of the device is 488116928 blocks Either the superblock or the partition table is likely to be corrupt! Abort? yes
resize2fs -p /dev/md0
fsck -f /dev/md0
Hi joaoI actualy have a backup of my precious data stored in NAS.Here the result resizing abord before ending :# resize2fs -p /dev/md0resize2fs 1.41.14 (22-Dec-2010)Please run 'e2fsck -f /dev/md0' first.# fsck -f /dev/md0fsck 1.41.14 (22-Dec-2010)e2fsck 1.41.14 (22-Dec-2010)The filesystem size (according to the superblock) is 488116951 blocksThe physical size of the device is 488116928 blocksEither the superblock or the partition table is likely to be corrupt!Abort<y>? noPass 1: Checking inodes, blocks, and sizesPass 2: Checking directory structurePass 3: Checking directory connectivityPass 4: Checking reference countsPass 5: Checking group summary information/dev/md0: 428261/122036224 files (15.8% non-contiguous), 484798352/488116951 blocks
# resize2fs -p /dev/md0resize2fs 1.41.14 (22-Dec-2010)Resizing the filesystem on /dev/md0 to 488116928 (4k) blocks.Begin pass 2 (max = 23)Relocating blocks resize2fs: Attempt to read block from filesystem resulted in short read while trying to resize /dev/md0
The filesystem size (according to the superblock) is 488116951 blocksThe physical size of the device is 488116928 blocks
Superblock backups stored on blocks:32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,102400000, 214990848
e2fsck -b 32768 -f /dev/md0
resize2fs -fp /dev/md0
e2fsck -f /dev/md0
fdisk -lu /dev/sda /dev/sdb
cat /sys/block/sda/size /sys/block/sdb/size
Let's have some fun and challenge with the second approach (first one is too basic) :-)
sfdisk -luS /dev/sd? # obtain the disks partition table sizes
----# sfdisk -luS /dev/sd?Disk /dev/sda: 243201 cylinders, 255 heads, 63 sectors/trackUnits = sectors of 512 bytes, counting from 0Device Boot Start End #sectors Id System/dev/sda1 63 1060289 1060227 82 Linux swap/dev/sda2 2088450 3907024064 3904935615 83 Linux/dev/sda3 0 - 0 0 Empty/dev/sda4 1060290 2088449 1028160 83 LinuxDisk /dev/sdb: 243201 cylinders, 255 heads, 63 sectors/trackUnits = sectors of 512 bytes, counting from 0Device Boot Start End #sectors Id System/dev/sdb1 63 1060289 1060227 82 Linux swap/dev/sdb2 2088450 3907024064 3904935615 83 Linux/dev/sdb3 0 - 0 0 Empty/dev/sdb4 1060290 2088449 1028160 83 Linux----
mke2fs -n /dev/md0 # obtain location of superblock backups
----# mke2fs -n /dev/md0mke2fs 1.41.14 (22-Dec-2010)Filesystem label=OS type: LinuxBlock size=4096 (log=2)Fragment size=4096 (log=2)Stride=0 blocks, Stripe width=0 blocks122036224 inodes, 488116928 blocks24405846 blocks (5.00%) reserved for the super userFirst data block=0Maximum filesystem blocks=014897 block groups32768 blocks per group, 32768 fragments per group8192 inodes per groupSuperblock backups stored on blocks:32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,102400000, 214990848----
dumpe2fs /dev/md0 | grep superblock # another, more reliable, way to obtain location of superblock backups
----# dumpe2fs /dev/md0 | grep superblockdumpe2fs 1.41.14 (22-Dec-2010)Primary superblock at 0, Group descriptors at 1-117Backup superblock at 32768, Group descriptors at 32769-32885Backup superblock at 98304, Group descriptors at 98305-98421Backup superblock at 163840, Group descriptors at 163841-163957Backup superblock at 229376, Group descriptors at 229377-229493Backup superblock at 294912, Group descriptors at 294913-295029Backup superblock at 819200, Group descriptors at 819201-819317Backup superblock at 884736, Group descriptors at 884737-884853Backup superblock at 1605632, Group descriptors at 1605633-1605749Backup superblock at 2654208, Group descriptors at 2654209-2654325Backup superblock at 4096000, Group descriptors at 4096001-4096117Backup superblock at 7962624, Group descriptors at 7962625-7962741Backup superblock at 11239424, Group descriptors at 11239425-11239541Backup superblock at 20480000, Group descriptors at 20480001-20480117Backup superblock at 23887872, Group descriptors at 23887873-23887989Backup superblock at 71663616, Group descriptors at 71663617-71663733Backup superblock at 78675968, Group descriptors at 78675969-78676085Backup superblock at 102400000, Group descriptors at 102400001-102400117Backup superblock at 214990848, Group descriptors at 214990849-214990965----
mdadm --examine /dev/sda? # get details of the existing RAID components
mdadm --detail /dev/md0 # get details of the RAID device
----# mdadm --detail /dev/md0/dev/md0:Version : 0.90Creation Time : Sun Feb 27 13:54:03 2011Raid Level : raid1Array Size : 1952467712 (1862.02 GiB 1999.33 GB)Used Dev Size : 1952467712 (1862.02 GiB 1999.33 GB)Raid Devices : 2Total Devices : 2Preferred Minor : 0Persistence : Superblock is persistentUpdate Time : Tue Apr 9 10:48:39 2013State : cleanActive Devices : 2Working Devices : 2Failed Devices : 0Spare Devices : 0UUID : 70c213df:be6dfb90:c0366bea:3e75f93aEvents : 0.11781296Number Major Minor RaidDevice State0 8 18 0 active sync /dev/sdb21 8 2 1 active sync /dev/sda2----
dmesg | grep 'end of device' # see if kernel complained about disk access. Better do after the fsck step
----# no result after fsck -f /dev/md0 ... Abort<y>? no----
On Tuesday, April 9, 2013 10:33:28 AM UTC-4, Joao Cardoso wrote:
Hi Joao,Firstly thank you very much for explanations, it's very instructive and I really appreciate to understand. I don't know either if this was my or a D-Link firmware error, I just bought two harddisk plug them in the DNS323 and follow the instruction, meanwhile I installed funplug and some package, but I never played with system management tool.I run fsck with each superblock, for each try I got the message "Either the superblock or the partition table is likely to be corrupt!"I try "resize2fs -fp /dev/md0" and it fail "Attempt to read block from filesystem resulted in short read while trying to resize /dev/md0"Information needed for next step :
e2fsck -fy /dev/sda2 # if the error appears, stop, and use your backups
resize2fs -p /dev/sda2 488116928 # resize to the size of md0; if error, stop and use your backups
mdadm --zero-superblock /dev/sdb2 # remove RAID information from sdb2; data will still be there
sfdisk --id /dev/sda 2 da # take the opportunity to change partition type to RAID
sfdisk --id /dev/sdb 2 da # take the opportunity to change partition type to RAID
mdadm --assemble /dev/md0 # md0 should start in degraded mode
mdadm --zero-superblock /dev/sda2
mdadm --create /dev/md0 --run --level=1 --metadata=0.9 --bitmap=internal --raid-devices=2 /dev/sda2 missing
Hi, I have a similar problem.
I just bought a 3 TB drive (sda). I partitioned it as GPT in 3 partitions: 0.5 GB (swap), 2000 GB (sda2) and 1000.093 GB (sda3).
I already had a 2TB drive (sdb) that was partitioned in two 1 TB partitions, so I copied the content of it to the 2TB partition on the 3 TB drive. Then I erased the 2 TB drive and converted it to GPT.
I created 2 partitions on it: 0.399 GB (swap) and 2000 GB (sdb2).
I then created a Raid1 array with sda2 and sdb2.
It looked to be working and resynchig.
When I looked again next day I had this message that it could not automatically fix md0.... etc.
That was the problem. You created a RAID over an existing fs.RAID needs some disk space to managing itself, which means that it offers less space for the fs than its own partition space.
The way to correct is the same as depicted in the previous posts, broadly: destroy the RAID, shrink the fs in its sda2 (or sdb2) partiition, create the RAID, enlarge the fs on the RAID.
In any case, you have to check the RAID metadata, the disk partitions (for GPT you must use fdisk and not sfdisk)
I tried to shrink sda2 (3 TB drive), but I got this error message:
"df: /dev/sda2: can't find mount point HTTP/1.1 303 Content-Type: text/html; charset=UTF-8 Location: /cgi-bin/diskmaint.cgi"
Unable to automatically fix sdb2, mounting Read Only: fsck 1.41.14 (22-Dec-2010) /dev/sdb2: The filesystem size (according to the superblock) is 488281250 blocks The physical size of the device is 488281221 blocks Either the superblock or the partition table is likely to be corrupt!
That was the problem. You created a RAID over an existing fs.RAID needs some disk space to managing itself, which means that it offers less space for the fs than its own partition space.
What should I have done instead?
A RAID device, as all other devices, can't be used directly, you have to create a filesystem on it, see Filesystem Maintenance.
In order to access and manipulate disk data as files and folders, a device needs to have a filesystem on it.A device can be a disk partition, a RAID array, a LVM device, etc, and a filesystem can be ext2/3/4, NTFS, FAT, etc.
The way to correct is the same as depicted in the previous posts, broadly: destroy the RAID, shrink the fs in its sda2 (or sdb2) partiition, create the RAID, enlarge the fs on the RAID.
I tried to shrink sda2 (3 TB drive), but I got this error message:
"df: /dev/sda2: can't find mount point HTTP/1.1 303 Content-Type: text/html; charset=UTF-8 Location: /cgi-bin/diskmaint.cgi"
I'm on RC3.
I don't know if it still shrunk or not.
Going back to filesystem page, the partition is now "checking".In any case, you have to check the RAID metadata, the disk partitions (for GPT you must use fdisk and not sfdisk)
How do I do that?
Thanks again!
On Thursday, March 6, 2014 4:16:41 AM UTC, jpbaril wrote:That was the problem. You created a RAID over an existing fs.RAID needs some disk space to managing itself, which means that it offers less space for the fs than its own partition space.
What should I have done instead?
Elaborating a bit more (sorry, I have been a teacher for over 22 years, can't avoid the lecture)From the RAID online help:A RAID device, as all other devices, can't be used directly, you have to create a filesystem on it, see Filesystem Maintenance.And from the Filesystems online help:In order to access and manipulate disk data as files and folders, a device needs to have a filesystem on it.A device can be a disk partition, a RAID array, a LVM device, etc, and a filesystem can be ext2/3/4, NTFS, FAT, etc.So, the canonical way to proceed is to first create a RAID device and afterwards create a filesystem on it. Order matters!
I tried to shrink sda2 (3 TB drive), but I got this error message:
"df: /dev/sda2: can't find mount point HTTP/1.1 303 Content-Type: text/html; charset=UTF-8 Location: /cgi-bin/diskmaint.cgi"ah, a bug? You got that error when doing what? On the "Filesystem maintenance" page itself or after selecting the "Shrink" operation? I have examined the code and couldn't see how that could happens.
And for that to happens, didNevertheless: Have you destroyed the RAID first? Was sda2 mounted? There is also a wiki about this, "How to convert RAID1 to a "standard" filesystem without losing your data".From your first post in this topic you are using RAID metadata 0.9, so you should have no problem following the wikis.What you can't do is having the RAID components mounted as filesystems and still being part of an existing RAID.What I advise you to do is to make sure that your data is safe and start from a fresh beginning.What *I* would do:-stop all services-stop the RAID-destroy the RAID-the above is following the convert RAID to "normal" wiki-a reboot here. The RAID shouldn't show up, verify data exists on both sda2 and sdb2-remove one of the disk, to keep my data safe,-follow the convert from standard to RAID wiki
Going back to filesystem page, the partition is now "checking".In any case, you have to check the RAID metadata, the disk partitions (for GPT you must use fdisk and not sfdisk)
How do I do that?What you mean with "that"? RAID metadata or disk partitions?You already did that (verify disk partitions) in your last post in the "Partitioner results shown as html code" topic.
From the RAID online help:A RAID device, as all other devices, can't be used directly, you have to create a filesystem on it, see Filesystem Maintenance.And from the Filesystems online help:In order to access and manipulate disk data as files and folders, a device needs to have a filesystem on it.A device can be a disk partition, a RAID array, a LVM device, etc, and a filesystem can be ext2/3/4, NTFS, FAT, etc.So, the canonical way to proceed is to first create a RAID device and afterwards create a filesystem on it. Order matters!
Oh, I think I know what I did.
When I partitioned my drive, I took good care to choose RAID type instead of Linux or LVM.
But, then I created ext4 FS on each drive BEFORE adding them to RAID array.
I think I should have added both non-formated partitions to the RAID1 array, and THEN format md0 to ext4. Right?
I tried to shrink sda2 (3 TB drive), but I got this error message:
"df: /dev/sda2: can't find mount point HTTP/1.1 303 Content-Type: text/html; charset=UTF-8 Location: /cgi-bin/diskmaint.cgi"ah, a bug? You got that error when doing what? On the "Filesystem maintenance" page itself or after selecting the "Shrink" operation? I have examined the code and couldn't see how that could happens.
After selecting Shrink I was brought to a blank page (in the main page frame) only showing that message.
From your first post in this topic you are using RAID metadata 0.9, so you should have no problem following the wikis.What you can't do is having the RAID components mounted as filesystems and still being part of an existing RAID.What I advise you to do is to make sure that your data is safe and start from a fresh beginning.What *I* would do:-stop all services-stop the RAID-destroy the RAID-the above is following the convert RAID to "normal" wiki-a reboot here. The RAID shouldn't show up, verify data exists on both sda2 and sdb2-remove one of the disk, to keep my data safe,-follow the convert from standard to RAID wiki
Tell me if it's ok, but here is what I'm trying right now (sorry if it's something stupid, because I'm not totally sure to understand everything you are trying to explain me).
1. I repartitioned my 2TB drive (sdb) as everything is already on the 2TB partition (sda2) of the 3TB drive and because anyway sdb2 was not showing any files as it should have.
2. I created a RAID1 array with only one component: a non-formated sdb2.
3. I created an ext4 FS on md0.
4. I'm copying right now all the files from sda2 to md0.
5. I will erase the sda2 parition with the paritioner tool,
add that now non-formated component to md0 and let it resynch.
Or I will maybe try your instructions at "How to convert a "standard" filesystem to RAID1 keeping all your data" to see if I can spare me the time (and NAS cpu load / drive spins) of the recopy of all the files from sdb to sda in the resynching process.
(...)
Oh, I think I know what I did.
When I partitioned my drive, I took good care to choose RAID type instead of Linux or LVM.
But, then I created ext4 FS on each drive BEFORE adding them to RAID array.I think I should have added both non-formated partitions to the RAID1 array, and THEN format md0 to ext4. Right?Right.Imagine what would happens if you put different data on sda2 and sdb2 (you could do it, as there are fs on them) and then create the RAID with sda2 and sdb2 -- what data would be in the RAID? the one from sda2? from sdb2?
Tell me if it's ok, but here is what I'm trying right now (sorry if it's something stupid, because I'm not totally sure to understand everything you are trying to explain me).You should start by:0-Destroy the RAID array. RAID info is stored in the disk (sda2/sdb2), and it can mess-up latter setup, such as appearing several RAIDs, md0, md1... which can lead to confusion
1. I repartitioned my 2TB drive (sdb) as everything is already on the 2TB partition (sda2) of the 3TB drive and because anyway sdb2 was not showing any files as it should have.
2. I created a RAID1 array with only one component: a non-formated sdb2.
3. I created an ext4 FS on md0.4. I'm copying right now all the files from sda2 to md0.That's OK, you are taking the safest approach. The only inconvenient is the extra time needed to copy all the data.Before proceeding verify that all the data is on the RAID, do a reboot, to be in the safe side.
5. I will erase the sda2 parition with the paritioner tool,It must have the same size as sdb2, i.e., all RAID component partition sizes must be within 1% of each other
add that now non-formated component to md0 and let it resynch.Yes.But first verify that sdb2 does not appears as mounted, and if it does unmount it first.You might think that re-partitioning a disk makes its data to disappears, but that is not true. Re-partitioning a MBR disk only changes 512 bytes on it, and if the start and sizes of each partition are the same as before, a filesystem will survive re-partitioning (and Alt-F will fsck and auto-mount it)
Or I will maybe try your instructions at "How to convert a "standard" filesystem to RAID1 keeping all your data" to see if I can spare me the time (and NAS cpu load / drive spins) of the recopy of all the files from sdb to sda in the resynching process.You already started, keep going as you depicted above.
Le lundi 10 mars 2014 12:58:27 UTC-4, João Cardoso a écrit :(...)Oh, I think I know what I did.
When I partitioned my drive, I took good care to choose RAID type instead of Linux or LVM.
But, then I created ext4 FS on each drive BEFORE adding them to RAID array.I think I should have added both non-formated partitions to the RAID1 array, and THEN format md0 to ext4. Right?Right.Imagine what would happens if you put different data on sda2 and sdb2 (you could do it, as there are fs on them) and then create the RAID with sda2 and sdb2 -- what data would be in the RAID? the one from sda2? from sdb2?
Well, I would have tought it would have merged both drives keeping most recently modified file in case of same file existing on both drives. But now I know that's not how it works. :)
Tell me if it's ok, but here is what I'm trying right now (sorry if it's something stupid, because I'm not totally sure to understand everything you are trying to explain me).You should start by:0-Destroy the RAID array. RAID info is stored in the disk (sda2/sdb2), and it can mess-up latter setup, such as appearing several RAIDs, md0, md1... which can lead to confusion
Yes, that was already done from tests I did just before trying to solve my problem.
1. I repartitioned my 2TB drive (sdb) as everything is already on the 2TB partition (sda2) of the 3TB drive and because anyway sdb2 was not showing any files as it should have.
2. I created a RAID1 array with only one component: a non-formated sdb2.
3. I created an ext4 FS on md0.4. I'm copying right now all the files from sda2 to md0.That's OK, you are taking the safest approach. The only inconvenient is the extra time needed to copy all the data.Before proceeding verify that all the data is on the RAID, do a reboot, to be in the safe side.
Ok, I will.
5. I will erase the sda2 parition with the paritioner tool,It must have the same size as sdb2, i.e., all RAID component partition sizes must be within 1% of each other
Well, I partitioned both drives with a 2000 GB partition. I hope ALT-F created them equal in size.
add that now non-formated component to md0 and let it resynch.Yes.But first verify that sdb2 does not appears as mounted, and if it does unmount it first.You might think that re-partitioning a disk makes its data to disappears, but that is not true. Re-partitioning a MBR disk only changes 512 bytes on it, and if the start and sizes of each partition are the same as before, a filesystem will survive re-partitioning (and Alt-F will fsck and auto-mount it)
When I created my RAID1 array in my step #2, in filesystem I saw an non-mounted non-formated sdb2 parition. After adding it to the raid array, I saw a md0 partition which I then formated as ext4 (my step #3). So everything seems to be OK so far.
Or I will maybe try your instructions at "How to convert a "standard" filesystem to RAID1 keeping all your data" to see if I can spare me the time (and NAS cpu load / drive spins) of the recopy of all the files from sdb to sda in the resynching process.You already started, keep going as you depicted above.
I'm still at #4, so could I try to not delete sda2 and integrate it to md0? I think not as the files would already be on md0 (and as said at top of this reply).
So yes, I will probably end up removing FS from sda2, adding it md0 and let it resynch.
You might think that re-partitioning a disk makes its data to disappears, but that is not true. Re-partitioning a MBR disk only changes 512 bytes on it, and if the start and sizes of each partition are the same as before, a filesystem will survive re-partitioning (and Alt-F will fsck and auto-mount it)
Le lundi 10 mars 2014 12:58:27 UTC-4, João Cardoso a écrit :You might think that re-partitioning a disk makes its data to disappears, but that is not true. Re-partitioning a MBR disk only changes 512 bytes on it, and if the start and sizes of each partition are the same as before, a filesystem will survive re-partitioning (and Alt-F will fsck and auto-mount it)
That's what is happening.
But first verify that sdb2 does not appears as mounted, and if it does unmount it first.
On Thursday, March 13, 2014 12:03:03 AM UTC, jpbaril wrote:Le lundi 10 mars 2014 12:58:27 UTC-4, João Cardoso a écrit :You might think that re-partitioning a disk makes its data to disappears, but that is not true. Re-partitioning a MBR disk only changes 512 bytes on it, and if the start and sizes of each partition are the same as before, a filesystem will survive re-partitioning (and Alt-F will fsck and auto-mount it)
That's what is happening.In the previous paragraph of the above quoted text I wrote:But first verify that sdb2 does not appears as mounted, and if it does unmount it first.So, "unmount it first": Disk->Filesystems->FS Operations, unmount
Unable to automatically fix sda3, mounting Read Only: fsck 1.41.14 (22-Dec-2010) /dev/sda3 is mounted. e2fsck: Cannot continue, aborting.
Checking sda3 finished with status code 8: fsck 1.41.14 (22-Dec-2010) /dev/sda3: Error allocating block bitmap (1): Memory allocation failed e2fsck: aborted
Le jeudi 13 mars 2014 11:37:48 UTC-4, João Cardoso a écrit :
On Thursday, March 13, 2014 12:03:03 AM UTC, jpbaril wrote:Le lundi 10 mars 2014 12:58:27 UTC-4, João Cardoso a écrit :You might think that re-partitioning a disk makes its data to disappears, but that is not true. Re-partitioning a MBR disk only changes 512 bytes on it, and if the start and sizes of each partition are the same as before, a filesystem will survive re-partitioning (and Alt-F will fsck and auto-mount it)
That's what is happening.In the previous paragraph of the above quoted text I wrote:But first verify that sdb2 does not appears as mounted, and if it does unmount it first.So, "unmount it first": Disk->Filesystems->FS Operations, unmount
I tried to umount sda2 (which had ext4 FS). Then, on partitioner page,
I just uncheck the checkbox of sda2 to not keep it withtout making any changes. That did not work, it remounted sda2 with ext4.
What I did is reduce by 0.01 GB the swap parition ("sda1") and increase the sda2 partition by the same amount just to change the start/size of each partitions as you explained.
That worked! sda2 was now not formated!
I then reduced sda2 back to previous size and finally was able to added it to RAID array.
I was not able to bring swap parition back to preivous size, I got some error messages.
I hope I did not mess with sda3 by doing all that, because on status page I got:
Keep will disable changes to the checked partition. (...). Un-checking it, making any change and rechecking it again does not guarantees that the resulting partition will be valid, and the original partition might not be preserved -- if you don't want to change a partition, never uncheck it.
Unable to automatically fix sda3, mounting Read Only: fsck 1.41.14 (22-Dec-2010) /dev/sda3 is mounted. e2fsck: Cannot continue, aborting. Checking sda3 finished with status code 8: fsck 1.41.14 (22-Dec-2010) /dev/sda3: Error allocating block bitmap (1): Memory allocation failed e2fsck: aborted
After some time I was still able to mount sda3.
You shouldn't need to repartition it again, you can add a partition to an existing RAID even if the partition has a fs on it. When the RAID recover starts the contents of the existing RAID will be "copied" to the new partition, even if a fs exists on it (and its contents will be lost).This can only be done if the fs is not mounted, that's why I told you "unmount before adding it to the array"
It is different to create a RAID and to assemble a RAID.
Unable to automatically fix sda3, mounting Read Only: fsck 1.41.14 (22-Dec-2010) /dev/sda3 is mounted. e2fsck: Cannot continue, aborting. Checking sda3 finished with status code 8: fsck 1.41.14 (22-Dec-2010) /dev/sda3: Error allocating block bitmap (1): Memory allocation failed e2fsck: abortedThis message is a symptom that no swap is available, i.e., fsck has not enough memory (physical+swap=virtual) to work.After some time I was still able to mount sda3.Don't understand: was you or was you not able to mount sda3 in read-write mode?
What have you read on the wiki or online help that made you took the wrong track? How could them be improved?