Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 40

Thread: adding raid 1 to existing server. ( what next)

  1. #21
    Join Date
    Sep 2020
    Beans
    26

    Re: adding raid 1 to existing server. ( what next)

    system info if needed -- 16.04.7 lts

    1 I am deleting the partition before creating a new one
    step r) = system prompt --- #) = my keystrokes
    sudo fdisk /dev/sdc1
    1) d enter
    r) partition deleted
    2) n enter
    r) - p or e
    3) p enter
    r) - partition number
    3) 1 enter
    r) - starting sector - default 2048
    4) enter
    r) - ending sector - default 1953503936
    5) enter
    r) - partition created of type Linux size 931.5
    6) t enter
    r) - partition 1 selected -- enter partition type
    7) fd enter
    r) - partition changed from Linux to Linux raid autodetect
    8) w enter
    r) - partition table has been altered - system using existing table till reboot
    9) sudo shutdown -r now

    i do not have direct access to the server so was not able to post the DF output. I just remembered the >> option.

    I attached the file , not sure how to attach code like you have done.
    the (df , fdisk, etc..) commands were ran after the above steps and after the reboot. which i've repeated several times so either i'm missing a step or maybe I should be using parted?

    fyi -the first time i used fdisk on /dev/sdc1 It had 4 partition , so I was able to delete them and create 1 partition, and It is still flagged as a boot drive which I don't need on this.
    Attached Files Attached Files

  2. #22
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: adding raid 1 to existing server. ( what next)

    /dev/sdc1 is almost certainly wrong.
    /dev/sdc is the whole disk device.
    /dev/sdc1 the first partition.

    See why we keep being confused and want to see the actual parted/fdisk commands?

    Code:
    Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0xcbaa9abf
    
    Device     Boot Start        End    Sectors   Size Id Type
    /dev/sdb1        2048 1953525167 1953523120 931.5G 8e Linux LVM
    
    Disk /dev/sdc: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x6faf6faf
    
    Device     Boot Start        End    Sectors   Size Id Type
    /dev/sdc1  *       63 1953503999 1953503937 931.5G  7 HPFS/NTFS/exFAT
    Ok, 1TB.

    I see you use LVM. Will you be using LVM on the array? If so, LVM can be used to create RAID setups w/ mirror or stripes. Check out lvconvert. No need for mdadm at all when lvm is part of it.

    Cough ... sdb is all LVM. If you don't want to change that, we need to see
    Code:
    sudo pvs
    sudo vgs
    sudo lvs
    https://linoxide.com/linux-how-to/id...ux-lvm-mirror/ has a how-to guide, but they used a single disk w/ 2 partitions, instead of 2 disks each with a partition to become the PVs.
    Last edited by TheFu; January 9th, 2021 at 05:39 PM.

  3. #23
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    15,632
    Distro
    Kubuntu Development Release

    Re: adding raid 1 to existing server. ( what next)

    fdisk is a utility that is designed to work on entire devices. In Linux, entire disks are designated with names like /dev/sdc. If that disk has partitions, they are designated /dev/sdc1, /dev/sdc2, etc. So you need to run the command "sudo fdisk /dev/sdc" to delete the existing partitions and create new ones.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  4. #24
    Join Date
    Sep 2020
    Beans
    26

    Re: adding raid 1 to existing server. ( what next)

    attached updated parted and fdisk output

    the Fu


    I have not touched SDB yet, i was mainly trying to get SDC created,
    as to lvm , not sure, i was going to repeat the steps from SDC on SDB.

    all I really want to do, is use the raid as a file server, I want to use it to backup all my files, pictures, etc .. on it and be safer than being on a single drive and just want to do it right the first time.


    ( it took me several weeks to set up the one drive and get my windows machine to connect. ( permission, auto mounting the drive, etc... and other things i need to figure out)


    SeijiSensei

    thanks , it looks better ( no boot flag, no ntfs)

    everyone , thanks you your patience and understanding.
    my backgound,
    is 99% MS dos and window , started with dos 1.0, back when there was IBM dos , compaq dos , wyse dos, and yes MS dos )
    for anyone not old enough to have use a pc before they had hard drives and only had floppy drives, every computer manufacture had their own version of dos back then.

    so i need to unlearn the window gui and get back to command prompt.
    Attached Files Attached Files
    Last edited by tross9; January 9th, 2021 at 07:35 PM.

  5. #25
    Join Date
    Sep 2020
    Beans
    26

    Re: adding raid 1 to existing server. ( what next)

    ok,
    I fdsik sdb
    ran mdadm
    mkfs -t /dev/md0
    nano /etc/fstab ( /dev/md0 /media/drivesdb1 ext4 defaults 0 0)

    now it fails to boot due to dependencies for /media/drivesdb1

    when i tried to run sudo blkdid "command not found"


    the server does boot to emergency mode -- was able to comment out the fstab line and rebooted normally without the raid drives

    what did i miss?
    Last edited by tross9; January 10th, 2021 at 06:33 PM.

  6. #26
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    15,632
    Distro
    Kubuntu Development Release

    Re: adding raid 1 to existing server. ( what next)

    You need to be a lot more careful when typing. It's not "blkdid" but "blkid". Also your /etc/fstab is missing the filesystem and options fields. Here's mine for a RAID array using its UUID:
    Code:
    UUID=ff2902fb-c4bc-41a4-bd94-72bedf5eec32   /media/raid   ext4   defaults 0 0
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  7. #27
    Join Date
    Sep 2020
    Beans
    26

    Re: adding raid 1 to existing server. ( what next)

    i was typing the command that was in post #3


    added line in fstab
    UUID=9f8bf34d-cec9-426b-a998-27500f71e4cd /media/raid ext4 defaults 0 0

    still boots into emergency mode

    update 2:27 est

    /dev/md0 does not exist but /dev/md127 does.
    changing fstab to

    /dev/md127 /media/raid .......

    allows me to boot and df -TH sees /dev/md127 mounted as /media/raid
    parted show md127 as a software raid

    i'm going to try using the uuid of md127 and see what that does
    Last edited by tross9; January 10th, 2021 at 08:28 PM.

  8. #28
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    15,632
    Distro
    Kubuntu Development Release

    Re: adding raid 1 to existing server. ( what next)

    Is that the UUID for your array found using "sudo blkid"?

    I use /media/raid as the the mount point for my array. Did you create an empty directory with the same name at the same location? From the commands you gave above, it looks like you tried to mount your array to /media/drivesdb1.

    Don't just copy and paste from suggestions. You need to view them as examples and read and understand the syntax involved. Then modify them to fit your needs.

    If after fixing the fstab entry you still end up in emergency mode, then try this. Remove or comment out with a hash mark ("#") the line that mounts the array. Let Ubuntu boot up. Then open a terminal and type
    Code:
    mount -v /dev/md0 /mount/point
    where /mount/point is the location to which you want the array mounted ("/media/raid" in my case or perhaps "/media/drivesdb1" using your earlier posting). If that doesn't work, copy and paste the results from the terminal here inside of [code][/code] tags.

    If you're still having problems, run the command "sudo mdadm --detail /dev/md0" and post those results here.

    I'm assuming that when you created the array you named it /dev/md0. If it is named something else, like /dev/md127, then replace /dev/md0 with /dev/md127 in the commands above.
    Last edited by SeijiSensei; January 10th, 2021 at 08:44 PM.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  9. #29
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: adding raid 1 to existing server. ( what next)

    Quote Originally Posted by tross9 View Post
    i
    allows me to boot and df -TH sees /dev/md127 mounted as /media/raid
    The correct command is:
    Code:
    df -Th
    Please post the output for the md* line from that cmd. Note the case for the options. It matters.

    Post #3 mkfs had some options that seem to have been forgotten in later posts and perhaps when entering the commands. We can't tell.

    If attention to details is a problem, linux will always be hard.

  10. #30
    Join Date
    Sep 2020
    Beans
    26

    Re: adding raid 1 to existing server. ( what next)

    /dev/md0 does not exist ( df , fdisk or parted) . I'm not sure if it did exist, I told mdadm to create /dev/md0

    yes, I did try to mount to drivesdb1 when i could not get /media/raid to work
    yes, there is a raid folder in /media, i don't recall manually creating it, but it is there
    fyi -- when i LL the raid folder , unmounted it only shows . and ..
    when mounted it shows . and .. and "lost and found' , i assume that means it ok.

    ( drivesdb1 and drivesdc1 also exist i that folder, i'll be removing them later)

    blkid only see the raid as md127 and using the UUID of md127 in fstab works , so either entry of /dev/md127 or uuid=59... fstab will mount the drive.

    i would attach the output (df , parted, etc ..) but I no longer can access the drives from my windows machine,
    and i never did setup permission for putty to the server. so i have to write down what i see the retype it here.

    getting there,
    I need to work with samba and or permission on the raid folder , can see the share folder from windows system but no permission (i think i need to chown the group I use instead of root root, i'm not granting permission to everyone ( using 770 mostly)
    i assume that I could mount a flashdrive and save the output to it but not sure how.
    Last edited by tross9; January 10th, 2021 at 09:20 PM.

Page 3 of 4 FirstFirst 1234 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •