/srv/irclogs.ubuntu.com/2018/10/07/#ubuntu-server.txt

plus2equalsmeGot an odd problem with a fresh install of 18.04.1 server. It's seeing an ntfs drive as vfat.01:37
plus2equalsme(ntfs format confirmed in windows and debian desktop)01:38
ChmEarlplus2equalsme, ntfs-3g is installed?01:39
plus2equalsmeChmEarl yes, result of install attempt is "ntfs-3g is already the newest version (1:2017.3.23-2)."01:41
ChmEarlsudo fdisk -l /dev/sdX  <-- see if there is an ESP and an NTFS01:42
plus2equalsmeStandby, need a couple minutes (drive currently disconnected, stupid of me)01:43
plus2equalsmehmmmmm, odd response, stand by while I check a few more things01:48
plus2equalsmeChmEarl sudo fdisk -l shows "/dev/sdb1 63 3906963395 3906963333  1.8T  7 HPFS/NTFS/exFAT"01:52
plus2equalsmeblkid though shows it as type vfat, but, I also got a number of errors when I connected the drive (usb)01:52
plus2equalsmeI can get the errors into a pastebin of some sort if you need to see them01:53
ChmEarlplus2equalsme,  id=7 is ntfs01:54
plus2equalsmeThat's why I got confused. Let me get the errors on device attach into a paste, I'm starting to suspect that's part of the cause.01:55
plus2equalsmeChmEarl from dmesg as I plugged the device in https://paste.ubuntu.com/p/JdRzGdgrsH/02:02
ChmEarlmount /dev/sdb1 /windows/D -t ntfs-3g02:12
ChmEarlprep /windows/D first02:12
ChmEarlmkdir -p /windows/D02:13
ChmEarlplus2equalsme, if it mounts as ^^ then you can dial in some options for user perms02:15
plus2equalsmeGetting permission denied on mkdir02:16
ChmEarlplus2equalsme, you can use /mnt, I'm used to OpenSuSe conventions02:17
plus2equalsmeno worries. I did get it to mount using sudo on the commands02:18
ChmEarlplus2equalsme, sdb1 is a data drive already populated? or its new and empty?02:21
plus2equalsmeAlready populated02:21
plus2equalsmeChmEarl I do have enough disk space elsewhere to temporarily move the data if a format is necessary, but I'd like to keep it as NTFS if possible02:34
plus2equalsmeShould I be able to use fstab to mount it even with these errors?02:35
ChmEarlplus2equalsme, once you mounted it as above did the filesystem look/behave as you expected?02:40
ChmEarlplus2equalsme, what you showed in the pastebin is normal when there is no automount02:41
plus2equalsmeChmEarl There were two directories that I didn't expect, one a windows trashcan (understandable, it was recently on a windows system) and the other is called 'System Volume Information'02:42
plus2equalsmeGood to know the pastebin is normal02:42
ChmEarlplus2equalsme, try using fstab with noauto so `mount windows/D` does the job02:42
plus2equalsmeChmEarl just to make sure I understand, if I use noauto in an fstab I would have to manually remount any time I have to reboot the machine?02:44
ChmEarlI use this with a data drive:/dev/sdb1       /windows/D      ntfs-3g rw,users,gid=users,umask=0002,nosuid,noauto 0 002:44
ChmEarlnote the `noauto`02:45
ChmEarland I put target user in group users02:45
plus2equalsmeunderstand02:46
plus2equalsmeI'm going to have to finish working on this tomorrow though. Thank you for the help.02:48
ChmEarlplus2equalsme, manually remount: yes.. a data drive is always needed02:48
ChmEarlisn't always needed02:49
plus2equalsmeChmEarl, for my usecase, it is. But, it is easy enough to ssh and remount, just wanted to make sure I knew that it'd be necessary02:50
=== elsheepo is now known as beatzz
=== Helenah is now known as MikeyTheEngineer
=== MikeyTheEngineer is now known as MikeyTheGreasyEn
=== MikeyTheGreasyEn is now known as TomTheTrooper
=== TomTheTrooper is now known as Helenah
chiiiiizHello15:23
chiiiiizI need help with lvm backup15:23
chiiiiizWe have a server with 1 hd, 931 Gb. 1 Partition for swap, 1 partition for /boot and the rest is a vg.15:24
chiiiiizNo, sorry, swap is part of the vg15:25
chiiiiiz2 lv : swap and /. / ist 903 Gb!!!15:25
chiiiiizWe have important data to backup before everything will be virtualized. We can't reboot, since we have jenkins running on the server, and the last time we had an update and a reboot, everything went down, jenkins did not work.15:27
chiiiiizMy question is: how can I backup the data. Given that 33% of the/ is used. I read about snapshots, but I do not understand were the snapshots are stored.15:27
chiiiiizI have no choice, I did not setup the server, and I have to cope with that.15:28
chiiiiizcan I store the snapshot on a USB HDD? And then mount it and backup the data as an image and as a tar file?15:29
chiiiiizThanks for your insights15:29
chiiiiizI have thought about shrinking the / lv, but since there is (according to the doc on the internet) a risk af data loss, I 'd rather not try this.15:30
blackflowchiiiiiz: first on google for "LVM snapshots"  http://tldp.org/HOWTO/LVM-HOWTO/snapshots_backup.html15:42
blackflowmeanwhile, I'd make a rsync backup too.15:43
blackflowbtw... LVM snapshots are to make an atomic copy of the data, not for moving somewhere else by itself15:43
blackflowso with rsync, you make a LVM snapshot and then rsync it elsewhere15:43
chiiiiiz@blackflow: THanks, I already read this. What is not clear to me, is if the snapshot is stored somewhere on the volume you are "snapshooting", or if you do have to store it somewhere else.16:35
chiiiiizwhat is the advantage of rsync over other methods?16:36
chiiiiizI will have a USB HD available tomorrow with 1Tb of space.16:37
TJ-chiiiiiz: a snapshot is a list of all the extents used by the LV at a point in time. From then on, if the original volume writes anything then it uses Copy-On-Write which allocates a new block for the new data in the original LV - the blocks pointed to by the snapshot remain the same16:37
TJ-chiiiiiz: so space will only be consumed if the original LV is writing data because copies of the blocks need to be made16:38
TJ-chiiiiiz: so, you could snapshot, mount the snapshot, and use rsync to copy files out of it to your USB mass storage16:38
chiiiiizso I do it directly from the / lv. No need to do the snapshot from another mount or partition. I will only need another mount or partition when backing up the data after mounting the snapshot16:38
chiiiiizTJ-: thanks, it is clearer now. But a rsync of the / does not allow me to 'reuse' the backup for another /, if need be. It is not like a dd.16:39
TJ-chiiiiiz: correct. the snapshot is another LV as far as the system is concerned, so you can mount that somewhere and do what you need with it16:39
chiiiiizI fear a dd of 300 Gb lasts days...16:40
chiiiiizdd make an image only as big as the data, or as big as the partition it backs up?16:41
TJ-chiiiiiz: what you could do, if the VG has the free space, is shrink the file-system inside the snapshot, and the snapshot LV itself, then copy the result over16:41
TJ-chiiiiiz: there's another, sneaky, way to do this you know16:41
chiiiiizThe VG is 903 Gb, the lv is 903 Gb, and only used up to 33%16:42
TJ-chiiiiiz: instead of a snapshot, wait until you've got the USB drive connected, make it a PV (physical volume), add it to the existing VG, then change the rootfs LV to be a mirror with the USB PV used as the other 1/2 of the mirror. Give it time to sync across fully to the USB, then temporarily freeze the rootfs LV, break the mirror, and unfreeze. You'd get an exact copy of the LV on the USB16:43
chiiiiizSo it has the space. As said, I do not want to restart. So if shrinking the LV/FS does not need a restart, I am go for it.16:43
TJ-chiiiiiz: I'd suggest experimenting on another PC for either snapshot or mirror sceanrios first, using smaller data sizes, to practice the commands and checking the results, though16:43
TJ-chiiiiiz: what file-system does the rootfs use? Generally, you can extend, but not shrink, a live file-system online16:44
chiiiiizOK  I see the logic, but I need to have iot done until tomorrow, no time to experiment...16:44
chiiiiizext4. It is a ubuntu-server, quite standard, albeit the lvm thing.16:44
TJ-chiiiiiz: take the snapshot then, use it as the basis for whatever method you decide on16:44
chiiiiizcan a dd run on a live system?16:46
TJ-chiiiiiz: right, so you could snapshot, "resize2fs -M /dev/mapper/VG-snapshot", "lvreduce --size XXX /dev/mapper/VG-snapshot" .. read "man lvreduce" for the details. You would need to ensure you do not shrink it smaller than the ext4 file-system16:47
chiiiiizI do not think so16:47
TJ-chiiiiiz: it can run yes but you'll get an inconsistent image. dd from a read-only snapshot would be OK though16:47
chiiiiizI think I'll go for a dd of a snapshot, to be able to reuse the dd image to recreate a partition if need be.16:48
chiiiiizTJ-:again my question. If a dd my /, will my image be 903Gb or 350 Gb (33% of it).16:52
TJ-chiiiiiz: word of warning - transferring that amount of data in one go over USB could cause corruption - depends on the USB<>SATA bridge, but I've seen LOTS of those devices overheat and fail when doing large continuous transfers16:53
TJ-chiiiiiz: the image size will be whatever the size of the containing block device is - in your case, the size of the LV containting the rootfs16:54
chiiiiizTJ-, I feared this would be an issue too...16:54
TJ-chiiiiiz: this is why shrinking first is so useful when you've a large file-system that is only partially used16:54
chiiiiizTJ-: so rsync  is in this optic a much better solution. Although in case of a crash we would have to reinstall the server.16:57
chiiiiizand maybe rsync is also faster??16:57
chiiiiizif I format my USB HDD in ext4, does rsync copy the permissions?16:58
chiiiiizor will I have to use a ACL tool to copy the permissions in order to recreate them if need be?16:58
TJ-chiiiiiz: yes, rsync can/will copy onwership and modes16:59
chiiiiizOK, rsync it is!!!17:01
chiiiiizThanks a lot.17:01
TJ-chiiiiiz: make sure to read the man-page and test on a small samlpe first :)17:06
chiiiiizI want to format a encrypted partition ( I know the passphrase), so that the partition is not encrypted any longer. Shall i simply mount it, decrypt with the passphrase, start gparted and reformat my partition? I have read about it but I am not sure this change the encrypting... only that it changes the FS.17:21
mybalzitchyou should be able to just newfs the partition. no need to mount it/decrypt it. Just blow it away17:35
mybalzitchif you want to retain the data, you'll have to mount it, decrypt it, copy the data to a place holder, then blow away the partition and copy the data back17:36
chiiiiizmybalzitch: no need to retain any data, only need to remove the cryptage.17:50
=== JanC_ is now known as JanC
TJ-chiiiiiz: is it LUKS/dmcrypt? you can use "cryptsetup luksErase/erase ..." respectively18:07
TJ-chiiiiiz: you'd also likely need to remove the associated entry from /etc/crypttab and /etc/fstab18:08
chiiiiizTJ-:no entries in /etc/fstab or /etc/crypttab... it was a USB HDD18:10
chiiiiizdoes ntfs FS store permissions? Still not I guess...18:12
TJ-chiiiiiz: ntfs uses ACLs18:13
chiiiiizso if I make my backup on a ntfs formated USB HDD, I can still use the backup with the permissions to restore some data... I have been asked to store the backup on a Windows server... meaning formatting my USB disk in ntfs...18:14
chiiiiizor I create 2 partitions on my USB disk. The first in ntfs, and a second in ext4.. just in case...18:15
TJ-charlton: it won't map Linux ownership/modes, no. I thought you were asking if NTFS supports such things18:30
TJ-grrr18:30
TJ-chiiiiz: it won't map Linux ownership/modes, no. I thought you were asking if NTFS supports such things18:30
=== elsheepo is now known as beatzz

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!