Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
30 TO 50 FERAL HOG
Mar 2, 2005



Ok, so my old Fedora Cora 5 install got nuked (which is good I guess, as now I have to upgrade). The problem is I had a Raid-5 array.

code:
mdadm --examine --brief --scan --config=partitions
gives

code:
ARRAY /dev/md0 level=raid5 num-devices=4 uuid=STUFF
How do I get my array working again?

Also, for some reason I can't do poo poo like
code:
mdadm
instead I have to

code:
cd /sbin
./mdadm
What the gently caress?

Adbot
ADBOT LOVES YOU

30 TO 50 FERAL HOG
Mar 2, 2005



JoeNotCharles posted:

First of all, you can just do "/sbin/mdadm". Secondly, check your PATH environment variable ("echo $PATH") - it probably has /bin but not /sbin in it. That's because /sbin is for system tools that most users don't need to use every day, so it's not in the default PATH.

Cool.

As for the array, I actually just

code:
mdadm --examine --brief --scan --config=partitions > /etc/mdadm.conf
took ownership, and then updated fstab. Works great :D

30 TO 50 FERAL HOG
Mar 2, 2005



I just tried to reassemble my array.

Thanks MDADM for thinking "HEY HE SPECIFIED 4 DRIVES FROM A 4 DRIVE AWAY, ONE IS OBVIOUSLY A SPARE AND ONE OF THE ORIGINAL FOUR HAS FAILED. NOW I WILL START RECOVERY WITHOUT PROMPTING OR ANYTHING".

Now I get to wait 10 hours for MDADM to "recover" to the spare that was a part of the array in the first place. Awesome.

30 TO 50 FERAL HOG
Mar 2, 2005



Ahahahaha. Reconstruction fails because apparently one of the drives is faulty. This rules so hard. Thanks for sucking poo poo MDADM.

30 TO 50 FERAL HOG
Mar 2, 2005



taqueso posted:

Have you tried assembling the array using --force?

As an aside, raid-5 is way too fragile for my tastes. Also, md has never been anything but rock solid for me. Too bad the docs are scattered all over hell.

p.s. you have a backup, right? RAID is not a backup sorry, I reread that and it seems a little harsh - still true though

The drive isn't actually faulty. The rebuild just keeps failing. I can --assemble --force with the 3 devices that it didn't randomly decide to write poo poo to and mount the array just fine.

I tried to --zero-superblock the "spare" and then add it to the array to see if it would build correctly but the machine segfaulted.

I'm having enough issues as it is (audio over HDMI plus this) and I'm seriously considering getting Windows Server 2k3 through DreamSpark and just using it. Although I can't grow arrays with Server2k3 which is a bit of a pain in the rear end.

30 TO 50 FERAL HOG
Mar 2, 2005



taqueso posted:

Maybe there is a hardware issue?

Possible. Only thing I can really test for is RAM however.

30 TO 50 FERAL HOG
Mar 2, 2005



I want to mount a device twice (once as normal once as read only). What is the best way to do this? I was thinking making a symlink to /dev/md0 (currently everything is using UDID) or could I simply mount by device and once by UDID?

30 TO 50 FERAL HOG
Mar 2, 2005



http://lwn.net/Articles/281157/

It is supposed to work, but it fails silently and the directory that is supposed to be read only isn't.

code:
biohazrd@BiohazrDMC:~$ sudo mount --bind -o ro /media/raid/ /media/raidRO/
biohazrd@BiohazrDMC:~$ cd /media/raidRO/
biohazrd@BiohazrDMC:/media/raidRO$ ls
Anime  Books               fstab  Movies  TV
Apps   directory_list.txt  Games  Music   Unsorted
biohazrd@BiohazrDMC:/media/raidRO$ touch newfile
biohazrd@BiohazrDMC:/media/raidRO$ ls
Anime  Books               fstab  Movies  newfile  Unsorted
Apps   directory_list.txt  Games  Music   TV
biohazrd@BiohazrDMC:/media/raidRO$

30 TO 50 FERAL HOG fucked around with this message at 20:25 on Dec 19, 2009

30 TO 50 FERAL HOG
Mar 2, 2005



code:
[1785205.748898] scsi11 : SCSI emulation for USB Mass Storage devices
Try to mount /dev/scsi11

30 TO 50 FERAL HOG
Mar 2, 2005



What's the output of "fdisk -l"

30 TO 50 FERAL HOG
Mar 2, 2005



BiohazrD posted:

http://lwn.net/Articles/281157/

It is supposed to work, but it fails silently and the directory that is supposed to be read only isn't.

code:
biohazrd@BiohazrDMC:~$ sudo mount --bind -o ro /media/raid/ /media/raidRO/
biohazrd@BiohazrDMC:~$ cd /media/raidRO/
biohazrd@BiohazrDMC:/media/raidRO$ ls
Anime  Books               fstab  Movies  TV
Apps   directory_list.txt  Games  Music   Unsorted
biohazrd@BiohazrDMC:/media/raidRO$ touch newfile
biohazrd@BiohazrDMC:/media/raidRO$ ls
Anime  Books               fstab  Movies  newfile  Unsorted
Apps   directory_list.txt  Games  Music   TV
biohazrd@BiohazrDMC:/media/raidRO$

code:
biohazrd@BiohazrDMC:/media$ sudo umount /media/raidRO
biohazrd@BiohazrDMC:/media$ sudo mount --bind /media/raid/ /media/raidRO/
biohazrd@BiohazrDMC:/media$ sudo mount -o remount,ro /media/raidRO/
biohazrd@BiohazrDMC:/media$ cd /media/raidRO/
biohazrd@BiohazrDMC:/media/raidRO$ ls
Anime  Books               fstab  Movies  TV
Apps   directory_list.txt  Games  Music   Unsorted
biohazrd@BiohazrDMC:/media/raidRO$ touch newfile
touch: cannot touch `newfile': Read-only file system
biohazrd@BiohazrDMC:/media/raidRO$
:haw:

Now, how do I make this happen automatically? I can use bind as a mount type in fstab, but I can't execute the remount.

30 TO 50 FERAL HOG fucked around with this message at 20:53 on Dec 19, 2009

30 TO 50 FERAL HOG
Mar 2, 2005



Repost dmesg after disabling that stuff and replugging the device.

30 TO 50 FERAL HOG
Mar 2, 2005



It seems to have something to do with your Sansa player. There's actually quite a bit of info about it from the quick Googling I did.

https://bugs.launchpad.net/ubuntu/+source/libgphoto2/+bug/355998

What distro are you using? There are two fixes that you could try, but one is Ubuntu only.

30 TO 50 FERAL HOG
Mar 2, 2005



So I have an MD array that I want to upgrade. For hardware reasons, I am limited to the number of drives I can add to the computer. My existing setup is 4x1.5TB RAID 5. I would like to add a 2TB drive, with a ~500GB partition for use as the boot "drive" and a ~1.5TB partition to be added to the array. The problem I see with this is that the drives in the existing array are block devices.

Can I add a partition to an array that is currently using block devices? If not, could I simply create a loopback device pointing to the ~1.5TB partition and then add that to the array? Does anyone see any problems with this?

30 TO 50 FERAL HOG
Mar 2, 2005



I know you can grow an MD array. I'm more concerned as to if using a 2TB hard drive with two partitions in the array made up of 1.5TB block devices would be a problem.

30 TO 50 FERAL HOG
Mar 2, 2005



Misogynist posted:

Expanding on what ShoulderDaemon said: your misuse/misunderstanding of the term "block device" here is probably the source of your confusion. A disk and a partition on that disk are both block devices. A block device is just any device that's block-addressable. This can be a disk, a SAN LUN, a partition on either of those, an MD RAID device, an LVM volume, a loopback-mounted file, and so on.

Gotcha. Okay thanks for the help everyone.

Adbot
ADBOT LOVES YOU

30 TO 50 FERAL HOG
Mar 2, 2005



I want to set up a SMB share on my home Ubuntu server and I'm just trying to find the best way to do it.

I would essentially like two shares, one writable and one not writable (but both pointing to the same physical directory), with the writable only accessible by me, preferably using my existing Windows credentials and the read-only accessible to everyone (as in nobody has to enter any kind of password, they just browse to //server/share and it just works, i.e. guests).

I actually do need two shares though, and not just different permissions based on the user because applications on my Windows machines would run as me and I don't necessarily want them to have write access.

In addition, I would like files created on the server to have the proper permissions. I haven't done this in a while but I seem to remember that I used to run into a problem where Samba created the files with the owner being the user that Samba ran under on the server.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply