Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
So I have this happening to me in the last few months:
-Initially I had a 1.5TB Raid 1 array over two 1.5TB hard drives (occupying all space)
-Then one of the drive died. I replaced it with a 2TB resulting in an array of 1.5TB over one 1.5TB drive & one 2.0TB drive (leaving 500GB of unused space).
-Then the remaining 1.5TB drive died (Im lucky eh...) so I replaced it with another 2TB drive.
Now I have a 1.5TB raid array over two 2TB hard drives , each with 500GB of unused space.
My question is: Can I safely expand the array to use all the space on the disks?
I have found this procedure at howtoforge.com but I am not sure if it is reliable:
Code:
2.2 Growing An Intact Array
[...]
Now we can grow /dev/md2 as follows:
mdadm --grow /dev/md2 --size=max
--size=max means the largest possible value. You can as well specify a size in KiBytes (see previous chapter).
Then we run a file system check...
e2fsck -f /dev/md2
..., resize the file system...
resize2fs /dev/md2
... and check the file system again:
e2fsck -f /dev/md2
Afterwards you can boot back into your normal system.
Ok what you say matches what I thought, however I'd like to ask an intermediate question without opening a separate thread. Will be easier to follow up for me an the contributors. If this pose problem or is against the forum rules please inform me I'll take appropriate actions.
Now to the question: Before I proceed with what you suggested, I want to backup the content of the array on case it crashes or I lose everything. I normally backup the array content to a hard drive installed in a vantec hot swap external bay. This enclosure if you will is connected to a vantec pci SATA adapter. There is a key in front of the enclosure to switch the power on/off and start/stop the drive.
Linux seems to be ok with this but randomly I get , in dmesg, various reiserfs error messages. I'll post them later on when they occur. To backup to this drive this is what I would normally do:
1-start the drive
2-let Linux discover it then
3-mount the drive under a mount point
4-rsync my content to it
5-umount the drive
6-stop the drive
Is this how it's normally done?
Then I'll be confident that my backup is not garbage....
For a major op like this, always take at least 2 backups, and verify at least part by restoring somewhere.
An un-verified copy is NOT a backup, its just a blank media unless you've tested it.
YHBW
An un-verified copy is NOT a backup, its just a blank media unless you've tested it.
Agreed.
Before I proceed with anything, I need to make sure the hotswap works correctly. If things go wrong, at least I will have this variable eliminated.
When I turn the drive on, this happens in dmesg:
Code:
ata2: exception Emask 0x10 SAct 0x0 SErr 0x50000 action 0xe frozenata2: SError: { PHYRdyChg CommWake }
ata2: hard resetting link
ata2: link is slow to respond, please be patient (ready=-19)
ata2: COMRESET failed (errno=-16)
ata2: hard resetting link
ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
ata2.00: ATA-8: Hitachi HDS5C3020ALA632, ML6OA580, max UDMA/133
ata2.00: 3907029168 sectors, multi 0: LBA48 NCQ (depth 0/32)
ata2.00: configured for UDMA/100
ata2: EH complete
scsi 1:0:0:0: Direct-Access ATA Hitachi HDS5C302 ML6O PQ: 0 ANSI: 5
sd 1:0:0:0: Attached scsi generic sg0 type 0
sd 1:0:0:0: [sda] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
sd 1:0:0:0: [sda] Write Protect is off
sd 1:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 1:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sda: sda1 < sda5 >
sd 1:0:0:0: [sda] Attached SCSI disk
Then when I turn the drive off:
Code:
ata2: exception Emask 0x10 SAct 0x0 SErr 0x10000 action 0xe frozen
ata2: SError: { PHYRdyChg }
ata2: hard resetting link
ata2: SATA link down (SStatus 0 SControl 310)
ata2: hard resetting link
ata2: SATA link down (SStatus 0 SControl 310)
ata2: hard resetting link
ata2: SATA link down (SStatus 0 SControl 310)
ata2.00: disabled
ata2: EH complete
ata2.00: detaching (SCSI 1:0:0:0)
sd 1:0:0:0: [sda] Synchronizing SCSI cache
sd 1:0:0:0: [sda] Result: hostbyte=0x04 driverbyte=0x00
sd 1:0:0:0: [sda] Stopping disk
sd 1:0:0:0: [sda] START_STOP FAILED
sd 1:0:0:0: [sda] Result: hostbyte=0x04 driverbyte=0x00
Im no experts in the way linux handle drives but do you guys see any errors in these lines? I highlighted the lines that I dont like... Anybody can comment?
OK nevermind the previous post... I've figured out (partially) what is going on.... I need to spin down the drive using thr sg3_start tool (sg3_utils)... See post http://www.linuxquestions.org/questi...drives-773822/ for details.
Now to the RAID topic:
I have a problem. /dev/md6 (the array I am hoping to increase) is assembled from /dev/sde1 & /dev/sdf1. Each are 1.5TB partitions on 2TB disks. mdadm will not increase the partition size but just the array size. So consequently i need to increase the partitions size.
Solved. The underlying partitions were not properly sized. I resized the partition on the new drive and all went fine.
Regarding the hotswap thing, I am using Woodsman's scripts (with little tweaking for my server's config) and yesterday for the first time I successfully backed up one of my folders to an external HDD.
I believe this thread is solved!
Thanks for the help guys! As always, I appreciate!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.