3ware: Add a drive to a RAID unit

57

Solution 1

Hmm, I agree, it's vague. I've always worked with spares, so drives are added automatically. Perhaps you can hack that too:

tw_cli /c0 add raidtype=spare disk=6

Then perhaps it will pick it up automatically.

Solution 2

I was able to accomplish this on my system with the following command:

tw_cli /c0/u0 start rebuild disk=6
Share:
57

Related videos on Youtube

Raz P
Author by

Raz P

Updated on September 18, 2022

Comments

  • Raz P
    Raz P almost 2 years

    i've been trying to get this to work for hours and I've tried to fix it in multiple ways and it still doesn't work.

    # this creates my class "bucket"
    class bucket:
        def __init__(self, water, capcity):
            self.water = water
            self.capcity = capcity
    
    
    # here I create my objects
    bucket1 = bucket(0, 3)
    bucket2 = bucket(0, 5)
    
    
    # this is the printing code to print how much water there is in every bucket
    def pr_v():
        print("Bucket_ONE " + str(bucket1.water) + "L")
        print("Bucket_TWO " + str(bucket2.water) + "L")
        print(" ")
    
    
    # this is where my problem is
    # this scirpt is supposed to trasfer water from the pouring bucket (p_bucket) to the receiving bucket untill the receiving bucket reaches it's
    # capacity or the pouring bucket runs out of water
    def pour_water(p_bucket, g_bucket):
        while g_bucket.capcity >= g_bucket.water or p_bucket.water != -1:
            if g_bucket.capcity != g_bucket.water or p_bucket.water != -1:
    
                if g_bucket.capcity < g_bucket.water:
                    bucket.water = g_bucket.capcity
                    break
                p_bucket.water -= 1
                g_bucket.water += 1
                pr_v()
    
        if p_bucket.water == -1:
            p_bucket.water = 0
    
    
    # this fills the bucket to it's capacity 
    def fill_water(self):
        self.water = self.capcity
    
    
    fill_water(bucket2)
    pour_water(bucket2, bucket1)
    pr_v()
    

    when I execute the code this happens

    Bucket_ONE 1L
    Bucket_TWO 4L
     
    Bucket_ONE 2L
    Bucket_TWO 3L
    

    it's supposed to stop here because bucket 1 reaches its capacity

    Bucket_ONE 3L
    Bucket_TWO 2L
     
    Bucket_ONE 4L
    Bucket_TWO 1L
     
    Bucket_ONE 4L
    Bucket_TWO 1L
    

    why does this happen? Im new to coding so I might not know a lot of stuff

    Thanks

    • mkrieger1
      mkrieger1 almost 4 years
      Does the down arrow mean that you do not expect the output below, but you get it?
    • mkrieger1
      mkrieger1 almost 4 years
      You should read this: How to debug small programs
  • Raz P
    Raz P almost 4 years
    thank you so much! this way is much easier, but do you know why it didn't work in the first place?