Re: Adding a disk fails
On Fri, Jan 21, 2011 at 2:00 PM, Helmut Hullen hul...@t-online.de wrote: Hallo, Carl, Du meintest am 20.01.11: If you shutdown the system, at the reboot you should scan all the device in order to find the btrfs ones # find the btrfs device btrfs device scan This must be done at every boot? Yes - this advice is added in the Wiki (?). If so, where is recommended, in rc.local? That depends - it has to be done before mounting. And if the device is part of the boot partition then you may put the scan command into an init-ramdisk. Using something like device=/dev/sdb,device=/dev/sdc on fstab mount options should also work. -- Fajar -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Adding a disk fails
On Thu 20 January 2011 22:55:54 Hubert Kario wrote: You still have a btrfs on /dev/sdc, do a dd if=/dev/zero of=/dev/sdc bs=8192 (overkill, but I don't remember which blocks have to be zeroed to destroy btrfs superblock) I gave up and started over. Maybe it should be clarified in the wiki that no mkfs should be done on additional volumes, as it's counterintuitive to some. yes. rc.local is too late, unless you will also mount the volume from there and not using /etc/fstab How and when then? That depends - it has to be done before mounting. And if the device is part of the boot partition then you may put the scan command into an init-ramdisk. This does not seem to have been sent to the listserv, as I only got it in a reply. This is likely incomplete. Using something like device=/dev/sdb,device=/dev/sdc on fstab mount options should also work. You mean as a substitute for a scan? On my other server the btrfs array seems to mount just fine without any measures to scan. I don't understand this, nor why no specific advice is given about scanning on boot in the wiki. -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Adding a disk fails
On Friday, January 21, 2011 11:16:49 cac...@quantum-sci.com wrote: On Thu 20 January 2011 22:55:54 Hubert Kario wrote: You still have a btrfs on /dev/sdc, do a dd if=/dev/zero of=/dev/sdc bs=8192 (overkill, but I don't remember which blocks have to be zeroed to destroy btrfs superblock) I gave up and started over. Maybe it should be clarified in the wiki that no mkfs should be done on additional volumes, as it's counterintuitive to some. yes. rc.local is too late, unless you will also mount the volume from there and not using /etc/fstab How and when then? in, or before /etc/rcS.d/S35mountall.sh That depends - it has to be done before mounting. And if the device is part of the boot partition then you may put the scan command into an init-ramdisk. This does not seem to have been sent to the listserv, as I only got it in a reply. This is likely incomplete. It was sent to list, your MUA may have merged messages with identical Message- ID. Using something like device=/dev/sdb,device=/dev/sdc on fstab mount options should also work. You mean as a substitute for a scan? Would seem so, but I haven't tried this On my other server the btrfs array seems to mount just fine without any measures to scan. I don't understand this, nor why no specific advice is given about scanning on boot in the wiki. your distro may have alredy put it in initrd or initramfs (for example fedora and archlinux do) -- Hubert Kario QBS - Quality Business Software 02-656 Warszawa, ul. Ksawerów 30/85 tel. +48 (22) 646-61-51, 646-74-24 www.qbs.com.pl -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Adding a disk fails
Hallo, Goffredo, Du meintest am 20.01.11: To add another disk you don't have to run mkfs.btrfs. For example: # add the first disk mkfs.btrfs /dev/sdb # mount the disk mount /dev/sdb /media/backups # add another disk to the first one btrfs device add /dev/sdc /media/backup Note1: the filesystem has to be mounted Note2: the medatada will be in raid1, the data in raid0 Note 3: if the disk has been used (especially under btrfs) you should first delete old partitioning data etc: dd if=/dev/zero of=/dev/sdb count=1000 dd if=/dev/zero of=/dev/sdc count=1000 I've just tried your recipe with two devices I had used for other btrfs experiments: btrfs filesystem show 2/dev/null shows my new wishes, and it shows the old settings too. But writing 1000 blocks seems to be not enough - sometimes I'll try bigger numbers. What happens with the old (and now unwanted) settings? By the way: I nee 2/dev/null because the actual git version always tries to show all block devices which it finds in /dev (no: I don't use udev). Viele Gruesse! Helmut -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Adding a disk fails
Hallo, Goffredo, Du meintest am 20.01.11: To add another disk you don't have to run mkfs.btrfs. For example: # add the first disk mkfs.btrfs /dev/sdb # mount the disk mount /dev/sdb /media/backups # add another disk to the first one btrfs device add /dev/sdc /media/backup Note1: the filesystem has to be mounted Note2: the medatada will be in raid1, the data in raid0 I've just tried ... creating /dev/sde with 2 TByte adding /dev/sdf with 60 GByte (it's easier to check ENOSPACE with such a small device) copying 94 Gbyte and then btrfs filesystem balance /mnt/btr (needed about 40 minutes for 94 GByte) leads to # btrfs filesystem show Label: none uuid: 121ae2ed-f572-43e6-8855-cd66ad534401 Total devices 2 FS bytes used 94.68GB devid2 size 37.27GB used 37.00GB path /dev/sdf devid1 size 1.82TB used 63.04GB path /dev/sde Label: 'MM2' uuid: ad7c0668-316c-4a79-ba00-3b505b9d99b4 Total devices 2 FS bytes used 1.15TB devid1 size 1.81TB used 591.14GB path /dev/sde2 *** Some devices missing Btrfs Btrfs v0.19 # btrfs filesystem df /mnt/btr Data, RAID0: total=4.00GB, used=2.00GB Data: total=94.01GB, used=92.58GB System, DUP: total=8.00MB, used=16.00KB System: total=4.00MB, used=0.00 Metadata, DUP: total=1.00GB, used=111.87MB Metadata: total=8.00MB, used=0.00 # df -t btrfs FilesystemType 1K-blocks Used Available Use% Mounted on /dev/sde btrfs 1992597264 99396500 1891304076 5% /mnt/btr # fdisk -l # btrfs filesystem show Label: none uuid: 121ae2ed-f572-43e6-8855-cd66ad534401 Total devices 2 FS bytes used 93.68GB devid2 size 37.27GB used 36.12GB path /dev/sdf devid1 size 1.82TB used 93.16GB path /dev/sde Label: 'MM2' uuid: ad7c0668-316c-4a79-ba00-3b505b9d99b4 Total devices 2 FS bytes used 1.15TB devid1 size 1.81TB used 591.14GB path /dev/sde2 *** Some devices missing Btrfs Btrfs v0.19 # btrfs filesystem df /mnt/btr Data, RAID0: total=64.00GB, used=31.90GB Data: total=63.01GB, used=61.67GB System, DUP: total=8.00MB, used=20.00KB System: total=4.00MB, used=0.00 Metadata, RAID1: total=128.00MB, used=104.71MB Metadata, DUP: total=1.00GB, used=6.15MB Metadata: total=8.00MB, used=0.00 # df -t btrfs FilesystemType 1K-blocks Used Available Use% Mounted on /dev/sde btrfs 1992597264 98348716 1892087652 5% /mnt/btr # - Look especially to btrfs filesystem df /mnt/btr, it shows Data, RAID0: total=64.00GB, used=31.90GB Data: total=63.01GB, used=61.67GB and that will lead to no space left on device Viele Gruesse! Helmut -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Adding a disk fails
On 01/21/2011 12:10 AM, Carl Cook wrote: On Thu 20 January 2011 14:13:22 Goffredo Baroncelli wrote: To add another disk you don't have to run mkfs.btrfs. For example: # add the first disk mkfs.btrfs /dev/sdb # mount the disk mount /dev/sdb /media/backups # add another disk to the first one btrfs device add /dev/sdc /media/backup Thanks Goffredo but as I say, I did this and it responds with ERROR: error adding the device '/dev/sdc' .. it doesn't give a clue. In your email you wrote that before adding the device you format it. Anyway I don't think that this is the problem. Have you check which is reported in dmesg. Note1: the filesystem has to be mounted Note2: the medatada will be in raid1, the data in raid0 If you shutdown the system, at the reboot you should scan all the device in order to find the btrfs ones # find the btrfs device btrfs device scan This must be done at every boot? If so, where is recommended, in rc.local? Look at this thread, where I wrote anout a possible solution http://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg04709.html # if you try to mount snapshot-3 directly, you fail because this # snapshot is not under the root of the btrfs filesystem mount -o subvol=dir-1/snapshot-3 /dev/sdb /media/backup # - error This is how I'd understood it, but when creating a subvolume in the root and putting a snalshot into it, it seems to make a further subvolume (or directory) with a redundant name. This would not be under the root, and may not be mountable? Which kenel version debian testing uses ? 2.6.32-5-amd64 with Debian patches. From a btrfs point of view, it is a very old kernel. IIRC in this kernel is not supported the snapshot removal. I suggest you to update the kernel with a recent one. btrfs filesystem snapshot / /snapshot-$(date +%Y-%m-%d) Oh thank you. -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html . -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Adding a disk fails
On Fri 21 January 2011 10:42:39 Goffredo Baroncelli wrote: Thanks Goffredo but as I say, I did this and it responds with ERROR: error adding the device '/dev/sdc' .. it doesn't give a clue. In your email you wrote that before adding the device you format it. Anyway I don't think that this is the problem. Have you check which is reported in dmesg. Absolutely no sign of a problem in dmesg or the logs. btrfs device scan This must be done at every boot? If so, where is recommended, in rc.local? Look at this thread, where I wrote anout a possible solution http://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg04709.html Thanks. I am suspecting scan is built into Debian. Not sure what to look for though, with all the darned variables. 2.6.32-5-amd64 with Debian patches. From a btrfs point of view, it is a very old kernel. IIRC in this kernel is not supported the snapshot removal. I suggest you to update the kernel with a recent one. I've looked for a newer kernel sources, but there isn't one with Debian patches. I always compile my kernel. -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Adding a disk fails
Well I've just tried to add a disk to another, but it fails. I created the first (starting with no traditional partitions) with: # mkfs.btrfs /dev/sdb Then I mounted it to /media/backups and put lots of files on it. I shut down the system, added another disk. Set it up with: # mkfs.btrfs /dev/sdc WARNING! - Btrfs Btrfs v0.19 IS EXPERIMENTAL WARNING! - see http://btrfs.wiki.kernel.org before using fs created label (null) on /dev/sdc nodesize 4096 leafsize 4096 sectorsize 4096 size 1.82TB Btrfs Btrfs v0.19 # btrfs device scan Scanning for Btrfs filesystems # (... Nothing? Not even my known mounted sdb drive?) # btrfs device add /dev/sdc /media/backups ERROR: error adding the device '/dev/sdc' It gives no clue as to what might possibly be the problem. I want raid0. Also I can not understand this: Note: While subvolumes can be created anywhere in the filesystem tree, in order to be mounted by name a subvolume or snapshot must be in the root of the btrfs filesystem. I want to do this, but do not know what this means. Tentatively I've created a BTRFS volume and mounted it on /media/backups. I then created subvolumes as backup-hex, backup-droog, snaps-hex and snaps-droog. When I created a snapshot it created a subdir under snaps-hex called hex-root. It won't allow me to remove snapshots. (Debian Testing) Also does anyone know how to create a shapshot with the current date in the name? -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Adding a disk fails
I must have done something wrong because for the past week or so, almost none of my questions have been answered here. I'm pretty much in trouble now because I have -no- backups, as I cannot get my backup server running, as I've put all my eggs in the btrfs basket. Am I asking things wrong, or am I supposed to be asking somewhere else? On Thu 20 January 2011 13:18:40 Carl Cook wrote: Well I've just tried to add a disk to another, but it fails. I created the first (starting with no traditional partitions) with: # mkfs.btrfs /dev/sdb Then I mounted it to /media/backups and put lots of files on it. I shut down the system, added another disk. Set it up with: # mkfs.btrfs /dev/sdc WARNING! - Btrfs Btrfs v0.19 IS EXPERIMENTAL WARNING! - see http://btrfs.wiki.kernel.org before using fs created label (null) on /dev/sdc nodesize 4096 leafsize 4096 sectorsize 4096 size 1.82TB Btrfs Btrfs v0.19 # btrfs device scan Scanning for Btrfs filesystems # (... Nothing? Not even my known mounted sdb drive?) # btrfs device add /dev/sdc /media/backups ERROR: error adding the device '/dev/sdc' It gives no clue as to what might possibly be the problem. I want raid0. Also I can not understand this: Note: While subvolumes can be created anywhere in the filesystem tree, in order to be mounted by name a subvolume or snapshot must be in the root of the btrfs filesystem. I want to do this, but do not know what this means. Tentatively I've created a BTRFS volume and mounted it on /media/backups. I then created subvolumes as backup-hex, backup-droog, snaps-hex and snaps-droog. When I created a snapshot it created a subdir under snaps-hex called hex-root. It won't allow me to remove snapshots. (Debian Testing) Also does anyone know how to create a shapshot with the current date in the name? -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Adding a disk fails
On Friday 21 of January 2011 00:10:54 Carl Cook wrote: On Thu 20 January 2011 14:13:22 Goffredo Baroncelli wrote: To add another disk you don't have to run mkfs.btrfs. For example: # add the first disk mkfs.btrfs /dev/sdb # mount the disk mount /dev/sdb /media/backups # add another disk to the first one btrfs device add /dev/sdc /media/backup Thanks Goffredo but as I say, I did this and it responds with ERROR: error adding the device '/dev/sdc' ... it doesn't give a clue. You still have a btrfs on /dev/sdc, do a dd if=/dev/zero of=/dev/sdc bs=8192 (overkill, but I don't remember which blocks have to be zeroed to destroy btrfs superblock) Then btrfs dev add /dev/sdc /media backup Note1: the filesystem has to be mounted Note2: the medatada will be in raid1, the data in raid0 If you shutdown the system, at the reboot you should scan all the device in order to find the btrfs ones # find the btrfs device btrfs device scan This must be done at every boot? If so, where is recommended, in rc.local? yes. rc.local is too late, unless you will also mount the volume from there and not using /etc/fstab -- Hubert Kario QBS - Quality Business Software 02-656 Warszawa, ul. Ksawerów 30/85 tel. +48 (22) 646-61-51, 646-74-24 www.qbs.com.pl -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Adding a disk fails
Hallo, Goffredo, Du meintest am 20.01.11: To add another disk you don't have to run mkfs.btrfs. For example: # add the first disk mkfs.btrfs /dev/sdb # mount the disk mount /dev/sdb /media/backups # add another disk to the first one btrfs device add /dev/sdc /media/backup ^backups Note1: the filesystem has to be mounted Note2: the medatada will be in raid1, the data in raid0 And there seems to be an error; some options tell the sum of the sizes of /dev/sdb and /dev/sdc as available size, but perhaps you can only use the size of the smaller of the two devices - the system seems to work in a kind of RAID1. The error is known but not yet fixed. Viele Gruesse! Helmut -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Adding a disk fails
Hallo, Carl, Du meintest am 20.01.11: If you shutdown the system, at the reboot you should scan all the device in order to find the btrfs ones # find the btrfs device btrfs device scan This must be done at every boot? Yes - this advice is added in the Wiki (?). If so, where is recommended, in rc.local? That depends - it has to be done before mounting. And if the device is part of the boot partition then you may put the scan command into an init-ramdisk. Viele Gruesse! Helmut -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html