andy36
August 9th, 2014, 06:25 PM
I think I messed up the permissions on a fresh install of 14.04 server... which is odd because I'm pretty sure I just accepted all the defaults, but whatever.
Background: The purpose of the machine is to be my personal "Dad tinkering" computer for when I have time to play around and goof on fun code, and to be a file/media server for my family the rest of the time. Windows put me in the habit of placing OS and software on one (expendable) partition or disk, then all the difficult/impossible-to-replace files on another (with a separate occasional backup of that disk). Such paranoia may not be necessary with Ubuntu, but I figure it can't hurt. So the plan for this system is to put the system on my SSD, and to improve on the user-file scheme by running a RAID1 with two other drives. I chose to use "server" instead of "desktop" because I want to learn how this all works... I figured that starting with the bare minimum and building it out slowly would help me learn.
What I have done so far (after installing and reinstalling and troubleshooting repeatedly... this latest attempt is the furthest I have gotten):
1. Installed 14.04 server from a usb stick onto sdc (my SSD), agreeing to the default for the "Use whole disk with LVM" option, no encryption option
2. [After troubleshooting] Rebooted into recovery mode and updated GRUB
3. Installed ubuntu-desktop using apt and the --no-install-recommends switch
4. Ran apt-get update and apt-get upgrade just to make sure everything was cool, then rebooted a few times to confirm everything looked stable
5. Installed firefox with the Software Center
7. Downloaded unix nvidia geforce 750 Ti driver (my card), [some troubleshooting], installed "gcc" and "make," then the driver, rebooted and confirmed everything looked stable
8. Installed gparted and used it to create single whole-disk partitions on sda and sdb, flagged for raid
9. Installed mdadm and said "no" to some question about mail
10. Ran...
sudo mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda1 /dev/sdb1
... then ran watch to keep tabs on mdstat. Waited many hours while it did its thing.
11. [After some troubleshooting] Edited /etc/mdadm/mdadm.conf to add this at the end: ARRAY /dev/md/crossroads:0 metadata=1.2 name=crossroads:0 UUID=4454f51f:02a3513d:518236a0:1c725c0a
12. Rebooted repeatedly, added, deleted, readded a partition to the RAID array md0, tried a dozen tiny variations on adding a line to fstab, tried to mount the array manually with mount
13. Reached my wits' end and typed this post...
At this point, I am so confused by this I don't even know what information is relevant, so I'll add a few other bits of possibly-relevant information here and then hope the community can tell me what I have done incorrectly.
andy@crossroads:~$ cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : active raid1 sda1[0] sdb1[1]
3906885440 blocks super 1.2 [2/2] [UU]
unused devices: <none>
andy@crossroads:~$ sudo parted -l
Model: ATA HGST HDN724040AL (scsi)
Disk /dev/sda: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Number Start End Size File system Name Flags
1 1049kB 4001GB 4001GB ext4 raid
Model: ATA HGST HDN724040AL (scsi)
Disk /dev/sdb: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Number Start End Size File system Name Flags
1 1049kB 4001GB 4001GB ext4 raid
Model: ATA PLEXTOR PX-256M5 (scsi)
Disk /dev/sdc: 256GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 1049kB 256MB 255MB primary ext2 boot
2 257MB 256GB 256GB extended
5 257MB 256GB 256GB logical lvm
Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/crossroads--vg-root: 239GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Number Start End Size File system Flags
1 0.00B 239GB 239GB ext4
Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/crossroads--vg-swap_1: 17.1GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Number Start End Size File system Flags
1 0.00B 17.1GB 17.1GB linux-swap(v1)
Model: Linux Software RAID Array (md)
Disk /dev/md0: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Number Start End Size File system Name Flags
andy@crossroads:/$ ls -l
total 85
drwxr-xr-x 2 root root 4096 Aug 6 20:59 bin
drwxr-xr-x 4 root root 1024 Aug 9 09:15 boot
drwxr-xr-x 18 root root 4440 Aug 9 10:49 dev
drwxr-xr-x 119 root root 4096 Aug 9 13:17 etc
drwxr-xr-x 2 root root 4096 Aug 8 23:34 export
drwxr-xr-x 3 root root 4096 Aug 6 20:48 home
lrwxrwxrwx 1 root root 33 Aug 6 20:44 initrd.img -> boot/initrd.img-3.13.0-32-generic
drwxr-xr-x 22 root root 4096 Aug 6 20:59 lib
drwxr-xr-x 2 root root 4096 Aug 6 21:11 lib64
drwx------ 2 root root 16384 Aug 6 20:43 lost+found
drwxr-xr-x 4 root root 4096 Aug 9 10:40 media
drwxr-xr-x 2 root root 4096 Apr 10 18:12 mnt
drwxr-xr-x 2 root root 4096 Jul 22 18:48 opt
dr-xr-xr-x 194 root root 0 Aug 9 10:41 proc
drwx------ 2 root root 4096 Aug 9 07:59 root
drwxr-xr-x 23 root root 840 Aug 9 10:42 run
drwxr-xr-x 2 root root 12288 Aug 8 23:33 sbin
drwxr-xr-x 2 root root 4096 Jul 22 18:48 srv
dr-xr-xr-x 13 root root 0 Aug 9 10:41 sys
drwxrwxrwt 6 root root 4096 Aug 9 13:17 tmp
drwxr-xr-x 11 root root 4096 Aug 6 21:56 usr
drwxr-xr-x 12 root root 4096 Aug 6 20:47 var
lrwxrwxrwx 1 root root 30 Aug 6 20:44 vmlinuz -> boot/vmlinuz-3.13.0-32-generic
andy@crossroads:/media/andy$ ls -l
total 4
drwxr-xr-x 2 root root 4096 Aug 9 08:02 Space
My questions:
(1) [Urgently] How do I mount the raid device manually?
(2) [Soon after 1] How do I set up fstab so the raid mounts during boot and appears as a folder called "Space"?
(3) [Eventually] How do I ensure that users such as andy (my login), and any family members I add down the road have permission to read/write to their files and pooled files (our media and pictures)?
Thank you all for any help you can provide. I'm happy to post more information if it helps. I am also willing to wipe everything and do it all over again if that's necessary. The raid disks are blank, and I am not attached to any of the things I've done to the system. Like I said, I want to learn how this works. But I have hit a wall and could really use some help.
Andy ... [edited for clarity]
Background: The purpose of the machine is to be my personal "Dad tinkering" computer for when I have time to play around and goof on fun code, and to be a file/media server for my family the rest of the time. Windows put me in the habit of placing OS and software on one (expendable) partition or disk, then all the difficult/impossible-to-replace files on another (with a separate occasional backup of that disk). Such paranoia may not be necessary with Ubuntu, but I figure it can't hurt. So the plan for this system is to put the system on my SSD, and to improve on the user-file scheme by running a RAID1 with two other drives. I chose to use "server" instead of "desktop" because I want to learn how this all works... I figured that starting with the bare minimum and building it out slowly would help me learn.
What I have done so far (after installing and reinstalling and troubleshooting repeatedly... this latest attempt is the furthest I have gotten):
1. Installed 14.04 server from a usb stick onto sdc (my SSD), agreeing to the default for the "Use whole disk with LVM" option, no encryption option
2. [After troubleshooting] Rebooted into recovery mode and updated GRUB
3. Installed ubuntu-desktop using apt and the --no-install-recommends switch
4. Ran apt-get update and apt-get upgrade just to make sure everything was cool, then rebooted a few times to confirm everything looked stable
5. Installed firefox with the Software Center
7. Downloaded unix nvidia geforce 750 Ti driver (my card), [some troubleshooting], installed "gcc" and "make," then the driver, rebooted and confirmed everything looked stable
8. Installed gparted and used it to create single whole-disk partitions on sda and sdb, flagged for raid
9. Installed mdadm and said "no" to some question about mail
10. Ran...
sudo mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda1 /dev/sdb1
... then ran watch to keep tabs on mdstat. Waited many hours while it did its thing.
11. [After some troubleshooting] Edited /etc/mdadm/mdadm.conf to add this at the end: ARRAY /dev/md/crossroads:0 metadata=1.2 name=crossroads:0 UUID=4454f51f:02a3513d:518236a0:1c725c0a
12. Rebooted repeatedly, added, deleted, readded a partition to the RAID array md0, tried a dozen tiny variations on adding a line to fstab, tried to mount the array manually with mount
13. Reached my wits' end and typed this post...
At this point, I am so confused by this I don't even know what information is relevant, so I'll add a few other bits of possibly-relevant information here and then hope the community can tell me what I have done incorrectly.
andy@crossroads:~$ cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : active raid1 sda1[0] sdb1[1]
3906885440 blocks super 1.2 [2/2] [UU]
unused devices: <none>
andy@crossroads:~$ sudo parted -l
Model: ATA HGST HDN724040AL (scsi)
Disk /dev/sda: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Number Start End Size File system Name Flags
1 1049kB 4001GB 4001GB ext4 raid
Model: ATA HGST HDN724040AL (scsi)
Disk /dev/sdb: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Number Start End Size File system Name Flags
1 1049kB 4001GB 4001GB ext4 raid
Model: ATA PLEXTOR PX-256M5 (scsi)
Disk /dev/sdc: 256GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 1049kB 256MB 255MB primary ext2 boot
2 257MB 256GB 256GB extended
5 257MB 256GB 256GB logical lvm
Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/crossroads--vg-root: 239GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Number Start End Size File system Flags
1 0.00B 239GB 239GB ext4
Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/crossroads--vg-swap_1: 17.1GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Number Start End Size File system Flags
1 0.00B 17.1GB 17.1GB linux-swap(v1)
Model: Linux Software RAID Array (md)
Disk /dev/md0: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Number Start End Size File system Name Flags
andy@crossroads:/$ ls -l
total 85
drwxr-xr-x 2 root root 4096 Aug 6 20:59 bin
drwxr-xr-x 4 root root 1024 Aug 9 09:15 boot
drwxr-xr-x 18 root root 4440 Aug 9 10:49 dev
drwxr-xr-x 119 root root 4096 Aug 9 13:17 etc
drwxr-xr-x 2 root root 4096 Aug 8 23:34 export
drwxr-xr-x 3 root root 4096 Aug 6 20:48 home
lrwxrwxrwx 1 root root 33 Aug 6 20:44 initrd.img -> boot/initrd.img-3.13.0-32-generic
drwxr-xr-x 22 root root 4096 Aug 6 20:59 lib
drwxr-xr-x 2 root root 4096 Aug 6 21:11 lib64
drwx------ 2 root root 16384 Aug 6 20:43 lost+found
drwxr-xr-x 4 root root 4096 Aug 9 10:40 media
drwxr-xr-x 2 root root 4096 Apr 10 18:12 mnt
drwxr-xr-x 2 root root 4096 Jul 22 18:48 opt
dr-xr-xr-x 194 root root 0 Aug 9 10:41 proc
drwx------ 2 root root 4096 Aug 9 07:59 root
drwxr-xr-x 23 root root 840 Aug 9 10:42 run
drwxr-xr-x 2 root root 12288 Aug 8 23:33 sbin
drwxr-xr-x 2 root root 4096 Jul 22 18:48 srv
dr-xr-xr-x 13 root root 0 Aug 9 10:41 sys
drwxrwxrwt 6 root root 4096 Aug 9 13:17 tmp
drwxr-xr-x 11 root root 4096 Aug 6 21:56 usr
drwxr-xr-x 12 root root 4096 Aug 6 20:47 var
lrwxrwxrwx 1 root root 30 Aug 6 20:44 vmlinuz -> boot/vmlinuz-3.13.0-32-generic
andy@crossroads:/media/andy$ ls -l
total 4
drwxr-xr-x 2 root root 4096 Aug 9 08:02 Space
My questions:
(1) [Urgently] How do I mount the raid device manually?
(2) [Soon after 1] How do I set up fstab so the raid mounts during boot and appears as a folder called "Space"?
(3) [Eventually] How do I ensure that users such as andy (my login), and any family members I add down the road have permission to read/write to their files and pooled files (our media and pictures)?
Thank you all for any help you can provide. I'm happy to post more information if it helps. I am also willing to wipe everything and do it all over again if that's necessary. The raid disks are blank, and I am not attached to any of the things I've done to the system. Like I said, I want to learn how this works. But I have hit a wall and could really use some help.
Andy ... [edited for clarity]