Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 40

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

  1. #11
    Join Date
    Sep 2020
    Beans
    21

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

    ok, deleted the partitions, created new single partition , the T FD changes from Linux to fat12 , i assume that is what I need for Samba?
    again thanks for your time and patience

  2. #12
    Join Date
    Nov 2009
    Location
    Catalunya, Spain
    Beans
    14,484
    Distro
    Ubuntu 18.04 Bionic Beaver

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

    fat12 sounds like filesystem to me, and the partitions for mdadm should NOT have a filesystem on them. I might be wrong what it means though, I stopped using fdisk some years ago.

    Part of the reasons I prefer parted is precisely because mkpart creates a partition without assigning it any type or filesystem. Clean and easy. After that adding the raid flag is very easy too.

    To be able to receive more feedback from the others following this thread please post the output of:
    Code:
    sudo fdisk -l
    sudo parted -l
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 18.04 LTS 64bit

  3. #13
    Join Date
    Mar 2007
    Beans
    888

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

    I don't understand your comment. Samba will work with almost any normal partition type.

  4. #14
    Join Date
    Sep 2020
    Beans
    21

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

    darkod
    ok, it seem that using fdisk , the drive is either going to be fat12 or ntfs , where as SDB1 is ext4, I did see someone mentioning that I should create it as ext4. i'll look for that post or try parted, or keep trying fdisk.


    Ago
    rsteinmetz70112
    I just want to be sure that I'll be able to access this Raid from windows, ( i intend to use it as a backup/file server for my windows machines) and want to be sure that I'll be able to do that without going thru reformatting because I have the wrong filetype.


  5. #15
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    15,534
    Distro
    Kubuntu 20.04 Focal Fossa

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

    Sounds like you might be confusing partition types and filesystems.

    Open one of RAID the drives with fdisk, then use "l" to see a list of types. FAT12 is type 1. Type "fd" is "Linux raid auto". Now enter the command "t" and the code "fd" when prompted. Then use "w" to save the changes to the partition table. Repeat with the other drive.

    Once you've built an array you can put any type of file system on it. In my example above, I use mkfs to put an ext4 filesystem on the array called /dev/md0.

    The mdadm kernel code will automatically recognize partitions marked "fd" as RAID members during boot.
    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

  6. #16
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    15,534
    Distro
    Kubuntu 20.04 Focal Fossa

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

    Sounds like you might be confusing partition types and filesystems.

    Open one of RAID drives with fdisk, then use "l" to see a list of types. FAT12 is type 1. Type "fd" is "Linux raid auto". Now enter the command "t" and the code "fd" when prompted. Then use "w" to save the changes to the partition table.

    Once you've built an array you can put any type of file system on it. In my example above, I use mkfs to put an ext4 filesystem on the array called /dev/md0.

    mdadm will automatically recognize partitions marked "fd" as RAID members during boot.

    I just want to be sure that I'll be able to access this Raid from windows, ( i intend to use it as a backup/file server for my windows machines) and want to be sure that I'll be able to do that without going thru reformatting because I have the wrong filetype.
    Access it from Windows on the same machine via a dual-boot arrangement? Or access it from Windows machines over the network?

    For the first of these, you'll need to put an NTFS filesystem on the array like this:
    Code:
    sudo mkfs -t ntfs /dev/md0
    It's possible to install third-party software on Windows to access ext[234] filesystems, but it's not the recommended approach. Format the array with NTFS and Windows will be happy.

    If you mean access the files on the array over the network by, say, mapping a network drive in Windows, then you will be exporting the files using the Samba application. In this case you should format the array with ext4 which Samba expects to find.
    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. #17
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    22,457
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

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

    Quote Originally Posted by rsteinmetz70112 View Post
    I don't understand your comment. Samba will work with almost any normal partition type.
    +1. But when Linux is the host for the Samba shared storage, it is best to stick with native Linux file systems like ext4 and definitely avoid FAT-whatever or NTFS. Those don't support native Unix permissions and drastically limit local control of the storage on Linux systems.

    FAT12 is the FAT version from before FAT32. There is almost zero use for it today.

    fdisk has a field for each partition that just marks the file system type. It is separate from the actual file system. There is a RAID type ... let me check the number ... hummm. Interesting. On 16.04, fdisk and parted are showing either Linux or msftdata (Microsoft basic data) or nothing at all for my mdadm RAID devices.

    parted shows this for the md arrays:

    Code:
    # parted  -l /dev/md1
    Model: Linux Software RAID Array (md)
    Disk /dev/md1: 1990GB
    Sector size (logical/physical): 512B/4096B
    Partition Table: loop
    Disk Flags: 
    
    Number  Start  End     Size    File system  Flags
     1      0.00B  1990GB  1990GB  ext4
    which is to be expected. parted -l shows all the devices, ignoring my input of a specific device.

    Code:
    # fdisk  -l /dev/md1
    Disk /dev/md1: 1.8 TiB, 1989643075584 bytes, 3886021632 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Alignment offset: 2560 bytes
    That's the entire fdisk output for the md1 device.

    gparted shows all the RAID devices (partitions) as "linux-raid" and knows RAID device it is included in, but it lies about the "Mount Point". It says the mount point is /dev/md1, which is wrong. That's the mdadm device. It is actually mounted to ....
    Code:
    # df -Th
    Filesystem     Type  Size  Used Avail Use% Mounted on
    /dev/sdc1      ext4   20G  8.9G  9.3G  49% /
    /dev/sdc2      ext4  186G  120G   57G  68% /Data/1TB
    /dev/sdc5      ext4  151G  107G   36G  75% /export
    /dev/md2       ext4  1.3T  1.2T   67G  95% /Data/r2
    /dev/md1       ext4  1.8T  1.7T   19G  99% /raid
    /dev/sda1      ext4  1.4T  1.3T   26G  99% /Data/1.5T
    Code:
    # more /proc/mdstat 
    Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10] 
    md2 : active raid1 sdg2[1] sdf2[0]
          1338985536 blocks [2/2] [UU]
          
    md1 : active raid1 sdd3[2] sde2[3]
          1943010816 blocks super 1.2 [2/2] [UU]
          
    unused devices: <none>
    shows that md1 is made from /dev/sdd3 and /dev/sde2 and that all is fine with it. That file is handy. Don't modify anything in /proc, just view it.

  8. #18
    Join Date
    Sep 2020
    Beans
    21

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

    ok, here the issue, I cheated , I entered t fd on one line, fdisk ignored the fd
    when I entered t pressed the return key then type FD ' changed from Linux to Linux raid auto...'

    parted -l still still shows that /dev/sdc1 is type as ntfs but i assume that mkfs will fix that.

    i think i ok for now,
    i'll see what issues i run into when I run mdadm

  9. #19
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    22,457
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

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

    Booted Windows can read an mdadm created arrays? Is that new? When did Windows start honoring Linux storage?

  10. #20
    Join Date
    Nov 2009
    Location
    Catalunya, Spain
    Beans
    14,484
    Distro
    Ubuntu 18.04 Bionic Beaver

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

    parted -l still still shows that /dev/sdc1 is type as ntfs but i assume that mkfs will fix that.
    No, mkfs will not fix that. You are mixing up things. In mdadm raid the filesystem you will create goes on top of the raid array device, it is not in the partitions like when you use simple HDD partitions.

    If you still have ntfs partitions that means you didn't delete them. Few of us already said few times to remove all partitions and create new ones. Please focus and follow the instructions.

    You need to delete all partitions in sdc or simply create new blank partition table. A new partition table will delete all existing partitions at once without needing to go one by one.

    Basically do it any way you want just get rid of the old ntfs partition from when you were using the disk in a windows machine.

    PS. In post #12 I asked you to post the currect status of the disk partitions so that we wouldn't need to guess things. But you still avoid to provide it.

    As for accessing the storage from windows, there are few different ways. Depending which Windows version we are talking about, the recent versions even have NFS client as windows feature. That allows you to export storage from linux server as nfs and use it on windows too. You don't even have to use Samba shares which can be more complex to set up compared to nfs export.
    Last edited by darkod; January 9th, 2021 at 10:24 AM.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 18.04 LTS 64bit

Page 2 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
  •